Class: YouTubeIt
- Inherits:
-
Object
- Object
- YouTubeIt
- Defined in:
- lib/youtube_it/model/video.rb,
lib/youtube_it.rb,
lib/youtube_it/client.rb,
lib/youtube_it/parser.rb,
lib/youtube_it/record.rb,
lib/youtube_it/version.rb,
lib/youtube_it/model/user.rb,
lib/youtube_it/model/author.rb,
lib/youtube_it/model/rating.rb,
lib/youtube_it/model/comment.rb,
lib/youtube_it/model/contact.rb,
lib/youtube_it/model/content.rb,
lib/youtube_it/model/category.rb,
lib/youtube_it/model/playlist.rb,
lib/youtube_it/model/thumbnail.rb,
lib/youtube_it/model/subscription.rb,
lib/youtube_it/request/base_search.rb,
lib/youtube_it/request/user_search.rb,
lib/youtube_it/request/video_search.rb,
lib/youtube_it/request/video_upload.rb,
lib/youtube_it/response/video_search.rb,
lib/youtube_it/request/standard_search.rb
Overview
TODO
* self atom feed
* alternate youtube watch url
* comments feedLink
Defined Under Namespace
Modules: Logging, Model, Parser, Request, Response, Upload Classes: AuthSubClient, ChainIO, Client, Error, GreedyChainIO, OAuthClient, Record
Constant Summary collapse
- VERSION =
File.read(File.('../../../VERSION', __FILE__))
Class Method Summary collapse
-
.esc(s) ⇒ Object
URL-escape a string.
-
.logger ⇒ Object
Get the logger for the library (by default will log to STDOUT).
-
.logger=(any_logger) ⇒ Object
Set the logger for the library.
Class Method Details
.esc(s) ⇒ Object
URL-escape a string. Stolen from Camping (wonder how many Ruby libs in the wild can say the same)
17 18 19 |
# File 'lib/youtube_it.rb', line 17 def self.esc(s) #:nodoc: s.to_s.gsub(/[^ \w.-]+/n){'%'+($&.unpack('H2'*$&.size)*'%').upcase}.tr(' ', '+') end |
.logger ⇒ Object
Get the logger for the library (by default will log to STDOUT). TODO: this is where we grab the Rails logger too
27 28 29 |
# File 'lib/youtube_it.rb', line 27 def self.logger @logger ||= create_default_logger end |
.logger=(any_logger) ⇒ Object
Set the logger for the library
22 23 24 |
# File 'lib/youtube_it.rb', line 22 def self.logger=(any_logger) @logger = any_logger end |