uz-booking-client
Version:
Unofficial UZ api client
28 lines (27 loc) • 1.12 kB
TypeScript
import Requestable from '../lib/requestable';
export default class Station extends Requestable {
lang: string;
/**
* Construct station class.
* @constructor
* @param {string} lang - language
* @param {string} auth
* @param {string} apiBase - the base UzBooking API URL
*/
constructor(lang: string, auth: any, apiBase: string);
/**
* Find station by name
* @param {string} stationName - the name of station
* @param {string} [stationFromId]
* @param {Function} [callback] - callback function
* @returns {Promise} - the promise for the http request
*/
find(stationName: string, stationFromId?: [string], callback?: (error: Error, data?: object, response?: object) => any): Promise<any>;
/**
* Find station by name from assets
* @param {string} stationName - the name of station
* @param {Function} [callback] - callback function
* @returns {Promise} - the promise for the http request
*/
findFromAssets(stationName: string, callback?: (error: Error, data?: object, response?: object) => any): Promise<any>;
}