Sha256: add201f2418c9de8a2c992596bae6b5106942a29fcced4bfc53ece00c6a5e23f

Contents?: true

Size: 551 Bytes

Versions: 14

Compression:

Stored size: 551 Bytes

Contents

require 'yt/video_audit/base'

module Yt
  module VideoAudit
    # Count how many subject videos have an annotation
    # with a subscribe link.
    class SubscribeAnnotation < Base
      def title
        'Subscribe Annotations'
      end

      def description
        'The number of videos with a link to subscribe in its annotations'
      end

    private

      def valid?(video)
        Yt::Annotations.for(video.id).any? do |annotation|
          annotation.link && annotation.link[:type] == :subscribe
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
yt-audit-0.6.0 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.5.5 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.5.4 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.5.3 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.5.2 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.5.1 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.5.0 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.4.0 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.3.2 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.3.1 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.3.0 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.2.2 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.2.1 lib/yt/video_audit/subscribe_annotation.rb
yt-audit-0.2.0 lib/yt/video_audit/subscribe_annotation.rb