@ohm-vision/kiwi-tequila-api
Version:
Unofficial wrapper for Kiwi (tequila) API
105 lines • 4.26 kB
TypeScript
import { AxiosRequestConfig } from "axios";
import { LocationGetByAnythingDto, LocationGetByIdDto, LocationGetBySubentityDto, LocationGetDumpDto, LocationSearchByBoxDto, LocationSearchByHashtagDto, LocationSearchByQueryDto, LocationSearchByRadiusDto, LocationSearchBySeoUrlDto, LocationSearchTopDestinationsDto, LocationTopDestinationsHashtagsLookupDto } from "../dtos";
import { LocationsDumpResponse, LocationsHashtagsResponse, LocationsResponse } from "../responses";
export declare class LocationsApi {
private readonly config;
constructor(baseConfig: AxiosRequestConfig);
/**
* Search by query
*
* Type of request used mainly for suggestions (based on incomplete names)
* @param params
* @returns
*/
searchByQuery(params: LocationSearchByQueryDto): Promise<LocationsResponse>;
/**
* Search by radius
*
* This type of request supports either specification of location by coordinates (lat, lon)
* or by identifier (slug or id of location - term)
* @param params
* @returns
*/
searchByRadius(params: LocationSearchByRadiusDto): Promise<LocationsResponse>;
/**
* Search by box
*
* Get all locations within the specified box.
* @param params
* @returns
*/
searchByBox(params: LocationSearchByBoxDto): Promise<LocationsResponse>;
/**
* Search by subentity
*
* Get all locations that are below (in hierarchy) the one specified by id - e.g. for
* ?type=subentity&term=london_gb all locations in London are returned (as London is city,
* airports, stations and bus_stations are returned).
* @param params
* @returns
*/
getBySubentity(params: LocationGetBySubentityDto): Promise<LocationsResponse>;
/**
* Get by id
*
* Get location specified by its id.
* @param params
* @returns
*/
getById(params: LocationGetByIdDto): Promise<LocationsResponse>;
/**
* Get by anything
*
* Get locations specified by any of the following fields for example - id, int_id, code, icao, name, slug, etc.
* @param params
* @returns
*/
getByAnything(params: LocationGetByAnythingDto): Promise<LocationsResponse>;
/**
* Get dump
*
* Get dump of locations data in specified language. When retrieving large amounts of locations (using type=dump),
* it is more efficient to use paginated response. This can be done using parameter search_after. In addition,
* when retrieving paginated data it is advised to use "sort=id", so the returned results are consistent.
* @param params
* @returns
*/
getDump(params: LocationGetDumpDto): Promise<LocationsDumpResponse>;
/**
* Search top destinations
*
* This type of request returns a list of destinations most searched / clicked on / booked from the starting point
* term. The limit is used to limit the range of results.
* @param params
* @returns
*/
searchTopDestinations(params: LocationSearchTopDestinationsDto): Promise<LocationsResponse>;
/**
* Search by hashtags
*
* This type of request returns a list of destinations most searched / clicked on / booked from the starting point term.
* The limit is used to limit the range of results.
* @param params
* @returns
*/
searchByHashtags(params: LocationSearchByHashtagDto): Promise<LocationsResponse>;
/**
* Top destinations' hashtags lookup
*
* This type of request returns a list of destinations' hashtags most searched / clicked on / booked from the starting
* point term. In other words it can be understood as following: What are the most popular activies at the places that
* customers tend to search for / click / book when flying from term ? The limit is used to limit the range of results.
*
* @param params
* @returns
*/
topDestinationsHashtagsLookup(params: LocationTopDestinationsHashtagsLookupDto): Promise<LocationsHashtagsResponse>;
/**
* Search by seo url
*
* @param params
* @returns
*/
searchBySeoUrl(params: LocationSearchBySeoUrlDto): Promise<LocationsResponse>;
}
//# sourceMappingURL=locations.api.d.ts.map