@datafire/staging_ecotaco

6.0.0 • Public • Published

@datafire/staging_ecotaco

Client library for api.ecota.co v2

Installation and Usage

npm install --save @datafire/staging_ecotaco
let staging_ecotaco = require('@datafire/staging_ecotaco').create();

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

Description

The API ecotaco allows you to connect, create an account, manage your credit cards and order rides.

Authentication

Ecotaco API use a system of application key and authentification token.

Application key :

The application key is generated by Ecota.co and unique to an application.

Before accessing EcoTa.co APIs, you need to register your application. Please supply the following information to dev@ecota.co:

  • Application name

  • Company (if appropriate)

  • Contact name, phone and address

  • Contact email

  • Is this a web application, a desktop application, or an application running on a device?

  • Short description of your application

It must be passed on request : "accounts -> login", "accounts -> facebook login" and "accounts -> register" .

Authentification token :

The authentification token is retrieved at login or register of an user.

It must be passed in request for authenticate action in Authorization HTTP header.

Example :

Authorization: Token token=e55887022c1aca4c86abcc49e85ceb8a0c855d2af4d9fac75c08040a583dcde4

Language

On some of our resources, we filter the content displayed based on the Accept-Language header. If the language is not defined or if we don't use the language defined in this header, we automatically use French as the default language. EcoTa.co currently support two languages: English, French. ("en" and "fr")

Encoding

All requests and answers on EcoTa.co are in UTF-8.

Actions

.get

Retrieve the version API

staging_ecotaco..get(null, context)

Input

This action has no parameters

Output

Output schema unknown

accounts.get

Get current user

staging_ecotaco.accounts.get({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

accounts.post

Create a new account with an application key

staging_ecotaco.accounts.post({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

accounts.put

Update User

staging_ecotaco.accounts.put({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

accounts.password.post

Forget password with email

staging_ecotaco.accounts.password.post({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

accounts.payment_methods.get

Payment Methods

staging_ecotaco.accounts.payment_methods.get({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

accounts.settings.post

Settings

staging_ecotaco.accounts.settings.post({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

accounts.sign_in.post

Login with email, password and application key

staging_ecotaco.accounts.sign_in.post({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

accounts.update_password.put

Update Password

staging_ecotaco.accounts.update_password.put({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

addresses.places_autocomplete.post

For searching places just send the following attributes :

  • longitude (optional, float) : The location longitude for the seach

  • latitude (optional, float) : The location latitude for the seach

  • search (required, string) : The search text (most than 3 char)

staging_ecotaco.addresses.places_autocomplete.post({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

addresses.places_details.post

Get autocomplete places details

staging_ecotaco.addresses.places_details.post({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

catchement_areas.get

List all catchement areas

staging_ecotaco.catchement_areas.get({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

catchement_areas.id.get

Get a Catchement Area

staging_ecotaco.catchement_areas.id.get({
  "id": 0
}, context)

Input

  • input object
    • id required number: Numeric id of the Catchement Area
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

credit_cards.get

List all CreditCards for the current User

staging_ecotaco.credit_cards.get({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

credit_cards.id.get

Get a CreditCard

staging_ecotaco.credit_cards.id.get({
  "id": 0
}, context)

Input

  • input object
    • id required number: Numeric id of the Credit Card

Output

Output schema unknown

products.get

List all products

staging_ecotaco.products.get({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

products.id.get

Get a Product

staging_ecotaco.products.id.get({
  "id": 0
}, context)

Input

  • input object
    • id required number: Numeric id of the Product
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

promotional_codes.get

Get all promotional codes for user

staging_ecotaco.promotional_codes.get({}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

promotional_codes.post

Add a promotional code

staging_ecotaco.promotional_codes.post({}, context)

Input

  • input object
    • Accept string: e.g. application/json

Output

Output schema unknown

rides.id.get

Get a ride

staging_ecotaco.rides.id.get({
  "id": 0
}, context)

Input

  • input object
    • id required number: Numeric id of Ride
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

rides.id.cancel.get

Must be authenticate

staging_ecotaco.rides.id.cancel.get({
  "id": 0
}, context)

Input

  • input object
    • id required number: Numeric id of Ride
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

rides.id.cancel_fees.get

Must be authenticate

staging_ecotaco.rides.id.cancel_fees.get({
  "id": 0
}, context)

Input

  • input object
    • id required number: Numeric id of Ride
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

rides.id.estimate.get

Estimate a ride

staging_ecotaco.rides.id.estimate.get({
  "id": 0
}, context)

Input

  • input object
    • id required number: Numeric id of Ride
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

rides.id.reserve.post

To book, the ride must belong to the connected user. The ride must have a main passenger at least, the booking user id and the payment hash must be set.

Must be authenticate

staging_ecotaco.rides.id.reserve.post({
  "id": 0
}, context)

Input

  • input object
    • id required number: Numeric id of Ride
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

rides_page_page_per_page_per_page.get

Get all user rides

staging_ecotaco.rides_page_page_per_page_per_page.get({
  "page": 0,
  "per_page": 0
}, context)

Input

  • input object
    • page required number: Number of the page to load
    • per_page required number: Number of items per page to load
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en

Output

Output schema unknown

rides_page_page_per_page_per_page.post

Create a ride

staging_ecotaco.rides_page_page_per_page_per_page.post({
  "page": "",
  "per_page": ""
}, context)

Input

  • input object
    • Accept string: e.g. application/json
    • Accept-Language string: e.g. en
    • page required string
    • per_page required string

Output

Output schema unknown

version.get

Retrieve the Entry Point on Version

staging_ecotaco.version.get({
  "version": ""
}, context)

Input

  • input object
    • version required string: Ecotaco API version

Output

Output schema unknown

Definitions

Autocomplete_places

Autocomplete_places_details

Cancel_Ride

Cancel_fee

Catchement_Area

Collection_of_catchement_areas

Collection_of_products

Credit_card

Current_User

Endpoint

Estimate_Ride

Forget_password

Login

Password

Payment_Methods

Product

Register

Reserve_Ride

Settings

User_Credit_Cards

User_Promotional_Codes

User_Ride

User_Rides

Version

Readme

Keywords

none

Package Sidebar

Install

npm i @datafire/staging_ecotaco

Weekly Downloads

0

Version

6.0.0

License

MIT

Unpacked Size

93.2 kB

Total Files

4

Last publish

Collaborators

  • datafire