shangrila 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/lib/shangrila/sana.rb +5 -5
- data/lib/shangrila/version.rb +1 -1
- data/lib/shangrila.rb +1 -0
- 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: 19441a8f33bc83788cb5c05bfe7cf857d4f400e6
|
4
|
+
data.tar.gz: 02aa7cdcba537f3dcd756bf4d0655a8998520a49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2940f90190ad02519868a178722fc4621f06f062de9d77cffc7d50b07dda62b49c461057c18e68ff347277085200ff09d5239ec5482adc4a4fabeb4ebeee2a2d
|
7
|
+
data.tar.gz: 134059e4689d06e268c5f221ed1661353f9568ef5058d4c53c23e37e300b82fdf0c4b57663f8367cd10db919f7deb45a96198a0f239b93f70c522cfae6ea8829
|
data/README.md
CHANGED
@@ -42,9 +42,11 @@ or Gemfile
|
|
42
42
|
|
43
43
|
#### Get Twitter Follower Status
|
44
44
|
|
45
|
-
```Shangrila::
|
45
|
+
```Shangrila::Sana.new().follower_status(['usagi_anime','kinmosa_anime','aldnoahzero'])```
|
46
46
|
|
47
47
|
|
48
48
|
#### Get Twitter Follower History
|
49
49
|
|
50
|
-
```Shangrila::
|
50
|
+
```Shangrila::Sana.new().follower_history(usagi_anime)```
|
51
|
+
|
52
|
+
```Shangrila::Sana.new().follower_history(usagi_anime, 1446721206)```
|
data/lib/shangrila/sana.rb
CHANGED
@@ -13,20 +13,20 @@ module Shangrila
|
|
13
13
|
|
14
14
|
# @param [Array] accounts データ取得対象のアニメTwitter公式アカウント
|
15
15
|
# @return [Hash] アカウント群をキーとしたハッシュ
|
16
|
-
def
|
17
|
-
response = HTTPClient.get(sprintf('/
|
16
|
+
def follower_status(accounts)
|
17
|
+
response = HTTPClient.get(sprintf('/follower_status&accounts=%s', URL, accounts.join(',')))
|
18
18
|
JSON.load(response.body)
|
19
19
|
end
|
20
20
|
|
21
21
|
# @param [Array] account データ取得対象のアニメTwitter公式アカウント
|
22
22
|
# @param [int] end_date 検索対象の終了日時 where update_at < end_date)
|
23
23
|
# @return [Array] フォロワー数と更新日時のハッシュの配列
|
24
|
-
def
|
24
|
+
def follower_history(account, end_date = nil)
|
25
25
|
response = nil
|
26
26
|
if end_date.nil?
|
27
|
-
response = HTTPClient.get(sprintf('/
|
27
|
+
response = HTTPClient.get(sprintf('/follower_history&account=%s', URL, account))
|
28
28
|
else
|
29
|
-
response = HTTPClient.get(sprintf('/
|
29
|
+
response = HTTPClient.get(sprintf('/follower_history&account=%s&end_date=%d', URL, account, end_date))
|
30
30
|
end
|
31
31
|
|
32
32
|
JSON.load(response.body)
|
data/lib/shangrila/version.rb
CHANGED
data/lib/shangrila.rb
CHANGED