Giter Site home page Giter Site logo

entur / scooterservice Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 1.14 MB

๐Ÿ›ด The API for scooters in Norway.

Home Page: https://developer.entur.org/pages-mobility-docs-scooters

TypeScript 73.55% HTML 22.27% Shell 3.39% JavaScript 0.79%
scooters mobility

scooterservice's Introduction

Mobility Functions

Deprecation notice: This API has been deprecated. See API documentation for more information

The Entur-Mobility app is an api that contains two endpoints.

  • scooters close to a user-specified location.
  • prices for mobility services such as scooters and city bikes.

๐Ÿ“’ Official API documentation

The api runs on firebase, in terms of functions, hence the firebase-CLI and the Google Cloud SDK are required.

Follow the installation instructions and restart the terminal.

Make sure you are using the correct firebase project, this can be done by running firebase projects:list and checking which project is currently in use. The current project should be entur-mobility-staging. If it is not, then switch to it by running firebase use entur-mobility-staging

Run app

First of all, make sure you have version 10 or higher of Node.js installed.

  • Install dependencies: npm install (npm >= v7.0.0 is required)
  • Download config variables: npm run get-config
  • Build project and start emulator: npm start

Now, the app is running on localhost.

API

The app can live in three different environments, with the following root:

  • localhost: http://localhost:5001/entur-mobility-staging/europe-west1
  • staging: https://api.staging.entur.io/mobility/v1/
  • production: https://api.entur.io/mobility/v1

Example requests

Get scooters close to a specified position:

GET http://localhost:5001/entur-mobility-staging/europe-west1/scooters?lat=59.909&lon=10.746

with header: ET-Client-Name: Entur

Get scooter and city bikes prices:

http://localhost:5001/entur-mobility-staging/europe-west1/prices

with header: ET-Client-Name: Entur

Deploy

Deploy to staging:

npm run deploy:staging

Deploy to production:

npm run deploy:prod

Deploying API proxy to Apigee

Run

npm run deploy-apigee <dev|staging|prod>

Fill in username and password when prompted.

You need to deploy to dev before deploying to staging or prod.

Heatmap

in the public-folder you can find a simple application showing a heatmap for scooters in Norway. For the map to be fully functional, you have to edit the html code and add the API-key for google maps. This key can be found in Google cloud console --> Credentials --> API keys. Pick the "Browser key".

The heatmap runs on https://entur-mobility-staging.firebaseapp.com/

Deploy

npm run stage-heatmap

scooterservice's People

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.