You can install it by adding
duffel_api to your Gemfile, or by running
gem add duffel_api in your terminal.
Once it’s installed, you just need to require it and initialise it with your access token:
duffel = DuffelAPI::Client.new(
With the client library, it’s simple to interact with the API - you don’t need to worry about constructing HTTP requests or parsing JSON:
duffel.aircrafts.all.each do |aircraft|
To help you get up and running quickly, we’ve added Ruby code samples to our developer guides (for example the Quick Start guide) and API reference.
At Duffel, we’re big believers in open source, so you’ll also find the source code for the client library on GitHub.
If you need any help with the Ruby client library or with the API more generally, please reach out - we’re more than happy to help.