class Member
Attributes
approve[RW]
article[RW]
attention[RW]
attentions[RW]
birthday[RW]
coins[RW]
current_exp[RW]
current_level[RW]
current_min[RW]
description[RW]
displayRank[RW]
face[RW]
fansCount[RW]
friend[RW]
mid[RW]
name[RW]
next_exp[RW]
place[RW]
rank[RW]
regtime[RW]
sex[RW]
sign[RW]
spacesta[RW]
Public Class Methods
member_with_JSON(json)
click to toggle source
# File lib/bilibili.rb, line 55 def Member.member_with_JSON(json) data = json['data'] user = Member.new user.mid = data['mid'] user.name = data['name'] user.approve = data['approve'] user.sex = data['sex'] user.rank = data['rank'] user.face = data['face'] user.coins = data['coins'] user.displayRank = data['displayRank'] user.regtime = data['regtime'] user.spacesta = data['spacesta'] user.birthday = data['birthday'] user.place = data['place'] user.description = data['description'] user.article = data['article'] user.attentions = data['attentions'] user.fansCount = data['fans'] user.friend = data['friend'] user.attention = data['attention'] user.sign = data['sign'] user.current_level = data['level_info']['current_level'] user.current_min = data['level_info']['current_min'] user.current_exp = data['level_info']['current_exp'] user.next_exp = data['level_info']['next_exp'] user end
Public Instance Methods
attentionList()
click to toggle source
关注列表
# File lib/bilibili.rb, line 115 def attentionList response = Net::HTTP.new(K_BILIBILI_API_SPACE_URL).get(K_BILIBILI_API_SPACE_ATTENTION_LIST + @mid) JSON.parse(response.body) end
coinVideos()
click to toggle source
投过币的视频
# File lib/bilibili.rb, line 109 def coinVideos response = Net::HTTP.new(K_BILIBILI_API_SPACE_URL).get(K_BILIBILI_API_SPACE_COINVIDEO_QUERY + @mid) JSON.parse(response.body) end
collectionList()
click to toggle source
我的收藏
# File lib/bilibili.rb, line 91 def collectionList response = Net::HTTP.new(K_BILIBILI_API_SPACE_URL).get(K_BILIBILI_API_SPACE_BOX_LIST + @mid) JSON.parse(response.body) end
fans()
click to toggle source
粉丝
# File lib/bilibili.rb, line 121 def fans response = Net::HTTP.new(K_BILIBILI_API_SPACE_URL).get(K_BILIBILI_API_SPACE_FANS_QUERY + @mid) JSON.parse(response.body) end
submitVideos(tid = 0)
click to toggle source
投稿视频
# File lib/bilibili.rb, line 85 def submitVideos(tid = 0) response = Net::HTTP.new(K_BILIBILI_API_SPACE_URL).get(K_BILIBILI_API_SPACE_SUBMITVIDEOS + @mid + "&tid=" + tid.to_s) JSON.parse(response.body) end
subscribeList()
click to toggle source
订阅番剧
# File lib/bilibili.rb, line 97 def subscribeList response = Net::HTTP.new(K_BILIBILI_API_SPACE_URL).get(K_BILIBILI_API_SPACE_SUBSCRIBE_QUERY + @mid) JSON.parse(response.body) end
subscribeTags()
click to toggle source
订阅标签
# File lib/bilibili.rb, line 103 def subscribeTags response = Net::HTTP.new(K_BILIBILI_API_SPACE_URL).get(K_BILIBILI_API_SPACE_SUBSCRIBE_TAGS_QUERY + @mid) JSON.parse(response.body) end