shangrila 0.0.8 → 0.0.9

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: 047893ba7d33cad9dca6d30596e35b2e704b7c28
4
- data.tar.gz: 6642e65c332310230cc8bb30d9aa848189e0ee9b
3
+ metadata.gz: c8022c9fc7d0f2d97e8494a333b573eb0278cd74
4
+ data.tar.gz: 9d1669b0224873de6e3cfd7c6d74383e8eb38c15
5
5
  SHA512:
6
- metadata.gz: 45bb3cc3194b7bd91ad9379041c621532008f7f19995d0405443cf5ecaaf1daccd8c299e2d8518c27748abb1065a2a61ee3b083b91b315fbd0f7a88147e5fc59
7
- data.tar.gz: c61ee16df71db2b434363eaa119e90f4ae004d5d114a7b443f98cf0da5816df31f2d420995274ed640ac44552d3040936c0b5f0b037cd2d8d3ca6a92cced28f8
6
+ metadata.gz: 2f8caad4de2e9e82bc9ddb16163b471889a067af773f96560b77dc7020b3e3a53a467e8aa5f0421952f2760c707c408986fc7ced9ff14c1bc3609cea431b7c48
7
+ data.tar.gz: d69db0f8ba3202525a0cf453b501cf04f94bafabbc8e0c6f3082eb518f8b14a86b7301945092712b3ba776198902eb4a1e6301a84dc607b9382ddacb94c908fc
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env ruby
2
+ require 'shangrila'
3
+ require 'optparse'
4
+
5
+ opt = OptionParser.new
6
+
7
+ standby_server = nil
8
+ year = 2014
9
+ cours = 1
10
+
11
+ Version = '1.0.0'
12
+
13
+ opt.on('-c COURS', 'anime cours..1=winter or 2=spring or 3=summer or 4=autumn') {|v| cours = v}
14
+ opt.on('-y YEAR', 'year...2014 <= ?') {|v| year = v}
15
+ opt.on('-s', 'connect standby_server. default=moemoe.tokyo standby=api.tv-anime.biz'){standby_server = true}
16
+
17
+ begin
18
+ opt.parse!(ARGV)
19
+ rescue => exc
20
+ p exc
21
+ return
22
+ end
23
+
24
+ puts Shangrila::Sora.new().get_master_data_raw(year, cours)
@@ -14,6 +14,14 @@ module Shangrila
14
14
  # @param [Int] year データ取得対象のアニメの年
15
15
  # @param [Int] cours データ取得対象のアニメの年のクール番号 1-4
16
16
  # @return [JSON] アニメのマスターデータすべて
17
+ def get_master_data_raw(year, cours)
18
+ response = HTTPClient.get(sprintf("%s/%s/%s", URL, year, cours))
19
+ response.body
20
+ end
21
+
22
+ # @param [Int] year データ取得対象のアニメの年
23
+ # @param [Int] cours データ取得対象のアニメの年のクール番号 1-4
24
+ # @return [JSON->RubyHash] アニメのマスターデータすべて
17
25
  def get_master_data(year, cours)
18
26
  response = HTTPClient.get(sprintf("%s/%s/%s", URL, year, cours))
19
27
  JSON.load(response.body)
@@ -1,3 +1,3 @@
1
1
  module Shangrila
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -21,4 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.7"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
  spec.add_runtime_dependency "httpclient"
24
+ spec.executables << 'anime-api'
24
25
  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.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - AKB428
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-24 00:00:00.000000000 Z
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -55,7 +55,8 @@ dependencies:
55
55
  description: ShanguriLa. Anime REST API SDK
56
56
  email:
57
57
  - gandara016+1@gmail.com
58
- executables: []
58
+ executables:
59
+ - anime-api
59
60
  extensions: []
60
61
  extra_rdoc_files: []
61
62
  files:
@@ -64,6 +65,7 @@ files:
64
65
  - LICENSE.txt
65
66
  - README.md
66
67
  - Rakefile
68
+ - bin/anime-api
67
69
  - lib/shangrila.rb
68
70
  - lib/shangrila/sana.rb
69
71
  - lib/shangrila/sora.rb
@@ -89,9 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
91
  version: '0'
90
92
  requirements: []
91
93
  rubyforge_project:
92
- rubygems_version: 2.2.2
94
+ rubygems_version: 2.5.1
93
95
  signing_key:
94
96
  specification_version: 4
95
97
  summary: ShanguriLa. Anime API SDK
96
98
  test_files: []
97
- has_rdoc: