No commit activity in last 3 years
No release in over 3 years
A wrapper gem for http://www.anapioficeandfire.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.9
~> 10.0
>= 3.0.0, ~> 3.0.0
>= 3.0.0, ~> 3.0.0

Runtime

~> 0.9.2
>= 1.8.2, ~> 1.8.2
 Project Readme

IceAndFireApi

Gem Version Downloads Build Status

Game of Thrones

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:

  • Root

    Fetch information about all resources available in the API.

      IceAndFireApi::Root.fetch
  • Books

    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})
  • Characters

    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')
  • Houses

    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.