module GogoKit::Client::Country
{GogoKit::Client} methods for getting countries
Public Instance Methods
get_countries(options = {})
click to toggle source
Retrieves all countries
@see viagogo.github.io/developer.viagogo.net/#viagogocountries @param [Hash] options Optional options @return [GogoKit::PagedResource] All countries
# File lib/gogokit/client/country.rb, line 29 def get_countries(options = {}) object_from_response(GogoKit::PagedResource, GogoKit::CountriesRepresenter, :get, get_root.links['viagogo:countries'].href, options) end
get_country(code, options = {})
click to toggle source
Retrieves a country by country code
@param [String] code The country code of the country to be retrieved @param [Hash] options Optional options @return [GogoKit::Country] The requested country
# File lib/gogokit/client/country.rb, line 15 def get_country(code, options = {}) root = get_root object_from_response(GogoKit::Country, GogoKit::CountryRepresenter, :get, "#{root.links['self'].href}/countries/#{code}", options) end