@matheustrres/brasilapi
Version:
Lightweight, easy-to-use & free of dependencies wrapper for BrasilAPI
21 lines (20 loc) • 620 B
TypeScript
import { Source } from './source';
import { type DDD } from '../typings';
import { type Result } from '../typings/result';
interface IDDD {
get(ddd: string): Promise<Result<DDD>>;
}
/**
* Represents the source from BrasilAPI DDD's endpoint responses
*/
export declare class BrasilAPIDDD extends Source implements IDDD {
protected readonly URL = "https://brasilapi.com.br/api/ddd/v1";
/**
* Gets state and list of cities by area code
*
* @param {String} ddd - The area code to be fetched
* @returns {Promise<Result<DDD>>}
*/
get(ddd: string): Promise<Result<DDD>>;
}
export {};