ojp-sdk
Version:
OJP (Open Journey Planner) Javascript SDK
32 lines (31 loc) • 2.11 kB
TypeScript
import { ApiConfig } from '../../types/stage-config';
import { POI_Restriction, RestrictionType } from '../../types/lir-restrictions.type';
import { OJPBaseRequest } from '../base-request';
import { LIR_Response } from '../types/location-information-request.type';
import { Location } from '../../location/location';
import { Language } from '../../types/language-type';
import { GeoPosition } from '../../location/geoposition';
export declare class LocationInformationRequest extends OJPBaseRequest {
locationName: string | null;
stopPlaceRef: string | null;
restrictionTypes: RestrictionType[];
poiRestriction: POI_Restriction | null;
numberOfResults: number | null;
bboxWest: number | null;
bboxNorth: number | null;
bboxEast: number | null;
bboxSouth: number | null;
circleCenter: GeoPosition | null;
circleRadius: number | null;
enableExtensions: boolean;
constructor(stageConfig: ApiConfig, language: Language);
static initWithResponseMock(mockText: string): LocationInformationRequest;
static initWithRequestMock(mockText: string, stageConfig?: ApiConfig): LocationInformationRequest;
static initWithLocationName(stageConfig: ApiConfig, language: Language, locationName: string, restrictionTypes: RestrictionType[], limit?: number): LocationInformationRequest;
static initWithStopPlaceRef(stageConfig: ApiConfig, language: Language, stopPlaceRef: string): LocationInformationRequest;
static initWithCircleLngLatRadius(stageConfig: ApiConfig, language: Language, circleLongitude: number, circleLatitude: number, circleRadius: number, restrictionTypes?: RestrictionType[], numberOfResults?: number): LocationInformationRequest;
static initWithBBOXAndType(stageConfig: ApiConfig, language: Language, bboxWest: number, bboxNorth: number, bboxEast: number, bboxSouth: number, restrictionTypes: RestrictionType[], limit?: number, poiRestriction?: POI_Restriction | null): LocationInformationRequest;
protected buildRequestNode(): void;
fetchResponse(): Promise<LIR_Response>;
fetchLocations(): Promise<Location[]>;
}