Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moviendome/kiwi
Ruby wrapper for the Tequila API (Kiwi.com)
https://github.com/moviendome/kiwi
flights-api gem ruby tequila wrapper
Last synced: about 1 month ago
JSON representation
Ruby wrapper for the Tequila API (Kiwi.com)
- Host: GitHub
- URL: https://github.com/moviendome/kiwi
- Owner: moviendome
- License: mit
- Created: 2019-08-14T09:34:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T16:48:48.000Z (almost 2 years ago)
- Last Synced: 2024-04-27T03:02:29.291Z (7 months ago)
- Topics: flights-api, gem, ruby, tequila, wrapper
- Language: Ruby
- Homepage:
- Size: 310 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Kiwi
[![Build Status](https://travis-ci.org/jferrer/kiwi.svg?branch=master)](https://travis-ci.org/jferrer/kiwi) [![Gem Version](https://badge.fury.io/rb/kiwi-ruby.svg)](https://badge.fury.io/rb/kiwi-ruby)
This is a Ruby wrapper for the [Tequila API](https://tequila.kiwi.com) ([Kiwi.com](https://www.kiwi.com)).
Currently only `search` and `location` are supported.
## Installation
Add this line to your application's Gemfile:
```ruby
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.```ruby
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.```ruby
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](https://tequila.kiwi.com/portal/login/register).
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).