@spasea/uz-booking-client
Version:
Unofficial UZ api client
23 lines (22 loc) • 1.01 kB
TypeScript
import Requestable from '../lib/requestable';
export default class Train extends Requestable {
/**
* Construct station class.
* @constructor
* @param {string} [lang] - language
* @param {auth} [auth] - the credentials to authenticate to UzBoojking. If auth is
* not provided requests will be made unauthenticated
* @param {string} [apiBase] - the base UzBooking API URL
* @param userId
*/
constructor(lang: string, auth: any, apiBase: string, userId: number | string);
/**
* Find train
* @param {number} stationFromId - departure station id
* @param {number} stationToId - target station id
* @param {string} date - departure date
* @param {Function} [callback] - callback function
* @returns {Promise} - the promise for the http request
*/
find(stationFromId: number, stationToId: number, date: string, callback?: (error: Error, data?: object, response?: object) => any): Promise<any>;
}