Sha256: fc5489278b7a2724979e5b89d636c455f501aeb1d42b6852485dfa8323e87885

Contents?: true

Size: 640 Bytes

Versions: 1

Compression:

Stored size: 640 Bytes

Contents

# frozen_string_literal: true

require 'rakuten_web_service/resource'

module RakutenWebService
  module Ichiba
    class TagGroup < Resource
      endpoint 'https://app.rakuten.co.jp/services/api/IchibaTag/Search/20140222'

      set_parser do |response|
        response['tagGroups'].map { |tag_group| TagGroup.new(tag_group) }
      end

      attribute :tagGroupName, :tagGroupId

      def tags
        get_attribute('tags').map do |tag|
          Tag.new(
            'tagId' => tag['tagId'],
            'tagName' => tag['tagName'],
            'parentTagId' => tag['parentTagId']
          )
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rakuten_web_service-1.12.0 lib/rakuten_web_service/ichiba/tag_group.rb