Skip to content

Commit

Permalink
renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mqxx committed Aug 29, 2024
1 parent 8640e88 commit 2157131
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This interface represents options for the API fetch.
*/
export interface ListDnsRecordsOption {
export interface ApiRequestOptions {
/** API URL endpoint. */
apiEndpoint : string,
/** Token to access the API. */
Expand Down
4 changes: 2 additions & 2 deletions src/api/list_dns_records.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import ApiRequestError from '../error/api_request_error.ts';
import FetchRequestError from '../error/fetch_request_error.ts';
import { DnsRecord } from '../record/dns_record.ts';
import supportedDnsRecordTypes from '../record/dns_record_type.ts';
import { ListDnsRecordsOption } from './list_dns_records_option.ts';
import { ApiRequestOptions } from './api_request_options.ts';

/**
* This function gets all DNS records, filtered by the DNS record types.
*
* @param options Options for the API fetch
* @returns List of all DNS records found.
*/
export default function listDnsRecordsFromApi(options: ListDnsRecordsOption) : Promise<DnsRecord[]> {
export default function listDnsRecordsFromApi(options: ApiRequestOptions) : Promise<DnsRecord[]> {
return fetch(
`${options.apiEndpoint}zones/${options.zoneId}/dns_records?type=${supportedDnsRecordTypes.join(',')}`,
{
Expand Down
5 changes: 3 additions & 2 deletions src/api/update_dns_record.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { DnsRecord } from '../record/dns_record.ts';
import { ApiRequestOptions } from './api_request_options.ts';

export default function updateDnsRecord(record : DnsRecord) {

export default function updateDnsRecord(record : DnsRecord, options : ApiRequestOptions) : void {
}

0 comments on commit 2157131

Please sign in to comment.