class RakutenApi::GenreSearch::Client

Constants

REQUEST_PATH

Public Class Methods

root_categories(application_id = nil, affiliate_id = nil) click to toggle source

get rakuten root genres @param [String] application_id @param [String] affiliate_id @return [Array<RakutenApi::GenreSearch::Model>]

# File lib/rakuten_api/genre_search/client.rb, line 20
def self.root_categories(application_id = nil, affiliate_id = nil)
  response = self.new(application_id, affiliate_id) do |params|
    params.add_param :genre_id, 0
  end.request
  raise ::RakutenApi::ServerError.new($response.error_message, $response.status) if response.error?
  response.children
end

Public Instance Methods

get() click to toggle source
# File lib/rakuten_api/genre_search/client.rb, line 8
def get
  connection.get(REQUEST_PATH, params)
end
init_params(application_id, affiliate_id) click to toggle source
# File lib/rakuten_api/genre_search/client.rb, line 28
def init_params(application_id, affiliate_id)
  @params = Params.new(application_id, affiliate_id)
end
request() click to toggle source
# File lib/rakuten_api/genre_search/client.rb, line 12
def request
  Response.new(get)
end