rakuten-api 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -6
- data/example/auction.rb +1 -1
- data/example/gora.rb +9 -11
- data/example/kobo.rb +13 -0
- data/lib/rakuten/api.rb +1 -0
- data/lib/rakuten/api/auction.rb +2 -2
- data/lib/rakuten/api/gora.rb +6 -15
- data/lib/rakuten/api/kobo.rb +28 -0
- data/lib/rakuten/api/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a698d575deab4f61cea48493eadbbde51f29291
|
4
|
+
data.tar.gz: 8001458c927520ee1ab00a705446a86e1c2a02fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8da4f1259b70b0a83255a62d343cc27d91547ec6b26797cb05d8615616795093c39514427467e8963f2a84c148a6ed5bf7aefad4d3688a573376b6aef03cd29f
|
7
|
+
data.tar.gz: 0c47317028e041f7422de50839b0b6eb7a5c8442ab91e0477e78508ce157531d07ff274a33dc9a471fe8876112296cff274247a7d142df95d743faa843e02c1d
|
data/README.md
CHANGED
@@ -30,8 +30,8 @@ end
|
|
30
30
|
|
31
31
|
# Ichiba Item Search API (version:2013-08-05)
|
32
32
|
res = Rakuten::Api.get(Rakuten::Api::Ichiba::Search,{:genreId => "101240"})
|
33
|
-
res.code # 200
|
34
|
-
res.message # "OK"
|
33
|
+
p res.code # 200
|
34
|
+
p res.message # "OK"
|
35
35
|
res["Items"].each do |v|
|
36
36
|
name = v["Item"]["itemName"]
|
37
37
|
...
|
@@ -62,7 +62,7 @@ Rakuten::Api::Books::GenreSearch # Books Genre Search API (version:2012-11
|
|
62
62
|
# Rakuten Auction API
|
63
63
|
Rakuten::Api::Auction::GenreSearch # Auction Genre Search API (version:2012-09-27)
|
64
64
|
Rakuten::Api::Auction::GenreKeywordSearch # Auction Genre Keyword Search API (version:2012-09-27)
|
65
|
-
Rakuten::Api::Auction::Search # Auction Item Search API (version:2013-
|
65
|
+
Rakuten::Api::Auction::Search # Auction Item Search API (version:2013-09-05)
|
66
66
|
Rakuten::Api::Auction::CodeSearch # Auction Item Code Search API (version:2012-10-10)
|
67
67
|
# Rakuten Travel API
|
68
68
|
Rakuten::Api::Travel::Search # Travel Search API (version:2013-10-24)
|
@@ -80,13 +80,16 @@ Rakuten::Api::Bookmark::Delete # Favorite Bookmark Delete API (version:2012-06-2
|
|
80
80
|
Rakuten::Api::Recipe::CategoryList # Recipe Category List API (version:2012-11-21)
|
81
81
|
Rakuten::Api::Recipe::CategoryRanking # Recipe Category Ranking API (version:2012-11-21)
|
82
82
|
# Rakuten GORA API
|
83
|
-
Rakuten::Api::Gora::Search # Gora Search API (version:
|
84
|
-
Rakuten::Api::Gora::DetailSearch # Gora Detail Search API (version:
|
85
|
-
Rakuten::Api::Gora::PlanSearch # Gora Plan Search API (version:
|
83
|
+
Rakuten::Api::Gora::Search # Gora Search API (version:2013-11-13)
|
84
|
+
Rakuten::Api::Gora::DetailSearch # Gora Detail Search API (version:2013-11-13)
|
85
|
+
Rakuten::Api::Gora::PlanSearch # Gora Plan Search API (version:2013-11-13)
|
86
86
|
# Rakuten Etc API
|
87
87
|
Rakuten::Api::Etc::DynamicAd # Dynamic Ad API
|
88
88
|
Rakuten::Api::Etc::DynamicAdTravel # Dynamic Ad Travel API
|
89
89
|
Rakuten::Api::Etc::HighCommissionShop # High Commission Shop API (version:2012-03-13)
|
90
|
+
# Rakuten Kobo API
|
91
|
+
Rakuten::Api::Kobo::Search # Kobo Ebook Search API (version:2013-10-10)
|
92
|
+
Rakuten::Api::Kobo::GenreSearch # Kobo Genre Search API (version:2013-10-10)
|
90
93
|
```
|
91
94
|
|
92
95
|
Refer to [Rakuten Web API documentation](https://webservice.rakuten.co.jp/document/) for more infomation.
|
data/example/auction.rb
CHANGED
@@ -12,7 +12,7 @@ res["auctionGenreList"].each do |v|
|
|
12
12
|
p v["fullGenrePath"]
|
13
13
|
end
|
14
14
|
|
15
|
-
# Auction Item Search API (version:2013-
|
15
|
+
# Auction Item Search API (version:2013-09-05)
|
16
16
|
res = Rakuten::Api.get(Rakuten::Api::Auction::Search,{:keyword => "CD"})
|
17
17
|
res["Items"].each do |v|
|
18
18
|
p v["Item"]["itemName"]
|
data/example/gora.rb
CHANGED
@@ -1,19 +1,17 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/helper')
|
2
2
|
|
3
|
-
# Gora Search API (version:
|
3
|
+
# Gora Search API (version:2013-11-13)
|
4
4
|
res = Rakuten::Api.get(Rakuten::Api::Gora::Search,{:areaCode => "1"})
|
5
|
-
res["
|
6
|
-
p v["golfCourseName"]
|
5
|
+
res["Items"].each do |v|
|
6
|
+
p v["Item"]["golfCourseName"]
|
7
7
|
end
|
8
8
|
|
9
|
-
# Gora Detail Search API (version:
|
9
|
+
# Gora Detail Search API (version:2013-11-13)
|
10
10
|
res = Rakuten::Api.get(Rakuten::Api::Gora::DetailSearch,{:golfCourseId => "70008"})
|
11
|
-
res["
|
12
|
-
p v["golfCourseName"]
|
13
|
-
end
|
11
|
+
p res["Item"]["golfCourseName"]
|
14
12
|
|
15
|
-
# Gora Plan Search API (version:
|
16
|
-
res = Rakuten::Api.get(Rakuten::Api::Gora::PlanSearch,{:areaCode => "1",:playDate => "2013-
|
17
|
-
res["
|
18
|
-
p v["golfCourseId"]
|
13
|
+
# Gora Plan Search API (version:2013-11-13)
|
14
|
+
res = Rakuten::Api.get(Rakuten::Api::Gora::PlanSearch,{:areaCode => "1",:playDate => "2013-12-05"})
|
15
|
+
res["Items"].each do |v|
|
16
|
+
p v["Item"]["golfCourseId"]
|
19
17
|
end
|
data/example/kobo.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/helper')
|
2
|
+
|
3
|
+
# Kobo Ebook Search API (version:2013-10-10)
|
4
|
+
res = Rakuten::Api.get(Rakuten::Api::Kobo::Search,{:koboGenreId => "101"})
|
5
|
+
res["Items"].each do |v|
|
6
|
+
p v["Item"]["title"]
|
7
|
+
end
|
8
|
+
|
9
|
+
# Kobo Genre Search API (version:2013-10-10)
|
10
|
+
res = Rakuten::Api.get(Rakuten::Api::Kobo::GenreSearch,{:koboGenreId => "101"})
|
11
|
+
res["children"].each do |v|
|
12
|
+
p v["child"]["koboGenreName"]
|
13
|
+
end
|
data/lib/rakuten/api.rb
CHANGED
data/lib/rakuten/api/auction.rb
CHANGED
@@ -21,9 +21,9 @@ module Rakuten
|
|
21
21
|
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/AuctionGenreKeyword/Search/20120927", Rakuten::Api.merge(opts))
|
22
22
|
end
|
23
23
|
|
24
|
-
# Auction Item Search API (version:2013-
|
24
|
+
# Auction Item Search API (version:2013-09-05)
|
25
25
|
def search(opts={})
|
26
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/AuctionItem/Search/
|
26
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/AuctionItem/Search/20130905", Rakuten::Api.merge(opts))
|
27
27
|
end
|
28
28
|
|
29
29
|
# Auction Item Code Search API (version:2012-10-10)
|
data/lib/rakuten/api/gora.rb
CHANGED
@@ -10,28 +10,19 @@ module Rakuten
|
|
10
10
|
|
11
11
|
class << self
|
12
12
|
|
13
|
-
# Gora Search API (version:
|
13
|
+
# Gora Search API (version:2013-11-13)
|
14
14
|
def search(opts={})
|
15
|
-
|
16
|
-
opts[:operation] = 'GoraGolfCourseSearch' unless opts.key?(:operation)
|
17
|
-
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
18
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", Rakuten::Api.merge(opts))
|
15
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Gora/GoraGolfCourseSearch/20131113", Rakuten::Api.merge(opts))
|
19
16
|
end
|
20
17
|
|
21
|
-
# Gora Detail Search API (version:
|
18
|
+
# Gora Detail Search API (version:2013-11-13)
|
22
19
|
def detail_search(opts={})
|
23
|
-
|
24
|
-
opts[:operation] = 'GoraGolfCourseDetail' unless opts.key?(:operation)
|
25
|
-
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
26
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", Rakuten::Api.merge(opts))
|
20
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Gora/GoraGolfCourseDetail/20131113", Rakuten::Api.merge(opts))
|
27
21
|
end
|
28
22
|
|
29
|
-
# Gora Plan Search API (version:
|
23
|
+
# Gora Plan Search API (version:2013-11-13)
|
30
24
|
def plan_search(opts={})
|
31
|
-
|
32
|
-
opts[:operation] = 'GoraPlanSearch' unless opts.key?(:operation)
|
33
|
-
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
34
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", Rakuten::Api.merge(opts))
|
25
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Gora/GoraPlanSearch/20131113", Rakuten::Api.merge(opts))
|
35
26
|
end
|
36
27
|
|
37
28
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Rakuten
|
2
|
+
|
3
|
+
class Api
|
4
|
+
|
5
|
+
class Kobo
|
6
|
+
|
7
|
+
Search = "Rakuten::Api::Kobo.search"
|
8
|
+
GenreSearch = "Rakuten::Api::Kobo.genre_search"
|
9
|
+
|
10
|
+
class << self
|
11
|
+
|
12
|
+
# Kobo Ebook Search API (version:2013-10-10)
|
13
|
+
def search(opts={})
|
14
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Kobo/EbookSearch/20131010", Rakuten::Api.merge(opts))
|
15
|
+
end
|
16
|
+
|
17
|
+
# Kobo Genre Search API (version:2013-10-10)
|
18
|
+
def genre_search(opts={})
|
19
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Kobo/GenreSearch/20131010", Rakuten::Api.merge(opts))
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
data/lib/rakuten/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rakuten-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shoprev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -99,6 +99,7 @@ files:
|
|
99
99
|
- example/gora.rb
|
100
100
|
- example/helper.rb
|
101
101
|
- example/ichiba.rb
|
102
|
+
- example/kobo.rb
|
102
103
|
- example/product.rb
|
103
104
|
- example/recipe.rb
|
104
105
|
- example/travel.rb
|
@@ -109,6 +110,7 @@ files:
|
|
109
110
|
- lib/rakuten/api/etc.rb
|
110
111
|
- lib/rakuten/api/gora.rb
|
111
112
|
- lib/rakuten/api/ichiba.rb
|
113
|
+
- lib/rakuten/api/kobo.rb
|
112
114
|
- lib/rakuten/api/product.rb
|
113
115
|
- lib/rakuten/api/recipe.rb
|
114
116
|
- lib/rakuten/api/request.rb
|