syoboi_calendar 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +5 -30
- data/lib/syoboi_calendar/client.rb +4 -1
- data/lib/syoboi_calendar/version.rb +1 -1
- data/lib/syoboi_calendar.rb +1 -0
- data/syoboi_calendar.gemspec +3 -0
- metadata +43 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53da71b944bae16571ebf66bc151f3d554a1688b
|
4
|
+
data.tar.gz: ad48c2b0925bdc8715fbb32ad1249d100f9fdae4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d61e719e947709f931796b838ea28969307d853ba16a28b4bd554576f9de08d44c34f812e3b8fd5d07bb565816017b1ae9b3d4adb3e6bfa45b5cafb85430201b
|
7
|
+
data.tar.gz: 2a04c00611955ef239903eb072574a58dc27eef4b6909c96394ff5228e2c2ce27f661caf298a7e95bf1a1dbd4b6ea03281b08d918145ce656ecb1f68b124588b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -12,40 +12,15 @@ gem "syoboi_calendar"
|
|
12
12
|
require "syoboi_calendar"
|
13
13
|
|
14
14
|
client = SyoboiCalendar::Client
|
15
|
-
client.channels #=>
|
16
|
-
client.programs #=>
|
17
|
-
client.titles #=>
|
15
|
+
client.channels #=> a Hashie::Mash instance
|
16
|
+
client.programs #=> a Hashie::Mash instance
|
17
|
+
client.titles #=> a Hashie::Mash instance
|
18
18
|
```
|
19
19
|
|
20
20
|
## API
|
21
|
-
|
21
|
+
SyoboiCalender::Client provides `#channels`, `#titles`, `#programs` methods.
|
22
22
|
|
23
|
-
```
|
24
|
-
GET http://cal.syoboi.jp/db.php?Command=ProgLookup&JOIN=SubTitles
|
25
|
-
GET http://cal.syoboi.jp/db.php?Command=ProgLookup&JOIN=SubTitles&ChID=:channelID
|
26
|
-
GET http://cal.syoboi.jp/db.php?Command=ProgLookup&JOIN=SubTitles&Count=:count
|
27
|
-
GET http://cal.syoboi.jp/db.php?Command=ProgLookup&JOIN=SubTitles&PID=:id
|
28
|
-
GET http://cal.syoboi.jp/db.php?Command=ProgLookup&JOIN=SubTitles&PID=:id
|
29
|
-
GET http://cal.syoboi.jp/db.php?Command=ProgLookup&JOIN=SubTitles&Range=-:playedTo
|
30
|
-
GET http://cal.syoboi.jp/db.php?Command=ProgLookup&JOIN=SubTitles&Range=:playedFrom-
|
31
|
-
GET http://cal.syoboi.jp/db.php?Command=ProgLookup&JOIN=SubTitles&Range=:playedFrom-:playedTo
|
32
|
-
GET http://cal.syoboi.jp/db.php?Command=ProgLookup&JOIN=SubTitles&StTime=-:startedTo
|
33
|
-
GET http://cal.syoboi.jp/db.php?Command=TitleLookup
|
34
|
-
GET http://cal.syoboi.jp/db.php?Command=TitleLookup&LastUpdate=-:updatedTo&TID=*
|
35
|
-
GET http://cal.syoboi.jp/db.php?Command=TitleLookup&LastUpdate=:updatedFrom-&TID=*
|
36
|
-
GET http://cal.syoboi.jp/db.php?Command=TitleLookup&LastUpdate=:updatedFrom-:updatedTo&TID=*
|
37
|
-
GET http://cal.syoboi.jp/db.php?Command=TitleLookup&TID=:id
|
38
|
-
GET http://cal.syoboi.jp/db.php?Command=ChLookup
|
39
|
-
GET http://cal.syoboi.jp/db.php?Command=ChLookup&ChID=:id
|
40
|
-
GET http://cal.syoboi.jp/db.php?Command=ChLookup&LastUpdate=:updatedFrom-:updatedTo
|
41
|
-
GET http://cal.syoboi.jp/db.php?Command=ChLookup&LastUpdate=:updatedFrom-
|
42
|
-
GET http://cal.syoboi.jp/db.php?Command=ChLookup&LastUpdate=-:updatedTo
|
43
|
-
```
|
44
|
-
|
45
|
-
## Interface
|
46
|
-
SyoboiCalender::Client has `#channels`, `#titles`, `#programs` methods.
|
47
|
-
|
48
|
-
```
|
23
|
+
```ruby
|
49
24
|
SyoboiCalendar::Client
|
50
25
|
#channels
|
51
26
|
with options {}
|
@@ -21,12 +21,15 @@ module SyoboiCalendar
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def get(query_class, options = {})
|
24
|
-
connection.get(path, query_class.new(options).to_hash)
|
24
|
+
connection.get(path, query_class.new(options).to_hash).body
|
25
25
|
end
|
26
26
|
|
27
27
|
def connection
|
28
28
|
@connection ||= Faraday.new(url: url) do |connection|
|
29
29
|
connection.adapter :net_http
|
30
|
+
connection.response :mashify
|
31
|
+
connection.response :xml
|
32
|
+
connection.response :raise_error
|
30
33
|
end
|
31
34
|
end
|
32
35
|
|
data/lib/syoboi_calendar.rb
CHANGED
@@ -3,6 +3,7 @@ require "active_support/core_ext/class/attribute"
|
|
3
3
|
require "active_support/core_ext/object/try"
|
4
4
|
require "active_support/core_ext/string/inflections"
|
5
5
|
require "faraday"
|
6
|
+
require "faraday_middleware"
|
6
7
|
|
7
8
|
require "syoboi_calendar/client"
|
8
9
|
require "syoboi_calendar/queries/base"
|
data/syoboi_calendar.gemspec
CHANGED
@@ -18,6 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
spec.add_dependency "activesupport"
|
20
20
|
spec.add_dependency "faraday"
|
21
|
+
spec.add_dependency "faraday_middleware"
|
22
|
+
spec.add_dependency "hashie"
|
23
|
+
spec.add_dependency "multi_xml"
|
21
24
|
spec.add_development_dependency "pry"
|
22
25
|
spec.add_development_dependency "rake"
|
23
26
|
spec.add_development_dependency "rspec", "2.14.1"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: syoboi_calendar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
@@ -38,6 +38,48 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday_middleware
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: hashie
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: multi_xml
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
41
83
|
- !ruby/object:Gem::Dependency
|
42
84
|
name: pry
|
43
85
|
requirement: !ruby/object:Gem::Requirement
|