Skip to content
No description or website provided.
Ruby Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib/yt Remove InvideoProgramming Jan 29, 2018
test
.gitignore Edit .gemspec file to gem-build Feb 9, 2016
.travis.yml Send emails to us Aug 15, 2019
CHANGELOG.md
Gemfile
MIT-LICENSE
README.md
Rakefile Audit info cards and brand anchoring for a video Feb 8, 2016
yt-audit.gemspec

README.md

Yt::Audit

Welcome! This is a Ruby library you can audit best practices of a YouTube channel.

The source code is available on GitHub and the documentation on RubyDoc.

Build Status Coverage Status Dependency Status Code Climate Online docs Gem Version

Development

$ bin/setup

$ YT_SERVER_API_KEY="123456789012345678901234567890123456789" rake
$ open coverage/index.html

$ yardoc
$ open doc/index.html

Usage

run method returns an array of objects. Yt::Audit should be initialized with a Yt::Channel object of yt as channel.

It can also have videos, brand name, and playlists as optional, but by default it uses maximum 10 recent videos of channel as videos, channel title as brand and maximum 10 recent playlists as playlists keyword argument.

channel = Yt::Channel.new(id: 'UCPCk_8dtVyR1lLHMBEILW4g')
audit = Yt::Audit.new(channel: channel)
# => #<Yt::Audit:0x007ffbb43fe780 @channel=#<Yt::Models::Channel...>, @videos=[...], @playlists=[...], @brand="budweiser">
audit.run
# => [#<Yt::VideoAudit::InfoCard:0x007f94ec8c6f30 @videos=[...]>, #<Yt::VideoAudit::BrandAnchoring...>, #<Yt::VideoAudit::SubscribeAnnotation...>, #<Yt::VideoAudit::YoutubeAssociation...>, #<Yt::VideoAudit::EndCard...>, #<Yt::PlaylistAudit::Description...>]

You can call four available methods total_count, valid_count, title, and description from each Yt::VideoAudit or Yt::PlaylistAudit object.

audit_item = audit.run[0]
# => #<Yt::VideoAudit::InfoCard:0x007f94ec979ab8 @videos=[...]>
audit_item.total_count
# => 10
audit_item.valid_count
# => 10
audit_item.title
# => "Info Cards"
audit_item.description
# => "The number of videos with an info card"
You can’t perform that action at this time.