Sha256: 4f8aac0c68dabfcbf2628475d68f61c1df60360fd092d265722b8c6cf63633f7

Contents?: true

Size: 707 Bytes

Versions: 4

Compression:

Stored size: 707 Bytes

Contents

require 'rakuten_web_service/genre'
require 'rakuten_web_service/ichiba/ranking'
require 'rakuten_web_service/ichiba/product'

module RakutenWebService
  module Ichiba
    class Genre < RakutenWebService::BaseGenre
      endpoint 'https://app.rakuten.co.jp/services/api/IchibaGenre/Search/20120723'

      attribute :genreId, :genreName, :genreLevel, :itemCount

      root_id 0

      def ranking(options={})
        options = options.merge(genre_id: self.id)
        RakutenWebService::Ichiba::RankingItem.search(options)
      end

      def products(options={})
        options = options.merge(:genre_id => self.id)
        RakutenWebService::Ichiba::Product.search(options)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rakuten_web_service-1.4.1 lib/rakuten_web_service/ichiba/genre.rb
rakuten_web_service-1.4.0 lib/rakuten_web_service/ichiba/genre.rb
rakuten_web_service-1.3.0 lib/rakuten_web_service/ichiba/genre.rb
rakuten_web_service-1.2.0 lib/rakuten_web_service/ichiba/genre.rb