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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac8d6fc1eba60fde4c90959235e605e45c1e80aa
4
- data.tar.gz: f1676535aa6a9ca3fb5b38f22653e60227f24783
3
+ metadata.gz: bf7cf6a45956c8f8610e454cf85b0c0c75041de7
4
+ data.tar.gz: 5fddc6c4b2cd564f9cf0e7fb14829c05e0d32ff6
5
5
  SHA512:
6
- metadata.gz: db9c5a0c29cc0a653139053abc6619fb72e91a31214f063b092a900d71b9863f7c0c95540bfbd3440a634b42846b0280a9847ef962226fce6e697d09a2e56dd4
7
- data.tar.gz: d34a7fa1fbd083a7c3250caf12744c27e720211f8e458c235f1a325fcb82d5444242827ba0f37778abda7486db07eaae3489f35b2a409fc26afb894bc4225f95
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
- ### Twitter API
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
- ```Shangrila::Sana.new().follower_status(['usagi_anime','kinmosa_anime','aldnoahzero'])```
46
-
57
+ ``Shangrila::Sana.new().follower_status(['usagi_anime','kinmosa_anime','aldnoahzero'])``
47
58
 
48
59
  #### Get Twitter Follower History
49
60
 
50
- ```Shangrila::Sana.new().follower_history('usagi_anime')```
61
+ ``Shangrila::Sana.new().follower_history('usagi_anime')``
51
62
 
52
- ```Shangrila::Sana.new().follower_history('usagi_anime', 1446901208)```
63
+ ``Shangrila::Sana.new().follower_history('usagi_anime', 1446901208)``
@@ -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] データ取得対象のプロパティリスト
@@ -1,3 +1,3 @@
1
1
  module Shangrila
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
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.6
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-09 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler