Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OxfordDictionary::Endpoints::Entries #8

Merged
merged 4 commits into from
Jun 22, 2019
Merged

Conversation

swcraig
Copy link
Owner

@swcraig swcraig commented Jun 21, 2019

Adds basic support for Oxford Dictionaries' V2 release of the API.

The V1 API will be shut down on June 30th, so to keep things exciting
I'm putting this up with 10 days left.

The entries endpoint will come first, followed by lemmas, and then the others.

In V1, the response "entities" were built using snake_cased keys of the JSON
response from the API
. I propose for V2 that we stop doing this transform and
instead use camelCase keys (we grab the JSON keys verbatim and create
nested OpenStructs with them). To ease the transition, users can call the
#entry_snake_case method and transition to #entry whenever they
please.

This is mostly to show @ianrandmckenzie that I haven't forgot and V2
support is still happening. It's going down this weekend. My Saturday
is a few cups of coffee and some keyboard smashing.

Update (a commit message that actually explains what I'm doing):
This continues support for both V1 and V2 calls to the API without the
need for a code change. This should give callers some time to move
their usage to the new V2 approach (using named parameters, check
OxfordDictionary::Endpoints::Entries to see the new interface).

The general idea for upgrade is 1.1.0 for the V2 entries support.
Subsequent minor versions will likely include the rest of the endpoints
(Lemmas, Thesaurus, etc.) with 2.0.0 finally removing all V1 interfaces.

@swcraig swcraig force-pushed the v2-entries-endpoint branch 7 times, most recently from e034bd7 to fae7a18 Compare June 22, 2019 20:36
For V2 calls we can abstract the network part into this new class. The
idea being that classes to interface with the different endpoints are
instantiated with this thing so the endpoints themselves don't need to
be concerned with how the network calls happen.
@swcraig swcraig force-pushed the v2-entries-endpoint branch 3 times, most recently from 7524ffa to 7199fd0 Compare June 22, 2019 20:46
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

I've left this `#entry_snake_case` method so that if someone needs more
time to upgrade they can use this to keep snake cased keys in their
response objects. There's a more detailed message on the commit that
adds this to `OxfordDictionary::Client`'s interface.
This continues support for both V1 and V2 calls to the API without the
need for a code change. This _should_ give callers some time to move
their usage to the new V2 approach (using named parameters, check
`OxfordDictionary::Endpoints::Entries` to see the new interface).

The general idea for upgrade is 1.1.0 for the V2 entries support.
Subsequent minor versions will likely include the rest of the endpoints
(Lemmas, Thesaurus, etc.) with 2.0.0 finally removing all V1 interfaces.
For V2 we are going to stop snake casing the keys of the response. If
someone needs more time to upgrade their code, they can transition for
this call (which will continue to return the snake cased keys).

I plan on removing this in the next major version upgrade.
@swcraig swcraig marked this pull request as ready for review June 22, 2019 20:57
@swcraig swcraig merged commit ab116f8 into master Jun 22, 2019
@swcraig swcraig deleted the v2-entries-endpoint branch June 22, 2019 20:58
swcraig added a commit that referenced this pull request Jun 22, 2019
V1 API support from Oxford Dictionaries will end on June 30, 2019:
https://developer.oxforddictionaries.com/version2

Current library uses will see deprecation warnings for the
`Client#entry` calls (until they upgrade to named parameters).

Reference #8 for more
information. The new interface is shown in
`OxfordDictionary::Endpoints::Entries`.
@swcraig swcraig mentioned this pull request Jun 22, 2019
swcraig added a commit that referenced this pull request Jun 22, 2019
V1 API support from Oxford Dictionaries will end on June 30, 2019:
https://developer.oxforddictionaries.com/version2

Current library uses will see deprecation warnings for the
`Client#entry` calls (until they upgrade to named parameters).

Reference #8 for more
information. The new interface is shown in
`OxfordDictionary::Endpoints::Entries`.
@swcraig swcraig mentioned this pull request Jun 22, 2019
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

They are moving the translations functionality to its own endpoint
(instead of having part of the entries endpoint).

As mentioned in the tests, this only unit tests the endpoint. If someone
would like to contribute, please feel free to update and run the specs
(similar to what was done for the Entries and Lemmas endpoints).

Entries: #8
Lemmas: #10
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

They are moving the translations functionality to its own endpoint
(instead of having part of the entries endpoint).

As mentioned in the tests, this only unit tests the endpoint. If someone
would like to contribute, please feel free to update and run the specs
(similar to what was done for the Entries and Lemmas endpoints).

Entries: #8
Lemmas: #10
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

They are moving the translations functionality to its own endpoint
(instead of having part of the entries endpoint).

As mentioned in the tests, this only unit tests the endpoint. If someone
would like to contribute, please feel free to update and run the specs
(similar to what was done for the Entries and Lemmas endpoints).

Entries: #8
Lemmas: #10
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

They are moving the sentences functionality to its own endpoint
(instead of having part of the entries endpoint).

As mentioned in the tests, this only unit tests the endpoint. If someone
would like to contribute, please feel free to update and run the specs
(similar to what was done for the Entries and Lemmas endpoints).

Entries: #8
Lemmas: #10
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

They are moving the sentences functionality to its own endpoint
(instead of having part of the entries endpoint).

As mentioned in the tests, this only unit tests the endpoint. If someone
would like to contribute, please feel free to update and run the specs
(similar to what was done for the Entries and Lemmas endpoints).

Entries: #8
Lemmas: #10
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

They are moving the thesaurus functionality to its own endpoint
(instead of having part of the entries endpoint).

As mentioned in the tests, this only unit tests the endpoint. If someone
would like to contribute, please feel free to update and run the specs
(similar to what was done for the Entries and Lemmas endpoints).

Entries: #8
Lemmas: #10
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

They are moving the thesaurus functionality to its own endpoint
(instead of having part of the entries endpoint).

As mentioned in the tests, this only unit tests the endpoint. If someone
would like to contribute, please feel free to update and run the specs
(similar to what was done for the Entries and Lemmas endpoints).

Entries: #8
Lemmas: #10
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

There have been updates to the search functionality which is documented
in the migration guide linked above.

As mentioned in the tests, this only unit tests the endpoint. If someone
would like to contribute, please feel free to update and run the specs
(similar to what was done for the Entries and Lemmas endpoints).

Entries: #8
Lemmas: #10
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

There have been updates to the search functionality which is documented
in the migration guide linked above.

As mentioned in the tests, this only unit tests the endpoint. If someone
would like to contribute, please feel free to update and run the specs
(similar to what was done for the Entries and Lemmas endpoints).

Entries: #8
Lemmas: #10
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

There have been updates to the search functionality which is documented
in the migration guide linked above.

As mentioned in the tests, this only unit tests the endpoint. If someone
would like to contribute, please feel free to update and run the specs
(similar to what was done for the Entries and Lemmas endpoints).

Entries: #8
Lemmas: #10
swcraig added a commit that referenced this pull request Jun 23, 2019
Missed these in #8.

As per the `warn` in the methods, use the new `Client#entry` method with
named parameters using the `params` hash to define which information you
would like to get back in the call.
swcraig added a commit that referenced this pull request Jun 23, 2019
Missed these in #8.

As per the `warn` in the methods, use the new `Client#entry` method with
named parameters using the `params` hash to define which information you
would like to get back in the call.
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

Oxford Dictionaries is taking their V1 API offline on June 30, 2019.

The deprecation warnings (please check the closed PRs online which
include them) should give an idea on how users should update their
applications to use the new V2 interfaces. All V2 interfaces use named
parameters and specifically leverage their `params` arguments for more
control over how the endpoints are called. Check out [Oxford
Dictionaries' online documentation]
(https://developer.oxforddictionaries.com/documentation), the specs, and
the commit messages for the V2 endpoints for more information.

v1.3.0 does not include a README update (I will do that when I cut
v2.0.0).

The 2.0.0 of this library will include the removal of all V1 interfaces.

The V2 interfaces for this library are in the following PRs:
Entries: #8
Translations: #12
Sentences: #13
Thesaurus: #14
Lemmas: #10
Search: #15
@swcraig swcraig mentioned this pull request Jun 23, 2019
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

Oxford Dictionaries is taking their V1 API offline on June 30, 2019.

The deprecation warnings (please check the closed PRs online which
include them) should give an idea on how users should update their
applications to use the new V2 interfaces. All V2 interfaces use named
parameters and specifically leverage their `params` arguments for more
control over how the endpoints are called. Check out [Oxford
Dictionaries' online documentation]
(https://developer.oxforddictionaries.com/documentation), the specs, and
the commit messages for the V2 endpoints for more information.

v1.3.0 does not include a README update (I will do that when I cut
v2.0.0).

The 2.0.0 of this library will include the removal of all V1 interfaces.

The V2 interfaces for this library are in the following PRs:
Entries: #8
Translations: #12
Sentences: #13
Thesaurus: #14
Lemmas: #10
Search: #15
swcraig added a commit that referenced this pull request Jun 23, 2019
Oxford Dictionaries is updating their API to a new version which
includes quite a few changes:
https://developer.oxforddictionaries.com/version2

Oxford Dictionaries is taking their V1 API offline on June 30, 2019.

The deprecation warnings (please check the closed PRs online which
include them) should give an idea on how users should update their
applications to use the new V2 interfaces. All V2 interfaces use named
parameters and specifically leverage their `params` arguments for more
control over how the endpoints are called. Check out [Oxford
Dictionaries' online documentation]
(https://developer.oxforddictionaries.com/documentation), the specs, and
the commit messages for the V2 endpoints for more information.

v1.3.0 does not include a README update (I will do that when I cut
v2.0.0).

The 2.0.0 of this library will include the removal of all V1 interfaces.

The V2 interfaces for this library are in the following PRs:
Entries: #8
Translations: #12
Sentences: #13
Thesaurus: #14
Lemmas: #10
Search: #15
swcraig added a commit that referenced this pull request Jun 30, 2019
Oxford Dictionaries is making multiple changes to their API with a new
V2 release. The closed PRs adding the new endpoints for V2 outline how
to use the new interfaces. Oxford Dictionaries is taking the V1 API down
on June 30, 2019. Specifically reference this PR:
#8

https://developer.oxforddictionaries.com/version2
swcraig added a commit that referenced this pull request Jun 30, 2019
Oxford Dictionaries is making multiple changes to their API with a new
V2 release. The closed PRs adding the new endpoints for V2 outline how
to use the new interfaces. Oxford Dictionaries is taking the V1 API down
on June 30, 2019. Specifically reference this PR:
#8

https://developer.oxforddictionaries.com/version2
swcraig added a commit that referenced this pull request Jun 30, 2019
Oxford Dictionaries is making multiple changes to their API with a new
V2 release. The closed PRs adding the new endpoints for V2 outline how
to use the new interfaces. Oxford Dictionaries is taking the V1 API down
on June 30, 2019. Specifically reference this PR:
#8

https://developer.oxforddictionaries.com/version2
swcraig added a commit that referenced this pull request Jun 30, 2019
Oxford Dictionaries is making multiple changes to their API with a new
V2 release. The closed PRs adding the new endpoints for V2 outline how
to use the new interfaces. Oxford Dictionaries is taking the V1 API down
on June 30, 2019. Specifically reference this PR:
#8

https://developer.oxforddictionaries.com/version2
swcraig added a commit that referenced this pull request Jun 30, 2019
Oxford Dictionaries is making multiple changes to their API with a new
V2 release. The closed PRs adding the new endpoints for V2 outline how
to use the new interfaces. Oxford Dictionaries is taking the V1 API down
on June 30, 2019. Specifically reference this PR:
#8

https://developer.oxforddictionaries.com/version2
swcraig added a commit that referenced this pull request Jun 30, 2019
Oxford Dictionaries is making multiple changes to their API with a new
V2 release. The closed PRs adding the new endpoints for V2 outline how
to use the new interfaces. Oxford Dictionaries is taking the V1 API down
on June 30, 2019. Specifically reference this PR:
#8

https://developer.oxforddictionaries.com/version2
swcraig added a commit that referenced this pull request Jun 30, 2019
Oxford Dictionaries has discontinued their V1 API (it will be taken
offline on June 30, 2019). As part of the upgrade of this wrapper the
new interface uses named parameters.

Reference the following PRs for the new usage:
- Entries: #8
- Translations: #12
- Sentences: #13
- Thesaurus: #14
- Lemmas: #10
- Search: #15

All of the response objects are OpenStructs with camelCase keys. This is
a departure from V1 (which used snake_case keys in the response).
swcraig added a commit that referenced this pull request Jun 30, 2019
Oxford Dictionaries has discontinued their V1 API (it will be taken
offline on June 30, 2019). As part of the upgrade of this wrapper the
new interface uses named parameters.

Reference the following PRs for the new usage:
- Entries: #8
- Translations: #12
- Sentences: #13
- Thesaurus: #14
- Lemmas: #10
- Search: #15

All of the response objects are OpenStructs with camelCase keys. This is
a departure from V1 (which used snake_case keys in the response).
swcraig added a commit that referenced this pull request Jun 30, 2019
Oxford Dictionaries has made a V2 upgrade to their API and will be
taking their V1 API offline on June 30, 2019.

Reference the following PRs for the new usage:
- Entries: #8
- Translations: #12
- Sentences: #13
- Thesaurus: #14
- Lemmas: #10
- Search: #15

This version uses the V2 endpoints exclusively.
@swcraig swcraig mentioned this pull request Jun 30, 2019
swcraig added a commit that referenced this pull request Jun 30, 2019
Oxford Dictionaries has made a V2 upgrade to their API and will be
taking their V1 API offline on June 30, 2019.

Reference the following PRs for the new usage:
- Entries: #8
- Translations: #12
- Sentences: #13
- Thesaurus: #14
- Lemmas: #10
- Search: #15

This version uses the V2 endpoints exclusively.
swcraig added a commit that referenced this pull request Jun 30, 2019
Oxford Dictionaries has made a V2 upgrade to their API and will be
taking their V1 API offline on June 30, 2019.

Reference the following PRs for the new usage:
- Entries: #8
- Translations: #12
- Sentences: #13
- Thesaurus: #14
- Lemmas: #10
- Search: #15

This version uses the V2 endpoints exclusively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant