Sha256: 370f28a0aa73748a6b3243f7c3cba72f8bffa4880c35e8e8cc4a46447d3709c3

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

Contents

require 'yt/core'
require 'yt/annotations'
require 'yt/url'
require 'yt/video_audit/info_card'
require 'yt/video_audit/brand_anchoring'
require 'yt/video_audit/subscribe_annotation'
require 'yt/video_audit/youtube_association'
require 'yt/video_audit/end_card'
require 'yt/playlist_audit/description'

module Yt
  class Audit
    def initialize(channel:, videos: nil, playlists: nil, brand: nil)
      @channel = channel
      @videos = videos || channel.videos.select(:snippet).first(10)
      @playlists = playlists || channel.playlists.first(10)
      @brand = brand || channel.title
    end

    def run
      [
        Yt::VideoAudit::InfoCard.new(videos: @videos),
        Yt::VideoAudit::BrandAnchoring.new(videos: @videos, brand: @brand),
        Yt::VideoAudit::SubscribeAnnotation.new(videos: @videos),
        Yt::VideoAudit::YoutubeAssociation.new(videos: @videos),
        Yt::VideoAudit::EndCard.new(videos: @videos),
        Yt::PlaylistAudit::Description.new(playlists: @playlists)
      ]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yt-audit-0.5.1 lib/yt/audit.rb
yt-audit-0.5.0 lib/yt/audit.rb