rakuten_web_service 1.9.1 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +6 -9
  3. data/.github/FUNDING.yml +12 -0
  4. data/.travis.yml +10 -22
  5. data/CHANGELOG.md +102 -44
  6. data/Gemfile +3 -4
  7. data/README.ja.md +118 -48
  8. data/README.md +44 -17
  9. data/Rakefile +13 -0
  10. data/examples/ichiba_item_search.rb +1 -1
  11. data/examples/recipe_search.rb +16 -0
  12. data/examples/travel_apis.rb +19 -0
  13. data/lib/rakuten_web_service.rb +18 -1
  14. data/lib/rakuten_web_service/all_proxy.rb +2 -1
  15. data/lib/rakuten_web_service/books/genre.rb +1 -1
  16. data/lib/rakuten_web_service/books/resource.rb +1 -1
  17. data/lib/rakuten_web_service/books/total.rb +1 -1
  18. data/lib/rakuten_web_service/client.rb +9 -9
  19. data/lib/rakuten_web_service/configuration.rb +5 -17
  20. data/lib/rakuten_web_service/error.rb +5 -0
  21. data/lib/rakuten_web_service/genre.rb +3 -1
  22. data/lib/rakuten_web_service/gora/course.rb +1 -1
  23. data/lib/rakuten_web_service/gora/course_detail.rb +1 -1
  24. data/lib/rakuten_web_service/gora/plan.rb +1 -1
  25. data/lib/rakuten_web_service/ichiba.rb +2 -0
  26. data/lib/rakuten_web_service/ichiba/item.rb +2 -2
  27. data/lib/rakuten_web_service/ichiba/product.rb +1 -1
  28. data/lib/rakuten_web_service/ichiba/ranking.rb +1 -1
  29. data/lib/rakuten_web_service/ichiba/tag.rb +16 -0
  30. data/lib/rakuten_web_service/ichiba/tag_group.rb +23 -0
  31. data/lib/rakuten_web_service/kobo/ebook.rb +1 -1
  32. data/lib/rakuten_web_service/kobo/genre.rb +1 -1
  33. data/lib/rakuten_web_service/recipe.rb +1 -1
  34. data/lib/rakuten_web_service/recipe/category.rb +3 -1
  35. data/lib/rakuten_web_service/resource.rb +46 -26
  36. data/lib/rakuten_web_service/response.rb +10 -5
  37. data/lib/rakuten_web_service/search_result.rb +22 -23
  38. data/lib/rakuten_web_service/string_support.rb +18 -0
  39. data/lib/rakuten_web_service/travel.rb +2 -0
  40. data/lib/rakuten_web_service/travel/area_class.rb +129 -0
  41. data/lib/rakuten_web_service/travel/hotel.rb +30 -0
  42. data/lib/rakuten_web_service/travel/open_struct.rb +19 -0
  43. data/lib/rakuten_web_service/travel/resource.rb +12 -0
  44. data/lib/rakuten_web_service/travel/search_result.rb +34 -0
  45. data/lib/rakuten_web_service/version.rb +1 -1
  46. data/rakuten_web_service.gemspec +8 -5
  47. data/spec/fixtures/ichiba/tag_search.json +15 -0
  48. data/spec/fixtures/travel/area_class.json +1 -0
  49. data/spec/fixtures/travel/simple_hotel_search.json +1 -0
  50. data/spec/rakuten_web_service/configuration_spec.rb +0 -52
  51. data/spec/rakuten_web_service/genre_spec.rb +1 -1
  52. data/spec/rakuten_web_service/ichiba/tag_group_spec.rb +68 -0
  53. data/spec/rakuten_web_service/ichiba/tag_spec.rb +35 -0
  54. data/spec/rakuten_web_service/resource_spec.rb +31 -1
  55. data/spec/rakuten_web_service/response_spec.rb +7 -7
  56. data/spec/rakuten_web_service/travel/area_class_spec.rb +117 -0
  57. data/spec/rakuten_web_service/travel/open_struct_spec.rb +53 -0
  58. data/spec/rakuten_web_service/travel/search_result_spec.rb +71 -0
  59. data/spec/rakuten_web_service/travel/simple_hotel_search_spec.rb +65 -0
  60. data/spec/rakuten_web_service_spec.rb +48 -0
  61. metadata +90 -19
  62. data/spec/integration/integration_spec.rb +0 -78
@@ -1,78 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'Call all APIs', type: 'integration' do
4
- describe RakutenWebService::Ichiba do
5
- it do
6
- expect { RWS::Ichiba::Item.search(keyword: 'Ruby').first }.not_to raise_error
7
- end
8
- it do
9
- expect { RWS::Ichiba::Genre.search(genre_id: 559887).first }.not_to raise_error
10
- end
11
- it do
12
- expect { RWS::Ichiba::Product.search(keyword: 'Ruby').first }.not_to raise_error
13
- end
14
- it do
15
- expect { RWS::Ichiba::RankingItem.search(age: 30, sex: 0).first }.not_to raise_error
16
- end
17
- end
18
-
19
- describe RakutenWebService::Books do
20
- it do
21
- expect { RWS::Books::Total.search(keyword: 'Ruby').first }.not_to raise_error
22
- end
23
- it do
24
- expect { RWS::Books::Book.search(title: 'Ruby').first }.not_to raise_error
25
- end
26
- it do
27
- expect { RWS::Books::CD.search(title: 'Ruby').first }.not_to raise_error
28
- end
29
- it do
30
- expect { RWS::Books::DVD.search(title: 'Ruby').first }.not_to raise_error
31
- end
32
- it do
33
- expect { RWS::Books::ForeignBook.search(title: 'Ruby').first }.not_to raise_error
34
- end
35
- it do
36
- expect { RWS::Books::Magazine.search(title: 'Ruby').first }.not_to raise_error
37
- end
38
- it do
39
- expect { RWS::Books::Game.search(title: 'Ruby').first }.not_to raise_error
40
- end
41
- it do
42
- expect { RWS::Books::Software.search(title: 'Ruby').first }.not_to raise_error
43
- end
44
- it do
45
- expect { RWS::Books::Genre.search(books_genre_id: '001005').first }.not_to raise_error
46
- end
47
- end
48
-
49
- describe RakutenWebService::Recipe do
50
- it do
51
- expect { RWS::Recipe.categories('large') }.not_to raise_error
52
- end
53
- it do
54
- expect { RWS::Recipe.categories('large').first.ranking.first }
55
- end
56
- end
57
-
58
- describe RakutenWebService::Kobo do
59
- it do
60
- expect { RWS::Kobo::Ebook.search(keyword: 'Ruby').first }.not_to raise_error
61
- end
62
- it do
63
- expect { RWS::Kobo::Genre.search(kobo_genre_id: 101).first }.not_to raise_error
64
- end
65
- end
66
-
67
- describe RakutenWebService::Gora do
68
- it do
69
- expect { RWS::Gora::Course.search(keyword: 'セグウェイ').first }.not_to raise_error
70
- end
71
- it do
72
- expect { RWS::Gora::CourseDetail.search(golf_course_id: 80004).first }.not_to raise_error
73
- end
74
- xit do
75
- expect { RWS::Gora::Plan.search(playDate: '2017-01-11', areaCode: 0).first }.not_to raise_error
76
- end
77
- end
78
- end