Class: Yourub::Client
- Inherits:
-
Google::APIClient
- Object
- Google::APIClient
- Yourub::Client
- Includes:
- REST::API
- Defined in:
- lib/yourub/client.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#videos ⇒ Object
readonly
Returns the value of attribute videos.
Instance Method Summary collapse
- #countries ⇒ Object
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #youtube_api ⇒ Object
Methods included from REST::Search
#add_video_to_search_result, #consume_categories, #consume_criteria, #get_categories_for_country, #get_details_and_store, #get_views, #merge_criteria_with_api_options, #parse_name, #retrieve_categories, #retrieve_videos, #search, #search_by_criteria, #search_by_id, #search_list_request, #send_request, #video_categories_list_request, #video_params, #videos_list_request
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 17 18 19 |
# File 'lib/yourub/client.rb', line 11 def initialize() args = { :key => config.developer_key, :application_name => config.application_name, :application_version => config.application_version, :authorization => nil } super(args) end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
9 10 11 |
# File 'lib/yourub/client.rb', line 9 def config @config end |
#videos ⇒ Object (readonly)
Returns the value of attribute videos.
8 9 10 |
# File 'lib/yourub/client.rb', line 8 def videos @videos end |
Instance Method Details
#countries ⇒ Object
25 26 27 |
# File 'lib/yourub/client.rb', line 25 def countries Yourub::Validator.available_countries end |
#youtube_api ⇒ Object
29 30 31 32 |
# File 'lib/yourub/client.rb', line 29 def youtube_api @youtube_api ||= self.discovered_api(config.youtube_api_service_name, config.youtube_api_version) end |