module GogoKit::Client::Category

{GogoKit::Client} methods for getting categories

Public Instance Methods

get_category(category_id, options = {}) click to toggle source

Retrieves a category by ID

@param [Integer] category_id The ID of the category to be retrieved @param [Hash] options Optional options @return [GogoKit::Category] The requested category

# File lib/gogokit/client/category.rb, line 15
def get_category(category_id, options = {})
  root = get_root
  object_from_response(GogoKit::Category,
                       GogoKit::CategoryRepresenter,
                       :get,
                       "#{root.links['self'].href}/categories/" \
                       "#{category_id}",
                       options)
end
get_genres(options = {}) click to toggle source

Retrieves the genre categories (e.g. Sports, Concerts, Theatre)

@see viagogo.github.io/developer.viagogo.net/#viagogogenres @param [Hash] options Optional options @return [GogoKit::PagedResource] The genre categories

# File lib/gogokit/client/category.rb, line 30
def get_genres(options = {})
  object_from_response(GogoKit::PagedResource,
                       GogoKit::CategoriesRepresenter,
                       :get,
                       get_root.links['viagogo:genres'].href,
                       options)
end