@linxside/motis-axios-client
v0.0.2
Published
OpenAPI client for @linxside/motis-axios-client
Maintainers
Readme
@linxside/[email protected]
This generator creates TypeScript/JavaScript client that utilizes axios. The generated Node module can be used in the following environments:
Environment
- Node.js
- Webpack
- Browserify
Language level
- ES5 - you must have a Promises/A+ library installed
- ES6
Module system
- CommonJS
- ES6 module system
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via package.json. (Reference)
Building
To build and compile the typescript sources to javascript use:
npm install
npm run buildPublishing
First build the package then run npm publish
Consuming
navigate to the folder of your consuming project and run one of the following commands.
published:
npm install @linxside/[email protected] --saveunPublished (not recommended):
npm install PATH_TO_GENERATED_PACKAGE --saveDocumentation for API Endpoints
All URIs are relative to https://api.transitous.org
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- DebugApi | transfers | GET /api/debug/transfers | Prints all transfers of a timetable location (track, bus stop, etc.) GeocodeApi | geocode | GET /api/v1/geocode | Autocompletion & geocoding that resolves user input addresses including coordinates GeocodeApi | reverseGeocode | GET /api/v1/reverse-geocode | Translate coordinates to the closest address(es)/places/stops. MapApi | initial | GET /api/v1/map/initial | initial location to view the map at after loading based on where public transport should be visible MapApi | levels | GET /api/v1/map/levels | Get all available levels for a map section MapApi | rentals | GET /api/v1/rentals | Get a list of rental providers or all rental stations and vehicles for a map section or provider MapApi | routes | GET /api/experimental/map/routes | Given an area frame (box defined by the top-right and bottom-left corners), it returns all routes and their respective shapes that operate within this area. Routes are filtered by zoom level. On low zoom levels, only long distance trains will be shown while on high zoom levels, also metros, buses and trams will be returned. MapApi | stops | GET /api/v1/map/stops | Get all stops for a map section MapApi | trips | GET /api/v5/map/trips | Given a area frame (box defined by top right and bottom left corner) and a time frame, it returns all trips and their respective shapes that operate in this area + time frame. Trips are filtered by zoom level. On low zoom levels, only long distance trains will be shown while on high zoom levels, also metros, buses and trams will be returned. RoutingApi | oneToAll | GET /api/v1/one-to-all | Computes all reachable locations from a given stop within a set duration. Each result entry will contain the fastest travel duration and the number of connections used. RoutingApi | oneToMany | GET /api/v1/one-to-many | Street routing from one to many places or many to one. The order in the response array corresponds to the order of coordinates of the \`many\` parameter in the query. RoutingApi | oneToManyIntermodal | GET /api/experimental/one-to-many-intermodal | One to many routing Computes the minimal duration from one place to many or vice versa. The order in the response array corresponds to the order of coordinates of the \`many\` parameter in the query. RoutingApi | oneToManyIntermodalPost | POST /api/experimental/one-to-many-intermodal | One to many routing Computes the minimal duration from one place to many or vice versa. The order in the response array corresponds to the order of coordinates of the \`many\` parameter in the request body. RoutingApi | oneToManyPost | POST /api/v1/one-to-many | Street routing from one to many places or many to one. The order in the response array corresponds to the order of coordinates of the \`many\` parameter in the request body. RoutingApi | plan | GET /api/v5/plan | Computes optimal connections from one place to another. TimetableApi | stoptimes | GET /api/v5/stoptimes | Get the next N departures or arrivals of a stop sorted by time TimetableApi | trip | GET /api/v5/trip | Get a trip as itinerary
Documentation For Models
- Alert
- AlertCause
- AlertEffect
- AlertSeverityLevel
- Area
- Category
- Direction
- Duration
- ElevationCosts
- EncodedPolyline
- FareMedia
- FareMediaType
- FareProduct
- FareTransfer
- FareTransferRule
- Initial200Response
- Itinerary
- Leg
- LocationType
- Match
- Mode
- ModelError
- OneToManyIntermodalParams
- OneToManyIntermodalResponse
- OneToManyParams
- ParetoSetEntry
- PedestrianProfile
- PickupDropoffType
- Place
- Plan200Response
- Reachable
- ReachablePlace
- Rental
- RentalFormFactor
- RentalPropulsionType
- RentalProvider
- RentalProviderGroup
- RentalReturnConstraint
- RentalStation
- RentalVehicle
- RentalVehicleType
- RentalZone
- RentalZoneRestrictions
- Rentals200Response
- RiderCategory
- RouteColor
- RouteInfo
- RoutePathSource
- RoutePolyline
- RouteSegment
- Routes200Response
- ServerConfig
- StepInstruction
- StopTime
- Stoptimes200Response
- TimeRange
- Transfer
- Transfers200Response
- TransitRouteInfo
- TripInfo
- TripSegment
- VertexType
Documentation For Authorization
Endpoints do not require authorization.
