Module: GogoKit::Client::Category
Overview
GogoKit::Client methods for getting categories
Instance Method Summary collapse
-
#get_category(category_id, options = {}) ⇒ GogoKit::Category
Retrieves a category by ID.
-
#get_genres(options = {}) ⇒ GogoKit::PagedResource
Retrieves the genre categories (e.g. Sports, Concerts, Theatre).
Methods included from Utils
Instance Method Details
#get_category(category_id, options = {}) ⇒ GogoKit::Category
Retrieves a category by ID
15 16 17 18 19 20 21 22 23 |
# File 'lib/gogokit/client/category.rb', line 15 def get_category(category_id, = {}) root = get_root object_from_response(GogoKit::Category, GogoKit::CategoryRepresenter, :get, "#{root.links['self'].href}/categories/" \ "#{category_id}", ) end |
#get_genres(options = {}) ⇒ GogoKit::PagedResource
Retrieves the genre categories (e.g. Sports, Concerts, Theatre)
30 31 32 33 34 35 36 |
# File 'lib/gogokit/client/category.rb', line 30 def get_genres( = {}) object_from_response(GogoKit::PagedResource, GogoKit::CategoriesRepresenter, :get, get_root.links['viagogo:genres'].href, ) end |