Project

yt-audit

0.0
No commit activity in last 3 years
No release in over 3 years
A Ruby library you can audit titles or annotations of a Youtube video
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 0.8.20
~> 5.0
~> 0.2.4
~> 12.0
~> 0.9.8

Runtime

>= 0.1.0
>= 1.0.0.beta2
 Project Readme

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"