oxford_dictionary 1.3.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +37 -49
  4. data/fixtures/vcr_cassettes/v1_entry.yml +526 -0
  5. data/fixtures/vcr_cassettes/v1_entry_antonym_synonym.yml +42 -0
  6. data/fixtures/vcr_cassettes/v1_entry_antonyms.yml +42 -0
  7. data/fixtures/vcr_cassettes/v1_entry_definitions.yml +228 -0
  8. data/fixtures/vcr_cassettes/v1_entry_error.yml +49 -0
  9. data/fixtures/vcr_cassettes/v1_entry_es.yml +108 -0
  10. data/fixtures/vcr_cassettes/v1_entry_examples.yml +242 -0
  11. data/fixtures/vcr_cassettes/v1_entry_past_nouns.yml +49 -0
  12. data/fixtures/vcr_cassettes/v1_entry_pronunciations.yml +156 -0
  13. data/fixtures/vcr_cassettes/v1_entry_synonyms.yml +42 -0
  14. data/fixtures/vcr_cassettes/v1_entry_us.yml +526 -0
  15. data/fixtures/vcr_cassettes/v1_inflection.yml +74 -0
  16. data/fixtures/vcr_cassettes/v1_inflection_filters.yml +52 -0
  17. data/fixtures/vcr_cassettes/v1_search.yml +42 -0
  18. data/fixtures/vcr_cassettes/v1_search_prefix.yml +42 -0
  19. data/fixtures/vcr_cassettes/v1_search_translation.yml +42 -0
  20. data/lib/oxford_dictionary/client.rb +211 -18
  21. data/lib/oxford_dictionary/version.rb +1 -1
  22. metadata +19 -16
  23. data/lib/oxford_dictionary/api_objects/entry.rb +0 -11
  24. data/lib/oxford_dictionary/api_objects/entry_response.rb +0 -12
  25. data/lib/oxford_dictionary/api_objects/lexical_entry.rb +0 -16
  26. data/lib/oxford_dictionary/api_objects/list_response.rb +0 -7
  27. data/lib/oxford_dictionary/api_objects/pronunciation.rb +0 -10
  28. data/lib/oxford_dictionary/api_objects/sense.rb +0 -19
  29. data/lib/oxford_dictionary/deprecated_request.rb +0 -127
  30. data/lib/oxford_dictionary/endpoints/entry_endpoint.rb +0 -131
  31. data/lib/oxford_dictionary/endpoints/inflection_endpoint.rb +0 -23
  32. data/lib/oxford_dictionary/endpoints/search_endpoint.rb +0 -26
  33. data/lib/oxford_dictionary/endpoints/wordlist_endpoint.rb +0 -35
  34. data/lib/oxford_dictionary/error.rb +0 -10
@@ -0,0 +1,156 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://od-api.oxforddictionaries.com/api/v2/entries/en-gb/ace?fields=pronunciations
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - od-api.oxforddictionaries.com
18
+ App-Id:
19
+ - APP_ID
20
+ App-Key:
21
+ - APP_KEY
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Api-Version:
28
+ - v2
29
+ Code-Version:
30
+ - v2.3.2-g02aa52c
31
+ Content-Type:
32
+ - application/json;charset=utf-8
33
+ Date:
34
+ - Sun, 30 Jun 2019 01:14:02 GMT
35
+ Server:
36
+ - openresty/1.13.6.2
37
+ Content-Length:
38
+ - '4931'
39
+ Connection:
40
+ - keep-alive
41
+ body:
42
+ encoding: ASCII-8BIT
43
+ string: !binary |-
44
+ ewogICAgImlkIjogImFjZSIsCiAgICAibWV0YWRhdGEiOiB7CiAgICAgICAg
45
+ Im9wZXJhdGlvbiI6ICJyZXRyaWV2ZSIsCiAgICAgICAgInByb3ZpZGVyIjog
46
+ Ik94Zm9yZCBVbml2ZXJzaXR5IFByZXNzIiwKICAgICAgICAic2NoZW1hIjog
47
+ IlJldHJpZXZlRW50cnkiCiAgICB9LAogICAgInJlc3VsdHMiOiBbCiAgICAg
48
+ ICAgewogICAgICAgICAgICAiaWQiOiAiYWNlIiwKICAgICAgICAgICAgImxh
49
+ bmd1YWdlIjogImVuLWdiIiwKICAgICAgICAgICAgImxleGljYWxFbnRyaWVz
50
+ IjogWwogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICJl
51
+ bnRyaWVzIjogWwogICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAg
52
+ ICAgICAgICAgICAgICAgICAgICAiaG9tb2dyYXBoTnVtYmVyIjogIjEwMCIK
53
+ ICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAg
54
+ IF0sCiAgICAgICAgICAgICAgICAgICAgImxhbmd1YWdlIjogImVuLWdiIiwK
55
+ ICAgICAgICAgICAgICAgICAgICAibGV4aWNhbENhdGVnb3J5IjogewogICAg
56
+ ICAgICAgICAgICAgICAgICAgICAiaWQiOiAibm91biIsCiAgICAgICAgICAg
57
+ ICAgICAgICAgICAgICJ0ZXh0IjogIk5vdW4iCiAgICAgICAgICAgICAgICAg
58
+ ICAgfSwKICAgICAgICAgICAgICAgICAgICAicHJvbnVuY2lhdGlvbnMiOiBb
59
+ CiAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAg
60
+ ICAgICAgICAgICJhdWRpb0ZpbGUiOiAiaHR0cDovL2F1ZGlvLm94Zm9yZGRp
61
+ Y3Rpb25hcmllcy5jb20vZW4vbXAzL2FjZV8xX2diXzFfYWJici5tcDMiLAog
62
+ ICAgICAgICAgICAgICAgICAgICAgICAgICAgImRpYWxlY3RzIjogWwogICAg
63
+ ICAgICAgICAgICAgICAgICAgICAgICAgICAgICJCcml0aXNoIEVuZ2xpc2gi
64
+ CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAg
65
+ ICAgICAgICAgICAgICAgInBob25ldGljTm90YXRpb24iOiAiSVBBIiwKICAg
66
+ ICAgICAgICAgICAgICAgICAgICAgICAgICJwaG9uZXRpY1NwZWxsaW5nIjog
67
+ ImXJqnMiCiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAg
68
+ ICAgICAgICBdLAogICAgICAgICAgICAgICAgICAgICJ0ZXh0IjogImFjZSIK
69
+ ICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB7CiAgICAgICAg
70
+ ICAgICAgICAgICAgImVudHJpZXMiOiBbCiAgICAgICAgICAgICAgICAgICAg
71
+ ICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJob21vZ3JhcGhO
72
+ dW1iZXIiOiAiMTAxIgogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAg
73
+ ICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICAibGFuZ3Vh
74
+ Z2UiOiAiZW4tZ2IiLAogICAgICAgICAgICAgICAgICAgICJsZXhpY2FsQ2F0
75
+ ZWdvcnkiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJpZCI6ICJhZGpl
76
+ Y3RpdmUiLAogICAgICAgICAgICAgICAgICAgICAgICAidGV4dCI6ICJBZGpl
77
+ Y3RpdmUiCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAg
78
+ ICAgICAicHJvbnVuY2lhdGlvbnMiOiBbCiAgICAgICAgICAgICAgICAgICAg
79
+ ICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJhdWRpb0ZpbGUi
80
+ OiAiaHR0cDovL2F1ZGlvLm94Zm9yZGRpY3Rpb25hcmllcy5jb20vZW4vbXAz
81
+ L2FjZV8xX2diXzFfYWJici5tcDMiLAogICAgICAgICAgICAgICAgICAgICAg
82
+ ICAgICAgImRpYWxlY3RzIjogWwogICAgICAgICAgICAgICAgICAgICAgICAg
83
+ ICAgICAgICJCcml0aXNoIEVuZ2xpc2giCiAgICAgICAgICAgICAgICAgICAg
84
+ ICAgICAgICBdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgInBob25l
85
+ dGljTm90YXRpb24iOiAiSVBBIiwKICAgICAgICAgICAgICAgICAgICAgICAg
86
+ ICAgICJwaG9uZXRpY1NwZWxsaW5nIjogImXJqnMiCiAgICAgICAgICAgICAg
87
+ ICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBdLAogICAgICAgICAg
88
+ ICAgICAgICAgICJ0ZXh0IjogImFjZSIKICAgICAgICAgICAgICAgIH0sCiAg
89
+ ICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgImVudHJpZXMi
90
+ OiBbCiAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAg
91
+ ICAgICAgICAgICAgICJob21vZ3JhcGhOdW1iZXIiOiAiMTAyIgogICAgICAg
92
+ ICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgXSwKICAg
93
+ ICAgICAgICAgICAgICAgICAibGFuZ3VhZ2UiOiAiZW4tZ2IiLAogICAgICAg
94
+ ICAgICAgICAgICAgICJsZXhpY2FsQ2F0ZWdvcnkiOiB7CiAgICAgICAgICAg
95
+ ICAgICAgICAgICAgICJpZCI6ICJ2ZXJiIiwKICAgICAgICAgICAgICAgICAg
96
+ ICAgICAgInRleHQiOiAiVmVyYiIKICAgICAgICAgICAgICAgICAgICB9LAog
97
+ ICAgICAgICAgICAgICAgICAgICJwcm9udW5jaWF0aW9ucyI6IFsKICAgICAg
98
+ ICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAg
99
+ ICAgImF1ZGlvRmlsZSI6ICJodHRwOi8vYXVkaW8ub3hmb3JkZGljdGlvbmFy
100
+ aWVzLmNvbS9lbi9tcDMvYWNlXzFfZ2JfMV9hYmJyLm1wMyIsCiAgICAgICAg
101
+ ICAgICAgICAgICAgICAgICAgICAiZGlhbGVjdHMiOiBbCiAgICAgICAgICAg
102
+ ICAgICAgICAgICAgICAgICAgICAgIkJyaXRpc2ggRW5nbGlzaCIKICAgICAg
103
+ ICAgICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAg
104
+ ICAgICAgICAicGhvbmV0aWNOb3RhdGlvbiI6ICJJUEEiLAogICAgICAgICAg
105
+ ICAgICAgICAgICAgICAgICAgInBob25ldGljU3BlbGxpbmciOiAiZcmqcyIK
106
+ ICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAg
107
+ IF0sCiAgICAgICAgICAgICAgICAgICAgInRleHQiOiAiYWNlIgogICAgICAg
108
+ ICAgICAgICAgfQogICAgICAgICAgICBdLAogICAgICAgICAgICAidHlwZSI6
109
+ ICJoZWFkd29yZCIsCiAgICAgICAgICAgICJ3b3JkIjogImFjZSIKICAgICAg
110
+ ICB9LAogICAgICAgIHsKICAgICAgICAgICAgImlkIjogImFjZSIsCiAgICAg
111
+ ICAgICAgICJsYW5ndWFnZSI6ICJlbi1nYiIsCiAgICAgICAgICAgICJsZXhp
112
+ Y2FsRW50cmllcyI6IFsKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAg
113
+ ICAgICAgICAiZW50cmllcyI6IFsKICAgICAgICAgICAgICAgICAgICAgICAg
114
+ ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgImhvbW9ncmFwaE51bWJl
115
+ ciI6ICIyMDAiCiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAg
116
+ ICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgICAgICJsYW5ndWFnZSI6
117
+ ICJlbi1nYiIsCiAgICAgICAgICAgICAgICAgICAgImxleGljYWxDYXRlZ29y
118
+ eSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgImlkIjogIm5vdW4iLAog
119
+ ICAgICAgICAgICAgICAgICAgICAgICAidGV4dCI6ICJOb3VuIgogICAgICAg
120
+ ICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgInByb251bmNp
121
+ YXRpb25zIjogWwogICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAg
122
+ ICAgICAgICAgICAgICAgICAgICAiYXVkaW9GaWxlIjogImh0dHA6Ly9hdWRp
123
+ by5veGZvcmRkaWN0aW9uYXJpZXMuY29tL2VuL21wMy9hY2VfMV9nYl8xX2Fi
124
+ YnIubXAzIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJkaWFsZWN0
125
+ cyI6IFsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiQnJpdGlz
126
+ aCBFbmdsaXNoIgogICAgICAgICAgICAgICAgICAgICAgICAgICAgXSwKICAg
127
+ ICAgICAgICAgICAgICAgICAgICAgICAgICJwaG9uZXRpY05vdGF0aW9uIjog
128
+ IklQQSIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAicGhvbmV0aWNT
129
+ cGVsbGluZyI6ICJlyapzIgogICAgICAgICAgICAgICAgICAgICAgICB9CiAg
130
+ ICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICAidGV4
131
+ dCI6ICJhY2UiCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAg
132
+ ewogICAgICAgICAgICAgICAgICAgICJlbnRyaWVzIjogWwogICAgICAgICAg
133
+ ICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAi
134
+ aG9tb2dyYXBoTnVtYmVyIjogIjIwMSIKICAgICAgICAgICAgICAgICAgICAg
135
+ ICAgfQogICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAg
136
+ ICAgImxhbmd1YWdlIjogImVuLWdiIiwKICAgICAgICAgICAgICAgICAgICAi
137
+ bGV4aWNhbENhdGVnb3J5IjogewogICAgICAgICAgICAgICAgICAgICAgICAi
138
+ aWQiOiAiYWRqZWN0aXZlIiwKICAgICAgICAgICAgICAgICAgICAgICAgInRl
139
+ eHQiOiAiQWRqZWN0aXZlIgogICAgICAgICAgICAgICAgICAgIH0sCiAgICAg
140
+ ICAgICAgICAgICAgICAgInByb251bmNpYXRpb25zIjogWwogICAgICAgICAg
141
+ ICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAi
142
+ YXVkaW9GaWxlIjogImh0dHA6Ly9hdWRpby5veGZvcmRkaWN0aW9uYXJpZXMu
143
+ Y29tL2VuL21wMy9hY2VfMV9nYl8xX2FiYnIubXAzIiwKICAgICAgICAgICAg
144
+ ICAgICAgICAgICAgICAgICJkaWFsZWN0cyI6IFsKICAgICAgICAgICAgICAg
145
+ ICAgICAgICAgICAgICAgICAiQnJpdGlzaCBFbmdsaXNoIgogICAgICAgICAg
146
+ ICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICAgICAg
147
+ ICAgICJwaG9uZXRpY05vdGF0aW9uIjogIklQQSIsCiAgICAgICAgICAgICAg
148
+ ICAgICAgICAgICAgICAicGhvbmV0aWNTcGVsbGluZyI6ICJlyapzIgogICAg
149
+ ICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgXSwK
150
+ ICAgICAgICAgICAgICAgICAgICAidGV4dCI6ICJhY2UiCiAgICAgICAgICAg
151
+ ICAgICB9CiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJ0eXBlIjogImhl
152
+ YWR3b3JkIiwKICAgICAgICAgICAgIndvcmQiOiAiYWNlIgogICAgICAgIH0K
153
+ ICAgIF0sCiAgICAid29yZCI6ICJhY2UiCn0=
154
+ http_version:
155
+ recorded_at: Sun, 30 Jun 2019 01:14:02 GMT
156
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,42 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://od-api.oxforddictionaries.com/api/v2/thesaurus/en/vapid?fields=synonyms
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - od-api.oxforddictionaries.com
18
+ App-Id:
19
+ - APP_ID
20
+ App-Key:
21
+ - APP_KEY
22
+ response:
23
+ status:
24
+ code: 403
25
+ message: Forbidden
26
+ headers:
27
+ Content-Type:
28
+ - text/plain; charset=us-ascii
29
+ Date:
30
+ - Sun, 30 Jun 2019 01:14:05 GMT
31
+ Server:
32
+ - openresty/1.13.6.2
33
+ Content-Length:
34
+ - '21'
35
+ Connection:
36
+ - keep-alive
37
+ body:
38
+ encoding: UTF-8
39
+ string: Authentication failed
40
+ http_version:
41
+ recorded_at: Sun, 30 Jun 2019 01:14:05 GMT
42
+ recorded_with: VCR 4.0.0