splapi 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -0
- data/lib/splapi/resource_based_methods.rb +17 -0
- data/lib/splapi/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f8dc820a09a09652b744b4a777e6edad3e63417
|
4
|
+
data.tar.gz: e720fe2e0c8619ee7ae4dccb1500b76f6e73ae39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6ce149ad49975cb7b4aa69891eeb0bda5418df576bd744bbc20eef32a1c1daf83f92d1165ea9157674f584a24286a986eaa5cac12ddf93398cf487aa6071b2d
|
7
|
+
data.tar.gz: 6290465efc8d72ae45a758e371fae35d9a46f93939e55e7fef142e2f835f0698e7f0c35733c2022ce7e0d593ed5ab18caeb99eca0eca0ac897d2c2dc4bb943ac
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# [SplAPI](http://splapi.retrorocket.biz)
|
2
2
|
|
3
3
|
[splapi - スプラトゥーンのステージ情報がとれるやつ](http://docs.splapi.apiary.io/)のRuby実装のClient gem。
|
4
|
+
各APIのパラメーターは上記の公式リファレンスを参照してください。
|
4
5
|
|
5
6
|
## Installation
|
6
7
|
|
@@ -23,9 +24,36 @@ Or install it yourself as:
|
|
23
24
|
require 'splapi'
|
24
25
|
|
25
26
|
client = SplAPI::Client.new
|
27
|
+
|
28
|
+
|
29
|
+
res = client.gachi_now
|
30
|
+
res.body
|
31
|
+
# => {"result"=>
|
32
|
+
# [{"maps"=>["マサバ海峡大橋", "マヒマヒリゾート&スパ"],
|
33
|
+
# "rule"=>"ガチエリア",
|
34
|
+
# "end"=>"2016-03-04T23:00:00",
|
35
|
+
# "start"=>"2016-03-04T19:00:00"}]}
|
36
|
+
|
26
37
|
res = client.gachi_rules
|
27
38
|
res.body['rules']
|
28
39
|
# => ["ガチエリア", "ガチホコ", "ガチヤグラ"]
|
40
|
+
|
41
|
+
res = client.weapons
|
42
|
+
res.body['weapons']
|
43
|
+
# => [".52ガロン",
|
44
|
+
# ".52ガロンデコ",
|
45
|
+
# ".96ガロン",
|
46
|
+
# ".96ガロンデコ",
|
47
|
+
# "14式竹筒銃・乙",
|
48
|
+
# .
|
49
|
+
# .
|
50
|
+
# .
|
51
|
+
# ]
|
52
|
+
|
53
|
+
# Other examples
|
54
|
+
client.gachi(date: '2015-08-31T03:00:00', to: '2015-09-03T19:00:00', rule: 'ガチヤグラ,ガチホコ', map: 'シオノメ油田,ハコフグ倉庫')
|
55
|
+
client.fes(team: 'ボケ')
|
56
|
+
|
29
57
|
```
|
30
58
|
|
31
59
|
|
@@ -16,6 +16,15 @@ module SplAPI
|
|
16
16
|
get('gachi/next_all', params, headers)
|
17
17
|
end
|
18
18
|
|
19
|
+
def gachi_prev(params = nil, headers = nil)
|
20
|
+
get('gachi/prev', params, headers)
|
21
|
+
end
|
22
|
+
|
23
|
+
def gachi_prev_all(params = nil, headers = nil)
|
24
|
+
get('gachi/prev_all', params, headers)
|
25
|
+
end
|
26
|
+
|
27
|
+
|
19
28
|
def gachi_rules(params = nil, headers = nil)
|
20
29
|
get('gachi/rules', params, headers)
|
21
30
|
end
|
@@ -36,6 +45,14 @@ module SplAPI
|
|
36
45
|
get('regular/next_all', params, headers)
|
37
46
|
end
|
38
47
|
|
48
|
+
def regular_prev(params = nil, headers = nil)
|
49
|
+
get('regular/prev', params, headers)
|
50
|
+
end
|
51
|
+
|
52
|
+
def regular_prev_all(params = nil, headers = nil)
|
53
|
+
get('regular/prev_all', params, headers)
|
54
|
+
end
|
55
|
+
|
39
56
|
def fes(params = nil, headers = nil)
|
40
57
|
get('fes', params, headers)
|
41
58
|
end
|
data/lib/splapi/version.rb
CHANGED