shangrila 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -5
- data/lib/shangrila/sora.rb +13 -0
- data/lib/shangrila/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf7cf6a45956c8f8610e454cf85b0c0c75041de7
|
4
|
+
data.tar.gz: 5fddc6c4b2cd564f9cf0e7fb14829c05e0d32ff6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55e4d9c00075a44d8b20b3ec9d81b684d4e52d964b2f4aadd2de48d1e82548a472f6937def328817f78d623409966283cbc8d60e361316da615c10b0cc980abe
|
7
|
+
data.tar.gz: c9c92bf2ccb48b425455b3faa08cb8d44795f08d68fdb1685008adc77f90bb82ade567845519d78a8ac7ae605db2881a8ec38c262919535dfa2139256fd18896
|
data/README.md
CHANGED
@@ -24,6 +24,12 @@ or Gemfile
|
|
24
24
|
|
25
25
|
```Shangrila::Sora.new().get_title_list(2015, 1)```
|
26
26
|
|
27
|
+
#### Get anime master data map key=id
|
28
|
+
|
29
|
+
```Shangrila::Sora.new().get_map_key_id(year, cours)```
|
30
|
+
|
31
|
+
```Shangrila::Sora.new().get_map_key_id(2015, 1)```
|
32
|
+
|
27
33
|
#### Get anime title map
|
28
34
|
|
29
35
|
```Shangrila::Sora.new().get_map_with_key_title(year, cours, property)```
|
@@ -36,17 +42,22 @@ or Gemfile
|
|
36
42
|
|
37
43
|
```Shangrila::Sora.new().get_flat_data(2014, 2, ['title', 'twitter_hash_tag'])```
|
38
44
|
|
45
|
+
#### (IN irb)
|
39
46
|
|
40
|
-
|
47
|
+
```
|
48
|
+
irb(main):001:0> require 'shangrila'
|
49
|
+
=> true
|
50
|
+
irb(main):002:0> Shangrila::Sora.new().get_flat_data(2015, 4, ['id', 'title']).each{|v| p v}
|
51
|
+
```
|
41
52
|
|
53
|
+
### Twitter API
|
42
54
|
|
43
55
|
#### Get Twitter Follower Status
|
44
56
|
|
45
|
-
|
46
|
-
|
57
|
+
``Shangrila::Sana.new().follower_status(['usagi_anime','kinmosa_anime','aldnoahzero'])``
|
47
58
|
|
48
59
|
#### Get Twitter Follower History
|
49
60
|
|
50
|
-
|
61
|
+
``Shangrila::Sana.new().follower_history('usagi_anime')``
|
51
62
|
|
52
|
-
|
63
|
+
``Shangrila::Sana.new().follower_history('usagi_anime', 1446901208)``
|
data/lib/shangrila/sora.rb
CHANGED
@@ -41,6 +41,19 @@ module Shangrila
|
|
41
41
|
master_map
|
42
42
|
end
|
43
43
|
|
44
|
+
# @param [Int] year データ取得対象のアニメの年
|
45
|
+
# @param [Int] cours データ取得対象のアニメの年のクール番号 1-4
|
46
|
+
# @return [HASH] idをkeyとしたハッシュデータ
|
47
|
+
def get_map_key_id(year, cours)
|
48
|
+
master_list = get_master_data(year, cours)
|
49
|
+
|
50
|
+
master_map = {}
|
51
|
+
|
52
|
+
master_list.each{|master| master_map[master['id']] = master}
|
53
|
+
|
54
|
+
master_map
|
55
|
+
end
|
56
|
+
|
44
57
|
# @param [Int] year データ取得対象のアニメの年
|
45
58
|
# @param [Int] cours データ取得対象のアニメの年のクール番号 1-4
|
46
59
|
# @param [property] データ取得対象のプロパティリスト
|
data/lib/shangrila/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shangrila
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AKB428
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|