IceAndFireApi
This gem provides an interface for the Ice And Fire API. It was motivated by the current lack of support for a ruby library. More response fields and schema information for House
, Character
, and Book
resources is available through the documentation.
Installation
Add this line to your application's Gemfile:
gem 'ice_and_fire_api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ice_and_fire_api
Usage
The Ice and Fire API contains endpoints for the following resources:
-
Fetch information about all resources available in the API.
IceAndFireApi::Root.fetch
-
Find a book resource from its associated ID.
IceAndFireApi::Book.find(5)
or
Find a book resource through a filter.
IceAndFireApi::Book.find_by({toReleaseDate: '2010-09-22T00:00:00', pageSize: 5})
-
Find a character resource from its associated ID.
IceAndFireApi::Character.find(88)
or
Find a character resource through a filter.
IceAndFireApi::Character.find_by(name: 'Eddard Stark')
-
Find a house resource from its associated ID.
IceAndFireApi::House.find(42)
or
Find a house resource through a filter.
IceAndFireApi::House.find_by({region: 'The North', pageSize: 15})
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/dbelling/ice_and_fire_api.
License
The gem is available as open source under the terms of the MIT License.