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

@datafire/faretrotter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datafire/faretrotter

DataFire integration for Faretrotter Travel API

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@datafire/faretrotter

Client library for Faretrotter Travel API

Installation and Usage

npm install --save @datafire/faretrotter
let faretrotter = require('@datafire/faretrotter').create({
  ApiKeyAuth: ""
});

.then(data => {
  console.log(data);
});

Description

Multimodal travel API to return modes of transportation between cities and points of interest.

Actions

GET_places

Returns possible modes of transportation between two cities.

faretrotter.GET_places(null, context)
Input

This action has no parameters

Output
  • output PlaceResponse

GET_routes

faretrotter.GET_routes({
  "origin_lat": 0,
  "origin_lng": 0,
  "destination_lat": 0,
  "destination_lng": 0
}, context)
Input
  • input object
    • origin_lat required number
    • origin_lng required number
    • destination_lat required number
    • destination_lng required number
Output

Definitions

PlaceResponse

  • Place response object
    • city required string
    • country required string
    • geoname_id required string
    • id required string
    • lat required number
    • lng required number
    • name required string
    • name_long required string
    • region required string
    • slug required string
    • type required string

PlacesResponse

  • Places response object
    • places required array
    • request required object
      • distance_miles required number
      • endpoint required string
      • environment required string
      • fields required object
        • destination_lat required number
        • destination_lng required number
        • origin_lat required number
        • origin_lng required number
      • version required string
    • status required object
      • code required number
      • message required string

RoutesResponse

  • Routes response object
    • data required object
      • operators required array
        • items object
          • attributes required array
            • items string
          • code required string
          • id required string
          • logo_img required string
          • mode required string
          • name required string
      • places required array
      • routes required array
        • items object
          • co2 required number
          • destination_id required string
          • duration required number
          • fare required number
          • mode required string
          • origin_id required string
    • request required object
      • distance_miles required number
      • endpoint required string
      • environment required string
      • fields required object
        • destination_lat required number
        • destination_lng required number
        • origin_lat required number
        • origin_lng required number
      • version required string
    • response required object
      • time required number
      • url required string
    • status required object
      • code required number
      • message required string

FAQs

Package last updated on 21 Dec 2020

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