1.3.3 • Published 10 months ago

@ohm-vision/kiwi-tequila-api v1.3.3

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

kiwi-tequila-api

Kiwi Tequila API SDK (Node JS)

Wrapper for the Kiwi Tequila API (unofficial) Kiwi Tequila Docs

npm version

"Buy Me A Coffee"

Installation

Run the following command

npm install @ohm-vision/kiwi-tequila-api

Usage

You may either use the full API through the KiwiApi object, or import the KiwiPartialApi for a specific search type

The KiwiOptions interface supports

  • required apiKey: this is your Kiwi API key
  • optional baseURL: this is the URL to the Kiwi endpoint (defaults to https://tequila-api.kiwi.com)

Example with full api

import { KiwiApi, KiwiOptions } from "@ohm-vision/kiwi-tequila-api";

const options: KiwiOptions = {
    apiKey: "**** enter your api key here ***",
};
const kiwi = new KiwiApi(options);

kiwi.search.singlecity({
    fly_from: "FRA",
    fly_to: "PRG",
    date_from: new Date("01/04/2021"),
    date_to: new Date("05/04/2021")
    return_from: new Date("03/04/2021"),
    return_to: new Date("04/04/2021"),
    flight_type: "round"
})
.then(results => console.log(results))
.error(e => console.error(e));

Example with partial api

import { KiwiApi, KiwiOptions } from "@ohm-vision/kiwi-tequila-api";

const options: KiwiOptions = {
    apiKey: "**** enter your api key here ***",
};
const kiwi = KiwiApi.singlecity(options);

kiwi.search({
    fly_from: "FRA",
    fly_to: "PRG",
    date_from: new Date("01/04/2021"),
    date_to: new Date("05/04/2021")
    return_from: new Date("03/04/2021"),
    return_to: new Date("04/04/2021"),
    flight_type: "round"
})
.then(results => console.log(results))
.error(e => console.error(e));

Contact Me

Ohm Vision, Inc

1.3.3

10 months ago

1.3.2

10 months ago

1.3.1

10 months ago

1.3.0

10 months ago

1.2.0

10 months ago

1.1.0

10 months ago

1.0.0

10 months ago