Sha256: 7f35a94da362b469b72e92d3470c4dff2df494ccac8074f6ccc4115364049ba6

Contents?: true

Size: 575 Bytes

Versions: 5

Compression:

Stored size: 575 Bytes

Contents

# frozen_string_literal: true

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: id)
        resource = Books::Resource.find_resource_by_genre_id(id)
        resource.search(params)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rakuten_web_service-1.12.0 lib/rakuten_web_service/books/genre.rb
rakuten_web_service-1.11.0 lib/rakuten_web_service/books/genre.rb
rakuten_web_service-1.10.0 lib/rakuten_web_service/books/genre.rb
rakuten_web_service-1.9.2 lib/rakuten_web_service/books/genre.rb
rakuten_web_service-1.9.1 lib/rakuten_web_service/books/genre.rb