Given the low usage of the SDK, we have decided to deprecate this library. If you wish to perform travel searches or queries on our mobility API, we recommend using GraphQL directly.
https://developer.entur.org/pages-journeyplanner-journeyplanner
:wrench: TypeScript SDK for Entur APIs
Home Page: https://sdk.entur.org
License: European Union Public License 1.2
Given the low usage of the SDK, we have decided to deprecate this library. If you wish to perform travel searches or queries on our mobility API, we recommend using GraphQL directly.
https://developer.entur.org/pages-journeyplanner-journeyplanner
I tried to use your SDK for a side project I am working on, but due to there not being a function for getting prices, and your API documentation being fairly poor. I resorted to using Vy's undocumented API
Setup automatic publish from circleci.
https://circleci.com/blog/publishing-npm-packages-using-circleci-2-0/
Replace today's whitelist with something better. @kentandersen had some ideas.
The "Array of Modes"-link doesn't go to anywhere, as the information seems to be missing @ https://github.com/entur/sdk/blob/master/docs/travel/getTripPatterns.mdx#leg-mode
@babel/polyfill
is missing, therefore running service.findTrips
, which uses async/await, crashes.
Hi.
The above-mentioned method throws: "GraphQL: Exception while fetching data (/stopPlaces[0]/estimatedCalls) : null",
I managed to make this query fail in GraphiQL too: Link
Will you have a look?
Burde vært en ? foran name i https://github.com/entur/sdk/blob/v1.0.0-next.12/flow-types/Location.js fordi navn ikke er påkrevd i GraphQL-interfacet.
Line 5 in 95b4113
We need a getBikeRentalStations
method for fetching multiple bike rental stations at once. It should take a list of IDs as its first parameter.
We need to migrate the examples to v1 in the next
-branch before merging it.
We should implement a method for the nearest
query.
https://api.entur.io/journey-planner/v2/ide/?query={ nearest(latitude%3A 59.91459596109116%2C longitude%3A 10.755761595613489%2C filterByPlaceTypes%3A [stopPlace%2C bicycleRent]) { edges { node { place { id } } } }}
All SDK methods should have at least one example on their respective documentation page.
Hi, I´m trying to run the examples but I always get, do you have any idea about what I´m doing wrong?
Thanks!
The Code:
const { default: EnturService, convertLocationToPosition } = require('../lib')
const service = new EnturService({ clientName: 'tjruterapp-ruterapp'})
async function example() {
const [fromLocation] = await service.getLocations('Ryllikvegen, Lillehammer')
const [toLocation] = await service.getLocations('Oslo S')
if (fromLocation && toLocation) {
service.getTripPatterns({
searchDate: new Date(),
from: convertLocationToPosition(fromLocation),
to: convertLocationToPosition(toLocation),
}).then(console.log) // eslint-disable-line no-console
}
}
The error:
example()(node:80207) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
The examples on the master branch say
service.getTripPatterns({
searchDate: new Date(),
from: {
name: 'Ryllikvegen, Lillehammer',
coordinates: {
latitude: 61.102848368937416,
longitude: 10.51613308426234
},
},
to: {
place: 'NSR:StopPlace:337',
name: 'Oslo S, Oslo'
}
})
but when installing the package i get @entur/[email protected]
, which defines getTripPatterns like this:
getTripPatterns(
from: Location,
to: Location,
params?: GetTripPatternsParams,
ignoreFields?: Array<string>,
): Promise<TripPattern[]>;
Should the examples be updated, or have a notice saying that the default installed package is "next", and may not work like the examples?
Cheers!
service.getStopPlaceDepartures
stopId=NSR:StopPlace:3378
Reply:
"realtime" seems to be always true even if the bus has not started the journey, and there are fewer buses that actually are realtime, than on the actual platform info board.
Not sure where to report this, so please point me in the right direction if this is not the right place.
TIA
Jonas
Hi,
It seems like you are producing a TypeError in getTripPatterns if the response from the API is empty (i.e. no results found).
It seems like a bug to me, I'd expect to either get a more meaningful error or perhaps just an empty array back.
TypeError: Cannot read property 'trip' of undefined
at @entur\sdk\lib\trip\index.js:69:26
On a sidenote, I love the fact that you have made this javascript library to access your API.
Cheers,
Aleksander
TypeDoc looks promising for generating a site for the full API Reference.
We could have the generated API ref on sdk.entur.org and move other documentation to Entur's main dev pages: https://developer.entur.org/pages-sdk-intro
getStopPlaceDepartures does not work with range sent as a parameter
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.