Sha256: 0b55bc721a2d2ff0912e9fd2bb888f0002041fd47149f3d8b8c2d870e7d16876
Contents?: true
Size: 827 Bytes
Versions: 5
Compression:
Stored size: 827 Bytes
Contents
# frozen_string_literal: true 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 = params.merge(category_id: category_id) unless category_id.nil? search(params) end class << self protected :search end end end
Version data entries
5 entries across 5 versions & 1 rubygems