Class: Youku::Client
- Inherits:
-
Object
- Object
- Youku::Client
- Defined in:
- lib/youku/client.rb
Constant Summary collapse
- BASE_URI =
'https://openapi.youku.com'
Instance Attribute Summary collapse
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
readonly
Returns the value of attribute client_secret.
Instance Method Summary collapse
-
#comments ⇒ Object
Public: Get users API.
-
#initialize(client_id: nil, client_secret: nil) ⇒ Client
constructor
Public: Constructor.
-
#searches ⇒ Object
Public: Get searches API.
-
#users ⇒ Object
Public: Get users API.
-
#videos ⇒ Object
Public: Get videos API.
Constructor Details
#initialize(client_id: nil, client_secret: nil) ⇒ Client
Public: Constructor.
client_id - The String Youku client ID. client_secret - The String Youku secret key.
11 12 13 14 |
# File 'lib/youku/client.rb', line 11 def initialize(client_id: nil, client_secret: nil) @client_id = client_id @client_secret = client_secret end |
Instance Attribute Details
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
5 6 7 |
# File 'lib/youku/client.rb', line 5 def client_id @client_id end |
#client_secret ⇒ Object (readonly)
Returns the value of attribute client_secret.
5 6 7 |
# File 'lib/youku/client.rb', line 5 def client_secret @client_secret end |
Instance Method Details
#comments ⇒ Object
Public: Get users API.
Returns the instance of Youku::V2::Users.
40 41 42 |
# File 'lib/youku/client.rb', line 40 def comments Youku::V2::Comments.new(self) end |
#searches ⇒ Object
Public: Get searches API.
Returns the instance of Youku::V2::Searches.
19 20 21 |
# File 'lib/youku/client.rb', line 19 def searches Youku::V2::Searches.new(self) end |