<commit_before>require 'will_paginate/collection'

module Amazon
  module Associates
    class Item < ApiResult
      xml_name 'Item'

      xml_reader :asin, :from => 'ASIN'
      xml_reader :detail_page_url
      xml_reader :list_price, :as => Price, :in => 'xmlns:ItemAttributes'
      xml_reader :attributes, :as => {:key => :name,
                                      :value => :content}, :in => 'xmlns:ItemAttributes'
      xml_reader :small_image, :as => Image
      xml_reader :medium_image, :as => Image
      #TODO: would be nice to have :key => '@category' and :value => {[Image] => 'SwatchImage'}
      xml_reader :image_sets, :as => [ImageSet] do |sets|
        sets.index_by(&:category)
      end
      xml_reader :listmania_lists, :as => [ListmaniaList]
      xml_reader :browse_nodes, :as => [BrowseNode]
      xml_reader :offers, :as => [Offer]
      # TODO: This should be offers.total_new
      xml_reader :total_new_offers, :from => 'TotalNew', :in => 'xmlns:OfferSummary', :as => Integer
      # TODO: This should be offers.total
      xml_reader :total_offers, :in => 'xmlns:Offers', :as => Integer

      xml_reader :creators, :as => {:key => '@Role', :value => :content}, :in => 'xmlns:ItemAttributes'
      xml_reader :authors, :as => [], :in => 'xmlns:ItemAttributes'<commit_msg>Update reference to Item#detail_page_url<commit_after>require 'will_paginate/collection'

module Amazon
  module Associates
    class Item < ApiResult
      xml_name 'Item'

      xml_reader :asin, :from => 'ASIN'
      xml_reader :detail_page_url, :from => 'DetailPageURL'
      xml_reader :list_price, :as => Price, :in => 'xmlns:ItemAttributes'
      xml_reader :attributes, :as => {:key => :name,
                                      :value => :content}, :in => 'xmlns:ItemAttributes'
      xml_reader :small_image, :as => Image
      xml_reader :medium_image, :as => Image
      #TODO: would be nice to have :key => '@category' and :value => {[Image] => 'SwatchImage'}
      xml_reader :image_sets, :as => [ImageSet] do |sets|
        sets.index_by(&:category)
      end
      xml_reader :listmania_lists, :as => [ListmaniaList]
      xml_reader :browse_nodes, :as => [BrowseNode]
      xml_reader :offers, :as => [Offer]
      # TODO: This should be offers.total_new
      xml_reader :total_new_offers, :from => 'TotalNew', :in => 'xmlns:OfferSummary', :as => Integer
      # TODO: This should be offers.total
      xml_reader :total_offers, :in => 'xmlns:Offers', :as => Integer

      xml_reader :creators, :as => {:key => '@Role', :value => :content}, :in => 'xmlns:ItemAttributes'
      xml_reader :authors, :as => [], :in => 'xmlns:ItemAttributes'
{'fraction_non_alphanumeric': 0.14596622889305816, 'fraction_numerical': 0.0, 'mean_word_length': 3.211690363349131, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 58, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 42}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2997172', 'n_tokens_mistral': 869, 'n_tokens_neox': 854, 'n_words': 224}