Class: Yt::Models::ClaimEvent

Inherits:
Base
  • Object
show all
Defined in:
lib/yt/models/claim_event.rb

Constant Summary collapse

REASONS =
%w(asset_transfer_request audio_muted audio_replaced audioswap_removed
channel_transferred channel_whitelisted closed_audio_claim_on_visual_reference
closed_audio_revshare closed_by_admin closed_cover_revshare
closed_invalid_reference_segment closed_manually closed_partner_exclusion
closed_private_video closed_reference_conflict copyrighted_content_matched
counter_received dispute_resolution duplicate invalid_claim muting_audio
ownership_removed partner_deactivated pending_activation pending_adsense
pending_fingerprint pending_for_review reference_removed released replaced
review_expired revshare_disabled risk_of_error song_erased
suspended_monetization_on_channel video_classifier_rejecion video_content_modified
video_removed video_taken_down)

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ClaimEvent

Returns a new instance of ClaimEvent.



6
7
8
# File 'lib/yt/models/claim_event.rb', line 6

def initialize(options = {})
  @data = options[:data]
end

Instance Method Details

#dispute_notesString

Returns a free-text explanation of the reason that a claim was disputed. This property is returned for dispute_create events.

Returns:

  • (String)

    a free-text explanation of the reason that a claim was disputed. This property is returned for dispute_create events.



56
57
58
# File 'lib/yt/models/claim_event.rb', line 56

has_attribute :dispute_notes, from: :type_details do |type_details|
  (type_details || {})['disputeNotes']
end

#dispute_reasonString

Returns the reason that explains why a dispute_create event occurred.

Returns:

  • (String)

    the reason that explains why a dispute_create event occurred.



50
51
52
# File 'lib/yt/models/claim_event.rb', line 50

has_attribute :dispute_reason, from: :type_details do |type_details|
  (type_details || {})['disputeReason']
end

#reasonString

Returns the reason an event occurred.

Returns:

  • (String)

    the reason an event occurred.



26
# File 'lib/yt/models/claim_event.rb', line 26

has_attribute :reason

#source_content_owner_idString

Returns the ID of the content owner that initiated the event.

Returns:

  • (String)

    the ID of the content owner that initiated the event.



38
39
40
# File 'lib/yt/models/claim_event.rb', line 38

has_attribute :source_content_owner_id, from: :source do |source|
  (source || {})['contentOwnerId']
end

#source_typeString

Returns the source type which triggered the event.

Returns:

  • (String)

    the source type which triggered the event.



32
33
34
# File 'lib/yt/models/claim_event.rb', line 32

has_attribute :source_type, from: :source do |source|
  (source || {})['type']
end

#source_user_emailString

Returns the email address of the user who initiated the event.

Returns:

  • (String)

    the email address of the user who initiated the event.



44
45
46
# File 'lib/yt/models/claim_event.rb', line 44

has_attribute :source_user_email, from: :source do |source|
  (source || {})['userEmail']
end

#timeTime

Returns the date and time when the event occurred.

Returns:

  • (Time)

    the date and time when the event occurred.



23
# File 'lib/yt/models/claim_event.rb', line 23

has_attribute :time, type: Time

#typeString

Returns the event’s type.

Returns:

  • (String)

    the event’s type.



29
# File 'lib/yt/models/claim_event.rb', line 29

has_attribute :type

#update_statusString

Returns the event status that resulted from a claim_update event.

Returns:

  • (String)

    the event status that resulted from a claim_update event.



62
63
64
# File 'lib/yt/models/claim_event.rb', line 62

has_attribute :update_status, from: :type_details do |type_details|
  (type_details || {})['updateStatus']
end