rakuten-api 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/example/travel.rb +22 -22
- data/lib/rakuten/api.rb +9 -1
- data/lib/rakuten/api/auction.rb +4 -4
- data/lib/rakuten/api/bookmark.rb +3 -3
- data/lib/rakuten/api/books.rb +9 -9
- data/lib/rakuten/api/etc.rb +3 -3
- data/lib/rakuten/api/gora.rb +3 -3
- data/lib/rakuten/api/ichiba.rb +3 -3
- data/lib/rakuten/api/product.rb +3 -3
- data/lib/rakuten/api/recipe.rb +2 -2
- data/lib/rakuten/api/travel.rb +14 -35
- data/lib/rakuten/api/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: e39f76d257e15a18db1951ddf319a9a5bd96addd
|
4
|
+
data.tar.gz: 003bc7a4403fd0014aeef9be530fcfed0bf43c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e39ee8b5d930f9a0b5e2b2226f30f404ce44b337c07f182230b7b55db01c28d0e60b13249d6e4584c8fe15bc48472421d708811a64b2aee24d4322073e36fda8
|
7
|
+
data.tar.gz: 6dd6b8752573b5bb959d99624487b8734a18e8a299018fdf18b01a39b27597bc9c191ddcd7cd3212e4c0061f96175df4d0553a51c1f757c1a35f0201b2824ad0
|
data/README.md
CHANGED
@@ -65,13 +65,13 @@ Rakuten::Api::Auction::GenreKeywordSearch # Auction Genre Keyword Search API (ve
|
|
65
65
|
Rakuten::Api::Auction::Search # Auction Item Search API (version:2013-01-10)
|
66
66
|
Rakuten::Api::Auction::CodeSearch # Auction Item Code Search API (version:2012-10-10)
|
67
67
|
# Rakuten Travel API
|
68
|
-
Rakuten::Api::Travel::Search # Travel Search API (version:
|
69
|
-
Rakuten::Api::Travel::DetailSearch # Travel Detail Search API (version:
|
70
|
-
Rakuten::Api::Travel::VacantSearch # Travel Vacant Search API (version:
|
71
|
-
Rakuten::Api::Travel::AreaCode # Travel Area Code API (version:
|
72
|
-
Rakuten::Api::Travel::KeywordSearch # Travel Keyword Search API (version:
|
73
|
-
Rakuten::Api::Travel::ChainList # Travel Chain List API (version:
|
74
|
-
Rakuten::Api::Travel::Ranking # Travel Ranking API (version:
|
68
|
+
Rakuten::Api::Travel::Search # Travel Search API (version:2013-10-24)
|
69
|
+
Rakuten::Api::Travel::DetailSearch # Travel Detail Search API (version:2013-10-24)
|
70
|
+
Rakuten::Api::Travel::VacantSearch # Travel Vacant Search API (version:2013-10-24)
|
71
|
+
Rakuten::Api::Travel::AreaCode # Travel Area Code API (version:2013-10-24)
|
72
|
+
Rakuten::Api::Travel::KeywordSearch # Travel Keyword Search API (version:2013-10-24)
|
73
|
+
Rakuten::Api::Travel::ChainList # Travel Chain List API (version:2013-10-24)
|
74
|
+
Rakuten::Api::Travel::Ranking # Travel Ranking API (version:2013-10-24)
|
75
75
|
# Rakuten Bookmark API
|
76
76
|
Rakuten::Api::Bookmark::List # Favorite Bookmark List API (version:2012-06-27)
|
77
77
|
Rakuten::Api::Bookmark::Add # Favorite Bookmark Add API (version:2012-06-27)
|
data/example/travel.rb
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/helper')
|
2
2
|
|
3
|
-
# Travel Search API (version:
|
3
|
+
# Travel Search API (version:2013-10-24)
|
4
4
|
res = Rakuten::Api.get(Rakuten::Api::Travel::Search,{:largeClassCode => "japan",:middleClassCode => "hokkaido",:smallClassCode => "sapporo",:detailClassCode => "A"})
|
5
|
-
res['
|
6
|
-
p v['hotelBasicInfo']["hotelName"]
|
5
|
+
res['hotels'].each do |v|
|
6
|
+
p v['hotel'][0]['hotelBasicInfo']["hotelName"]
|
7
7
|
end
|
8
8
|
|
9
|
-
# Travel Detail Search API (version:
|
9
|
+
# Travel Detail Search API (version:2013-10-24)
|
10
10
|
res = Rakuten::Api.get(Rakuten::Api::Travel::DetailSearch,{:hotelNo => "142610"})
|
11
|
-
res['
|
12
|
-
p v['hotelBasicInfo']["hotelName"]
|
11
|
+
res['hotels'].each do |v|
|
12
|
+
p v['hotel'][0]['hotelBasicInfo']["hotelName"]
|
13
13
|
end
|
14
14
|
|
15
|
-
# Travel Vacant Search API (version:
|
16
|
-
res = Rakuten::Api.get(Rakuten::Api::Travel::VacantSearch,{:checkinDate => "2013-
|
17
|
-
res[
|
18
|
-
p v[
|
15
|
+
# Travel Vacant Search API (version:2013-10-24)
|
16
|
+
res = Rakuten::Api.get(Rakuten::Api::Travel::VacantSearch,{:checkinDate => "2013-11-08",:checkoutDate => "2013-11-09",:largeClassCode => "japan",:middleClassCode => "hokkaido",:smallClassCode => "sapporo",:detailClassCode => "A"})
|
17
|
+
res['hotels'].each do |v|
|
18
|
+
p v['hotel'][0]['hotelBasicInfo']["hotelName"]
|
19
19
|
end
|
20
20
|
|
21
|
-
# Travel Area Code API (version:
|
21
|
+
# Travel Area Code API (version:2013-10-24)
|
22
22
|
res = Rakuten::Api.get(Rakuten::Api::Travel::AreaCode)
|
23
|
-
res[
|
24
|
-
p v[
|
23
|
+
res['areaClasses']['largeClasses'][0]['largeClass'][1]['middleClasses'][1]['middleClass'][1]['smallClasses'].each do |v|
|
24
|
+
p v['smallClass'][0]['smallClassName']
|
25
25
|
end
|
26
26
|
|
27
|
-
# Travel Keyword Search API (version:
|
27
|
+
# Travel Keyword Search API (version:2013-10-24)
|
28
28
|
res = Rakuten::Api.get(Rakuten::Api::Travel::KeywordSearch,{:keyword => 'au'})
|
29
|
-
res['
|
30
|
-
p v[
|
29
|
+
res['hotels'].each do |v|
|
30
|
+
p v['hotel'][0]['hotelBasicInfo']["hotelName"]
|
31
31
|
end
|
32
32
|
|
33
|
-
# Travel Chain List API (version:
|
33
|
+
# Travel Chain List API (version:2013-10-24)
|
34
34
|
res = Rakuten::Api.get(Rakuten::Api::Travel::ChainList)
|
35
|
-
res[
|
36
|
-
p v["hotelChainName"]
|
35
|
+
res['largeClasses'][0]['largeClass'][0]['hotelChains'].each do |v|
|
36
|
+
p v['hotelChain']["hotelChainName"]
|
37
37
|
end
|
38
38
|
|
39
|
-
# Travel Ranking API (version:
|
39
|
+
# Travel Ranking API (version:2013-10-24)
|
40
40
|
res = Rakuten::Api.get(Rakuten::Api::Travel::Ranking,{:genre => "all"})
|
41
|
-
res[
|
42
|
-
p v["hotelName"]
|
41
|
+
res['Rankings'][0]['Ranking']['hotels'].each do |v|
|
42
|
+
p v['hotel']["hotelName"]
|
43
43
|
end
|
data/lib/rakuten/api.rb
CHANGED
@@ -32,8 +32,16 @@ module Rakuten
|
|
32
32
|
yield @@options
|
33
33
|
end
|
34
34
|
|
35
|
+
def merge(opts={})
|
36
|
+
opts.merge!(@@options)
|
37
|
+
ids = opts[:applicationId].split(",")
|
38
|
+
opts[:applicationId] = ids[rand(ids.size)]
|
39
|
+
opts[:developerId] = opts[:applicationId] if opts.key?(:developerId)
|
40
|
+
opts
|
41
|
+
end
|
42
|
+
|
35
43
|
def get(method,opts={})
|
36
|
-
eval method
|
44
|
+
eval "#{method}(#{opts})"
|
37
45
|
end
|
38
46
|
|
39
47
|
end
|
data/lib/rakuten/api/auction.rb
CHANGED
@@ -13,22 +13,22 @@ module Rakuten
|
|
13
13
|
|
14
14
|
# Auction Genre Search API (version:2012-09-27)
|
15
15
|
def genre_search(opts={})
|
16
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/AuctionGenreId/Search/20120927",
|
16
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/AuctionGenreId/Search/20120927", Rakuten::Api.merge(opts))
|
17
17
|
end
|
18
18
|
|
19
19
|
# Auction Genre Keyword Search API (version:2012-09-27)
|
20
20
|
def genre_keyword_search(opts={})
|
21
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/AuctionGenreKeyword/Search/20120927",
|
21
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/AuctionGenreKeyword/Search/20120927", Rakuten::Api.merge(opts))
|
22
22
|
end
|
23
23
|
|
24
24
|
# Auction Item Search API (version:2013-01-10)
|
25
25
|
def search(opts={})
|
26
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/AuctionItem/Search/20130110",
|
26
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/AuctionItem/Search/20130110", Rakuten::Api.merge(opts))
|
27
27
|
end
|
28
28
|
|
29
29
|
# Auction Item Code Search API (version:2012-10-10)
|
30
30
|
def code_search(opts={})
|
31
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/AuctionItemCode/Search/20121010",
|
31
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/AuctionItemCode/Search/20121010", Rakuten::Api.merge(opts))
|
32
32
|
end
|
33
33
|
|
34
34
|
end
|
data/lib/rakuten/api/bookmark.rb
CHANGED
@@ -12,17 +12,17 @@ module Rakuten
|
|
12
12
|
|
13
13
|
# Favorite Bookmark List API (version:2012-06-27)
|
14
14
|
def list(opts={})
|
15
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/FavoriteBookmark/List/20120627",
|
15
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/FavoriteBookmark/List/20120627", Rakuten::Api.merge(opts))
|
16
16
|
end
|
17
17
|
|
18
18
|
# Favorite Bookmark Add API (version:2012-06-27)
|
19
19
|
def add(opts={})
|
20
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/FavoriteBookmark/Add/20120627",
|
20
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/FavoriteBookmark/Add/20120627", Rakuten::Api.merge(opts))
|
21
21
|
end
|
22
22
|
|
23
23
|
# Favorite Bookmark Delete API (version:2012-06-27)
|
24
24
|
def delete(opts={})
|
25
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/FavoriteBookmark/Delete/20120627",
|
25
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/FavoriteBookmark/Delete/20120627", Rakuten::Api.merge(opts))
|
26
26
|
end
|
27
27
|
|
28
28
|
end
|
data/lib/rakuten/api/books.rb
CHANGED
@@ -18,47 +18,47 @@ module Rakuten
|
|
18
18
|
|
19
19
|
# Books Total Search API (version:2013-05-22)
|
20
20
|
def total_search(opts={})
|
21
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksTotal/Search/20130522",
|
21
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksTotal/Search/20130522", Rakuten::Api.merge(opts))
|
22
22
|
end
|
23
23
|
|
24
24
|
# Books Book Search API (version:2013-05-22)
|
25
25
|
def book_search(opts={})
|
26
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksBook/Search/20130522",
|
26
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksBook/Search/20130522", Rakuten::Api.merge(opts))
|
27
27
|
end
|
28
28
|
|
29
29
|
# Books CD Search API (version:2013-05-22)
|
30
30
|
def cd_search(opts={})
|
31
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksCD/Search/20130522",
|
31
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksCD/Search/20130522", Rakuten::Api.merge(opts))
|
32
32
|
end
|
33
33
|
|
34
34
|
# Books DVD Search API (version:2013-05-22)
|
35
35
|
def dvd_search(opts={})
|
36
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksDVD/Search/20130522",
|
36
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksDVD/Search/20130522", Rakuten::Api.merge(opts))
|
37
37
|
end
|
38
38
|
|
39
39
|
# Books Foreign Book Search API (version:2013-05-22)
|
40
40
|
def foreign_book_search(opts={})
|
41
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksForeignBook/Search/20130522",
|
41
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksForeignBook/Search/20130522", Rakuten::Api.merge(opts))
|
42
42
|
end
|
43
43
|
|
44
44
|
# Books Magazine Search API (version:2013-05-22)
|
45
45
|
def magazine_search(opts={})
|
46
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksMagazine/Search/20130522",
|
46
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksMagazine/Search/20130522", Rakuten::Api.merge(opts))
|
47
47
|
end
|
48
48
|
|
49
49
|
# Books Game Search API (version:2013-05-22)
|
50
50
|
def game_search(opts={})
|
51
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksGame/Search/20130522",
|
51
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksGame/Search/20130522", Rakuten::Api.merge(opts))
|
52
52
|
end
|
53
53
|
|
54
54
|
# Books Software Search API (version:2013-05-22)
|
55
55
|
def software_search(opts={})
|
56
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksSoftware/Search/20130522",
|
56
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksSoftware/Search/20130522", Rakuten::Api.merge(opts))
|
57
57
|
end
|
58
58
|
|
59
59
|
# Books Genre Search API (version:2012-11-28)
|
60
60
|
def genre_search(opts={})
|
61
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksGenre/Search/20121128",
|
61
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/BooksGenre/Search/20121128", Rakuten::Api.merge(opts))
|
62
62
|
end
|
63
63
|
|
64
64
|
end
|
data/lib/rakuten/api/etc.rb
CHANGED
@@ -13,13 +13,13 @@ module Rakuten
|
|
13
13
|
# Dynamic Ad API
|
14
14
|
def dynamic_ad(opts={})
|
15
15
|
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
16
|
-
Rakuten::Request.get("http://dynamic.rakuten.co.jp/rcm/1.0/i/json",
|
16
|
+
Rakuten::Request.get("http://dynamic.rakuten.co.jp/rcm/1.0/i/json", Rakuten::Api.merge(opts))
|
17
17
|
end
|
18
18
|
|
19
19
|
# Dynamic Ad Travel API
|
20
20
|
def dynamic_ad_travel(opts={})
|
21
21
|
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
22
|
-
Rakuten::Request.get("http://dynamic.rakuten.co.jp/rcm/1.0/t/json",
|
22
|
+
Rakuten::Request.get("http://dynamic.rakuten.co.jp/rcm/1.0/t/json", Rakuten::Api.merge(opts))
|
23
23
|
end
|
24
24
|
|
25
25
|
# High Commission Shop API (version:2012-03-13)
|
@@ -27,7 +27,7 @@ module Rakuten
|
|
27
27
|
opts[:version] = '2012-03-13' unless opts.key?(:version)
|
28
28
|
opts[:operation] = 'HighCommissionShop' unless opts.key?(:operation)
|
29
29
|
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
30
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json",
|
30
|
+
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", Rakuten::Api.merge(opts))
|
31
31
|
end
|
32
32
|
|
33
33
|
end
|
data/lib/rakuten/api/gora.rb
CHANGED
@@ -15,7 +15,7 @@ module Rakuten
|
|
15
15
|
opts[:version] = '2010-06-30' unless opts.key?(:version)
|
16
16
|
opts[:operation] = 'GoraGolfCourseSearch' unless opts.key?(:operation)
|
17
17
|
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
18
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json",
|
18
|
+
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", Rakuten::Api.merge(opts))
|
19
19
|
end
|
20
20
|
|
21
21
|
# Gora Detail Search API (version:2010-06-30)
|
@@ -23,7 +23,7 @@ module Rakuten
|
|
23
23
|
opts[:version] = '2010-06-30' unless opts.key?(:version)
|
24
24
|
opts[:operation] = 'GoraGolfCourseDetail' unless opts.key?(:operation)
|
25
25
|
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
26
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json",
|
26
|
+
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", Rakuten::Api.merge(opts))
|
27
27
|
end
|
28
28
|
|
29
29
|
# Gora Plan Search API (version:2012-12-10)
|
@@ -31,7 +31,7 @@ module Rakuten
|
|
31
31
|
opts[:version] = '2012-12-10' unless opts.key?(:version)
|
32
32
|
opts[:operation] = 'GoraPlanSearch' unless opts.key?(:operation)
|
33
33
|
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
34
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json",
|
34
|
+
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", Rakuten::Api.merge(opts))
|
35
35
|
end
|
36
36
|
|
37
37
|
end
|
data/lib/rakuten/api/ichiba.rb
CHANGED
@@ -12,17 +12,17 @@ module Rakuten
|
|
12
12
|
|
13
13
|
# Ichiba Item Search API (version:2013-08-05)
|
14
14
|
def search(opts={})
|
15
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/IchibaItem/Search/20130805",
|
15
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/IchibaItem/Search/20130805", Rakuten::Api.merge(opts))
|
16
16
|
end
|
17
17
|
|
18
18
|
# Ichiba Genre Search API (version:2012-07-23)
|
19
19
|
def genre_search(opts={})
|
20
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/IchibaGenre/Search/20120723",
|
20
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/IchibaGenre/Search/20120723", Rakuten::Api.merge(opts))
|
21
21
|
end
|
22
22
|
|
23
23
|
# Ichiba Item Ranking API (version:2012-09-27)
|
24
24
|
def ranking(opts={})
|
25
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/IchibaItem/Ranking/20120927",
|
25
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/IchibaItem/Ranking/20120927", Rakuten::Api.merge(opts))
|
26
26
|
end
|
27
27
|
|
28
28
|
end
|
data/lib/rakuten/api/product.rb
CHANGED
@@ -15,7 +15,7 @@ module Rakuten
|
|
15
15
|
opts[:version] = '2010-11-18' unless opts.key?(:version)
|
16
16
|
opts[:operation] = 'ProductSearch' unless opts.key?(:operation)
|
17
17
|
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
18
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json",
|
18
|
+
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", Rakuten::Api.merge(opts))
|
19
19
|
end
|
20
20
|
|
21
21
|
# Product Detail Search API (version:2011-07-14)
|
@@ -23,7 +23,7 @@ module Rakuten
|
|
23
23
|
opts[:version] = '2011-07-14' unless opts.key?(:version)
|
24
24
|
opts[:operation] = 'ProductDetail' unless opts.key?(:operation)
|
25
25
|
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
26
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json",
|
26
|
+
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", Rakuten::Api.merge(opts))
|
27
27
|
end
|
28
28
|
|
29
29
|
# Product Genre Search API (version:2010-11-18)
|
@@ -31,7 +31,7 @@ module Rakuten
|
|
31
31
|
opts[:version] = '2010-11-18' unless opts.key?(:version)
|
32
32
|
opts[:operation] = 'ProductGenreInfo' unless opts.key?(:operation)
|
33
33
|
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
34
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json",
|
34
|
+
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", Rakuten::Api.merge(opts))
|
35
35
|
end
|
36
36
|
|
37
37
|
end
|
data/lib/rakuten/api/recipe.rb
CHANGED
@@ -11,12 +11,12 @@ module Rakuten
|
|
11
11
|
|
12
12
|
# Recipe Category List API (version:2012-11-21)
|
13
13
|
def category_list(opts={})
|
14
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Recipe/CategoryList/20121121",
|
14
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Recipe/CategoryList/20121121", Rakuten::Api.merge(opts))
|
15
15
|
end
|
16
16
|
|
17
17
|
# Recipe Category Ranking API (version:2012-11-21)
|
18
18
|
def category_ranking(opts={})
|
19
|
-
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Recipe/CategoryRanking/20121121",
|
19
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Recipe/CategoryRanking/20121121", Rakuten::Api.merge(opts))
|
20
20
|
|
21
21
|
end
|
22
22
|
|
data/lib/rakuten/api/travel.rb
CHANGED
@@ -14,60 +14,39 @@ module Rakuten
|
|
14
14
|
|
15
15
|
class << self
|
16
16
|
|
17
|
-
# Travel Search API (version:
|
17
|
+
# Travel Search API (version:2013-10-24)
|
18
18
|
def search(opts={})
|
19
|
-
|
20
|
-
opts[:operation] = 'SimpleHotelSearch' unless opts.key?(:operation)
|
21
|
-
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
22
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", opts.merge(Rakuten::Api.options))
|
19
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Travel/SimpleHotelSearch/20131024", Rakuten::Api.merge(opts))
|
23
20
|
end
|
24
21
|
|
25
|
-
# Travel Detail Search API (version:
|
22
|
+
# Travel Detail Search API (version:2013-10-24)
|
26
23
|
def detail_search(opts={})
|
27
|
-
|
28
|
-
opts[:operation] = 'HotelDetailSearch' unless opts.key?(:operation)
|
29
|
-
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
30
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", opts.merge(Rakuten::Api.options))
|
24
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Travel/HotelDetailSearch/20131024", Rakuten::Api.merge(opts))
|
31
25
|
end
|
32
26
|
|
33
|
-
# Travel Vacant Search API (version:
|
27
|
+
# Travel Vacant Search API (version:2013-10-24)
|
34
28
|
def vacant_search(opts={})
|
35
|
-
|
36
|
-
opts[:operation] = 'VacantHotelSearch' unless opts.key?(:operation)
|
37
|
-
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
38
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", opts.merge(Rakuten::Api.options))
|
29
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Travel/VacantHotelSearch/20131024", Rakuten::Api.merge(opts))
|
39
30
|
end
|
40
31
|
|
41
|
-
# Travel Area Code API (version:
|
32
|
+
# Travel Area Code API (version:2013-10-24)
|
42
33
|
def area_code(opts={})
|
43
|
-
|
44
|
-
opts[:operation] = 'GetAreaClass' unless opts.key?(:operation)
|
45
|
-
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
46
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", opts.merge(Rakuten::Api.options))
|
34
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Travel/GetAreaClass/20131024", Rakuten::Api.merge(opts))
|
47
35
|
end
|
48
36
|
|
49
|
-
# Travel Keyword Search API (version:
|
37
|
+
# Travel Keyword Search API (version:2013-10-24)
|
50
38
|
def keyword_search(opts={})
|
51
|
-
|
52
|
-
opts[:operation] = 'KeywordHotelSearch' unless opts.key?(:operation)
|
53
|
-
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
54
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", opts.merge(Rakuten::Api.options))
|
39
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Travel/KeywordHotelSearch/20131024", Rakuten::Api.merge(opts))
|
55
40
|
end
|
56
41
|
|
57
|
-
# Travel Chain List API (version:
|
42
|
+
# Travel Chain List API (version:2013-10-24)
|
58
43
|
def chain_list(opts={})
|
59
|
-
|
60
|
-
opts[:operation] = 'GetHotelChainList' unless opts.key?(:operation)
|
61
|
-
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
62
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", opts.merge(Rakuten::Api.options))
|
44
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Travel/GetHotelChainList/20131024", Rakuten::Api.merge(opts))
|
63
45
|
end
|
64
46
|
|
65
|
-
# Travel Ranking API (version:
|
47
|
+
# Travel Ranking API (version:2013-10-24)
|
66
48
|
def ranking(opts={})
|
67
|
-
|
68
|
-
opts[:operation] = 'HotelRanking' unless opts.key?(:operation)
|
69
|
-
opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
|
70
|
-
Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", opts.merge(Rakuten::Api.options))
|
49
|
+
Rakuten::Request.get("https://app.rakuten.co.jp/services/api/Travel/HotelRanking/20131024", Rakuten::Api.merge(opts))
|
71
50
|
end
|
72
51
|
|
73
52
|
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.3
|
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-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|