class Yt::Collections::ClaimHistories

Provides methods to interact with a the claim history options of a YouTube claim.

Resources with claim history are: {Yt::Models::Claim claims}.

Private Instance Methods

attributes_for_new_item(data) click to toggle source
# File lib/yt/collections/claim_histories.rb, line 13
def attributes_for_new_item(data)
  {data: data, id: @parent.id, auth: @auth}
end
fetch_page(params = {}) click to toggle source

@private @note ClaimHistories overwrites fetch_page since it’s a get.

# File lib/yt/collections/claim_histories.rb, line 28
def fetch_page(params = {})
  response = list_request(params).run
  {items: [response.body], token: nil}
end
list_params() click to toggle source

@return [Hash] the parameters to submit to YouTube to get claim history. @see developers.google.com/youtube/partner/docs/v1/claimHistory/get

Calls superclass method
# File lib/yt/collections/claim_histories.rb, line 19
def list_params
  super.tap do |params|
    params[:path] = "/youtube/partner/v1/claimHistory/#{@parent.id}"
    params[:params] = {on_behalf_of_content_owner: @auth.owner_name}
  end
end