Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fpti

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fpti

Standardized API for public transportation client libraries.

  • 0.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

fpti-js

FPTI-JS (Friendly Public Transport Interface) describes a standardized API for public transportation client libraries in JavaScript. See the spec and the list of JS modules.

Proposal, work in progress!

npm version license chat on gitter

API

The purpose of this specification is to outline a standardized API for the most common features of public transportation libraries, such as Journey planning, Departures/Arrivals or Station search. While most libraries certainly don't cover all of the following features, the basic principle for modules complying to fpti-js is that if a certain feature is available, it must be provided with the API described below. Some modules may also include additional functionalities that are not covered within this specification, as long as they don't use the reserved fpti-js method names.

Furthermore, even for additional features that are not covered within the following spec, fpti-js modules return data in the Friendly Public Transport Format v1.x.x wherever possible and use validate-fptf and fpti-tests in their tests.

Method overview

All methods expose an object method.features which contains all supported options and simple descriptions of those options as keys and values, respectively. See the method specifications for examples.

MethodFeature descriptionReturns
stations.all([opt]) / stops.all([opt]) / regions.all([opt])All stations/stops/regions of the network.Readablestation / stop / region
stations.search(query, [opt]) / stops.search(query, [opt]) / regions.search(query, [opt])Search stations/stops/regions by query.Promise[station] / [stop] / [region]
stations.nearby(location, [opt]) / stops.nearby(location, [opt]) / regions.nearby(location, [opt])Search stations/stops/regions by location.Promise[station] / [stop] / [region]
journeys(origin, destination, [opt])Journeys between stations (or optionally other locations)Promise[journey]
stopovers(station, [opt])Departures and arrivals at a given station (or optionally other location)Promise[stopover]

Contributing

We are looking forward to discuss & extend this format further! If you have a question or want to propose changes, visit the issues page. Keep our contributing guidelines in mind. Note that, by participating in this project, you commit to the code of conduct.

Keywords

FAQs

Package last updated on 29 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc