class RakutenWebService::Recipe

Public Class Methods

categories(category_type) click to toggle source
# File lib/rakuten_web_service/recipe/category.rb, line 18
def self.categories(category_type)
  @categories ||= {}
  @categories[category_type] ||= Category.search(category_type: category_type).response['result'][category_type].map do |category|
    Category.new(category.merge(categoryType: category_type))
  end
end
large_categories() click to toggle source
# File lib/rakuten_web_service/recipe/category.rb, line 6
def self.large_categories
  categories('large')
end
medium_categories() click to toggle source
# File lib/rakuten_web_service/recipe/category.rb, line 10
def self.medium_categories
  categories('medium')
end
ranking(category_id = nil) click to toggle source
# File lib/rakuten_web_service/recipe.rb, line 22
def self.ranking(category_id = nil)
  params = {}
  params = params.merge(category_id: category_id) unless category_id.nil?
  search(params)
end
small_categories() click to toggle source
# File lib/rakuten_web_service/recipe/category.rb, line 14
def self.small_categories
  categories('small')
end