Sha256: 67771974407bfbad759ec9bdf6d6b6386937a332104756710b604226a99e37fd
Contents?: true
Size: 793 Bytes
Versions: 1
Compression:
Stored size: 793 Bytes
Contents
require 'rakuten_web_service/configuration' require 'rakuten_web_service/recipe/category' module RakutenWebService class Recipe < Resource endpoint 'https://app.rakuten.co.jp/services/api/Recipe/CategoryRanking/20170426' attribute :recipeId, :recipeTitle, :recipeUrl, :foodImageUrl, :mediumImageUrl, :smallImageUrl, :pickup, :shop, :nickname, :recipeDescription, :recipeMaterial, :recipeIndication, :recipeCost, :recipePublishday, :rank set_parser do |response| response['result'].map { |r| Recipe.new(r) } end def self.ranking(category_id = nil) params = {} params.merge!(category_id: category_id) unless category_id.nil? self.search(params) end class << self protected :search end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rakuten_web_service-1.9.0 | lib/rakuten_web_service/recipe.rb |