Class: KHL::HTTP::Game
Overview
用户动态相关接口-游戏/进程/音乐 developer.kaiheila.cn/doc/http/game
Constant Summary
Constants inherited from Base
Base::API_VERSION, Base::BASE_URL, Base::END_POINT
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#activity(id, data_type) ⇒ KHL::HTTP::Response
添加游戏记录-开始玩.
-
#create(name, options = {}) ⇒ KHL::HTTP::Response
添加游戏.
-
#delete(id) ⇒ KHL::HTTP::Response
删除游戏.
-
#delete_activity ⇒ KHL::HTTP::Response
删除游戏记录-结束玩.
-
#list ⇒ KHL::HTTP::Response
游戏列表.
-
#update(id, options = {}) ⇒ KHL::HTTP::Response
更新游戏.
Methods inherited from Base
#get, #initialize, #post, #post_file
Constructor Details
This class inherits a constructor from KHL::HTTP::Base
Instance Method Details
#activity(id, data_type) ⇒ KHL::HTTP::Response
添加游戏记录-开始玩
48 49 50 |
# File 'lib/khl/http/game.rb', line 48 def activity(id, data_type) post(id: id, data_type: data_type) end |
#create(name, options = {}) ⇒ KHL::HTTP::Response
Note:
本接口有数据插入频率限制,单日最大可创建 5 个游戏数据
添加游戏
23 24 25 |
# File 'lib/khl/http/game.rb', line 23 def create(name, = {}) post(.merge(name: name)) end |
#delete(id) ⇒ KHL::HTTP::Response
删除游戏
40 41 42 |
# File 'lib/khl/http/game.rb', line 40 def delete(id) post(id: id) end |
#delete_activity ⇒ KHL::HTTP::Response
删除游戏记录-结束玩
54 55 56 |
# File 'lib/khl/http/game.rb', line 54 def delete_activity post end |
#list ⇒ KHL::HTTP::Response
游戏列表
12 13 14 |
# File 'lib/khl/http/game.rb', line 12 def list get(action: nil) end |
#update(id, options = {}) ⇒ KHL::HTTP::Response
更新游戏
33 34 35 |
# File 'lib/khl/http/game.rb', line 33 def update(id, = {}) post(.merge(id: id)) end |