Sha256: 151d4cc1d8dbd199eeea0f0cb4992993984b922d4af16a5e391a0ee94997c370

Contents?: true

Size: 552 Bytes

Versions: 7

Compression:

Stored size: 552 Bytes

Contents

require 'rakuten_web_service/genre'

module RakutenWebService
  module Books
    class Genre < RakutenWebService::BaseGenre
      set_resource_name 'books_genre'

      endpoint 'https://app.rakuten.co.jp/services/api/BooksGenre/Search/20121128'

      attribute :booksGenreId, :booksGenreName, :genreLevel, :itemCount

      root_id '000'

      def search(params={})
        params = params.merge(booksGenreId: self.id)
        resource = Books::Resource.find_resource_by_genre_id(self.id)
        resource.search(params)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rakuten_web_service-1.9.0 lib/rakuten_web_service/books/genre.rb
rakuten_web_service-1.8.0 lib/rakuten_web_service/books/genre.rb
rakuten_web_service-1.7.0 lib/rakuten_web_service/books/genre.rb
rakuten_web_service-1.6.1 lib/rakuten_web_service/books/genre.rb
rakuten_web_service-1.6.0 lib/rakuten_web_service/books/genre.rb
rakuten_web_service-1.5.0 lib/rakuten_web_service/books/genre.rb
rakuten_web_service-1.4.2 lib/rakuten_web_service/books/genre.rb