Class: Youku::V2::Searches::Video

Inherits:
Base
  • Object
show all
Defined in:
lib/youku/v2/searches.rb

Constant Summary collapse

BASE_URI =
"#{BASE_URI}/searches/video"

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Instance Method Details

#by_keyword(keyword, period: 'week', orderby: 'published', page: 1, count: 20) ⇒ Object

Public: Get videos by keyword.

See: open.youku.com/docs?id=81

keyword - The space separated String of keywords. period - The String period. orderby - The String order of videos. page - The Integer page number. count - The Integer page size.

Returns the instance of Youku::V2::Request.



26
27
28
29
30
31
32
33
34
35
# File 'lib/youku/v2/searches.rb', line 26

def by_keyword(keyword, period: 'week', orderby: 'published', page: 1, count: 20)
  Youku::V2::Request.new "#{BASE_URI}/by_keyword.json", {
    client_id: client.client_id,
    keyword:   keyword,
    period:    period,
    orderby:   orderby,
    page:      page,
    count:     count
  }
end