haruna 0.0.2 → 0.0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +7 -0
- data/README.md +5 -1
- data/lib/haruna/api.rb +1 -1
- data/lib/haruna/version.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +3 -2
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Haruna
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/haruna.png)](http://badge.fury.io/rb/haruna)
|
4
|
+
[![Build Status](https://travis-ci.org/kakipo/haruna.png?branch=master)](https://travis-ci.org/kakipo/haruna)
|
5
|
+
|
3
6
|
A Ruby interface to the 艦これ API.
|
4
7
|
|
5
8
|
## Installation
|
@@ -37,7 +40,7 @@ client.req_hokyu_charge(kind, ship_id_arr)
|
|
37
40
|
| ------------- | -------------- | ------------------------------------------ | ---------- |
|
38
41
|
| token | Your API token | "835d2a8f2ca5fea2463248cc6910af96880fc29e" | |
|
39
42
|
| end_point | API endpoint | "http://125.6.189.215" | |
|
40
|
-
| ship_id | Ship's id | 35 |
|
43
|
+
| ship_id | Ship's id | 35 | > 0 |
|
41
44
|
| deck_id | Deck's id | 3 | 1 ~ 4 |
|
42
45
|
| kind | Refill mode - 1: fuel, 2: bullets, 3: fuel + bullets | 3 | 1 ~ 3 |
|
43
46
|
|
@@ -71,6 +74,7 @@ client.user_agent = "Foo Bar"
|
|
71
74
|
|
72
75
|
This software library ("gem") is provided by kakipo "as is" and "with all faults." kakipo makes no representations or warranties of any kind concerning the safety, suitability, inaccuracies, typographical errors, or other harmful components of this gem. There are inherent dangers in the use of any software, and you are solely responsible for determining whether this gem is compatible with your equipment and other software installed on your equipment. You are also solely responsible for the protection of your equipment and backup of your data, and kakipo will not be liable for any damages you may suffer in connection with using, modifying, or distributing this gem.
|
73
76
|
|
77
|
+
Put simply, it's your responsibility to use this gem.
|
74
78
|
Plus, please read and respect [the official terms of use](http://www.dmm.co.jp/rule/=/category=onlinegame_service/).
|
75
79
|
|
76
80
|
## Contributing
|
data/lib/haruna/api.rb
CHANGED
@@ -8,7 +8,7 @@ module Haruna
|
|
8
8
|
proxy: nil,
|
9
9
|
api_ver: 1,
|
10
10
|
user_agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36',
|
11
|
-
referer: '/kcs/port.swf?version=1.5.
|
11
|
+
referer: '/kcs/port.swf?version=1.5.6',
|
12
12
|
accept_enc: 'gzip,deflate,sdch',
|
13
13
|
accept_lang: 'ja,en-US;q=0.8,en;q=0.6',
|
14
14
|
content_type: 'application/x-www-form-urlencoded'
|
data/lib/haruna/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -18,13 +18,13 @@ def create_stub_connection
|
|
18
18
|
"svdata={\"api_result\":1,\"api_result_msg\":\"\\u6210\\u529f\",\"api_data\":{\"api_complatetime\":1387604467275,\"api_complatetime_str\":\"2013-12-21 14:41:07\"}}" ]} # BOM: \xEF\xBB\xBF
|
19
19
|
|
20
20
|
stub.post('/kcsapi/api_req_mission/result') {[ 200, resp_headers,
|
21
|
-
"
|
21
|
+
"" ]}
|
22
22
|
|
23
23
|
stub.post('/kcsapi/api_req_hokyu/charge') {[ 200, resp_headers,
|
24
24
|
"svdata={\"api_result\":1,\"api_result_msg\":\"\\u6210\\u529f\",\"api_data\":{\"api_ship\":[{\"api_id\":54,\"api_fuel\":15,\"api_bull\":15,\"api_onslot\":[0,0,0,0,0]},{\"api_id\":78,\"api_fuel\":15,\"api_bull\":15,\"api_onslot\":[0,0,0,0,0]},{\"api_id\":71,\"api_fuel\":15,\"api_bull\":15,\"api_onslot\":[0,0,0,0,0]},{\"api_id\":50,\"api_fuel\":15,\"api_bull\":15,\"api_onslot\":[0,0,0,0,0]}],\"api_material\":[2938,5864,4151,3933],\"api_use_bou\":0}}" ]}
|
25
25
|
|
26
26
|
stub.post('/kcsapi/api_get_member/deck_port') {[ 200, resp_headers,
|
27
|
-
"svdata={\"api_result\":1,\"api_result_msg\":\"\\u6210\\u529f\",\"api_data\":[{\"api_member_id\":15010331,\"api_id\":1,\"api_name\":\"First\",\"api_name_id\":\"\",\"api_mission\":[0,0,0,0],\"api_flagship\":\"0\",\"api_ship\":[
|
27
|
+
"svdata={\"api_result\":1,\"api_result_msg\":\"\\u6210\\u529f\",\"api_data\":[{\"api_member_id\":15010331,\"api_id\":1,\"api_name\":\"First\",\"api_name_id\":\"\",\"api_mission\":[0,0,0,0],\"api_flagship\":\"0\",\"api_ship\":[177,227,276,31,30,109]},{\"api_member_id\":15010331,\"api_id\":2,\"api_name\":\"Second\",\"api_name_id\":\"\",\"api_mission\":[0,0,0,0],\"api_flagship\":\"0\",\"api_ship\":[150,66,57,83,-1,-1]},{\"api_member_id\":15010331,\"api_id\":3,\"api_name\":\"Third\",\"api_name_id\":\"\",\"api_mission\":[2,9,1387822430036,0],\"api_flagship\":\"0\",\"api_ship\":[54,78,71,193,-1,-1]},{\"api_member_id\":15010331,\"api_id\":4,\"api_name\":\"Fourth\",\"api_name_id\":\"\",\"api_mission\":[2,12,1387840275830,0],\"api_flagship\":\"0\",\"api_ship\":[50,82,210,164,-1,-1]}]}" ]}
|
28
28
|
|
29
29
|
end
|
30
30
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haruna
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.2
|
4
|
+
version: 0.0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-12-
|
12
|
+
date: 2013-12-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- .gitignore
|
102
102
|
- .rspec
|
103
103
|
- .ruby-version
|
104
|
+
- .travis.yml
|
104
105
|
- Gemfile
|
105
106
|
- LICENSE.txt
|
106
107
|
- README.md
|