Project

kiwi-ruby

0.0
No release in over 3 years
Low commit activity in last 3 years
Wrapper for the Kiwi.com API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 5.0
~> 10.0
>= 0
= 3.6.2

Runtime

 Project Readme

Kiwi

Build Status Gem Version

This is a Ruby wrapper for the Tequila API (Kiwi.com).

Currently only search and location are supported.

Installation

Add this line to your application's Gemfile:

gem 'kiwi-ruby'

And then execute:

$ bundle

Or install it yourself as:

$ gem install kiwi-ruby

Setup

Initialize the gem with a valid API KEY:

  KiwiApi.api_key = "your-api-key"

Supported endpoints

search

Kiwi.com flights search API.

  params = {
    fly_from: "CNX",
    fly_to: "BKK",
    date_from: "10/10/2019",
    date_to: "10/10/2019",
    return_from: "14/10/2019",
    return_to: "14/10/2019",
  }

  response = client.search(params)

  response.success? # true/false

  response.status # 200...

  response.body # results...

  response.errors # error message & full messages

location

Locations is a simple API used to search, suggest and resolve locations in various situations.

  params = {
    term: "Chiang Mai"
  }

  response = client.location(params)

  response.success? # true/false

  response.status # 200...

  response.body # results...

  response.errors # error message & full messages

Get Api Key

To get access to the Tequila API, signup as an affiliate here.

License

The gem is available as open source under the terms of the MIT License.