import type { AxiosInstance } from 'axios' ; import { ReverseCommand } from '../../../command' ; import type { ReverseQuery } from '../../../model' ; import type { MapQuestReverseQueryInterface } from '../interface' ; import { MapQuestCommonCommandMixin } from './mixin' ; link export class MapQuestReverseCommand extends MapQuestCommonCommandMixin ( ReverseCommand ) < MapQuestReverseQueryInterface > { constructor ( httpClient , private readonly apiKey ) { super ( httpClient , apiKey ) ; } static getUrl ( ) { return 'https://www.mapquestapi.com/geocoding/v1/reverse' ; } protected async buildQuery ( query ) { return { key : this . apiKey , location : `${ query . lat },${ query . lon }` , thumbMaps : false , outFormat : 'json' , } ; } }