UNPKG

@spasea/uz-booking-client

Version:
29 lines (28 loc) 1.17 kB
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 * @param userId */ constructor(lang: string, auth: any, apiBase: string, userId: number | 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>; }