Class: Bilibili::Fav
- Inherits:
-
BilibiliBase
- Object
- BilibiliBase
- Bilibili::Fav
- Defined in:
- lib/bilibili_console/fav.rb
Overview
bilibili video interfaces
Instance Attribute Summary
Attributes inherited from BilibiliBase
Instance Method Summary collapse
-
#list_fav_video(options) ⇒ Object
list user fav folder videos by page.
-
#list_user_fav_video(user_info) ⇒ Object
list user fav folders.
Methods inherited from BilibiliBase
#clean_cookie, #initialize, #load_cookie, #save_cookie
Constructor Details
This class inherits a constructor from Bilibili::BilibiliBase
Instance Method Details
#list_fav_video(options) ⇒ Object
list user fav folder videos by page
142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/bilibili_console/fav.rb', line 142 def list_fav_video() [:page_num] = 1 if [:page_num].nil? [:page_size] = 10 if [:page_size].nil? [:all] = 1 if [:all].nil? unless [:search].nil? [:search] = "&keyword=#{CGI.escape([:search])}&order=mtime&type=#{[:all]}&tid=0&jsonp=jsonp" end url = "#{Api::Fav::FAV_VIDEO_LIST}?media_id=#{[:fav]}&pn=#{[:page_num]}&ps=#{[:page_size]}#{[:search]}&platform=web" data = get_jsona(url) Bilibili::FavResourceList.new(data) end |