0.0.5 • Published 6 years ago

navitia-query-builder v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Build Status Coverage Status

Navitia Query Builder

This package is currently a WIP and the API won't be stable until 1.0.

This packace is an attempt at creating a better experience for querying navitia APIs from javascript and typescript.
It simply helps you and your grandma in building a URL query via a fluent API that you can then use with your favorite http requesting tool.

Features :

  • Fully immutable
  • Simple usage
  • Inline documentation for an immersive experience (better than doom)
import { NavitiaUrlBuilder } from 'navitia-query-builder'; // ikr, main class name doesn't match package name...
// Current API
const departures = new NavitiaUrlBuilder()
            .endpoint('https://test-endpoint.fr')
            .v1()
            .coverage('sncf')
            .stopArea('OCE:SA:87713040')
            .departures()
            .count(5)
            .parseUrl();
// https://test-endpoint.fr/v1/coverage/sncf/stop_areas/stop_area:OCE:SA:87713040/departures?count=5&
 

TODO

  • ? Minify package
  • Vscode debuging test with F5
  • Full params for departure
  • ? Extract parameters (count, depth, ...) into their own generic code
  • Better documentation
  • ? Find a way to type supposed result
  • Make library fully immutable
  • Beta npm
  • Extract jest config from package.json
  • Travis
  • Coveralls
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago