Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Use "public-api" for URI instead of version no #28

Merged
merged 3 commits into from
Jun 18, 2016

Conversation

allolex
Copy link
Owner

@allolex allolex commented Feb 7, 2016

Brightpearl are deprecating the use of specific version numbers in the URI for their public API. Instead, you should use "public-api" in the same location within the URI.

  • Change "2.0.0" to "public-api".
  • Don't allow this change to be overridden in configuration.

This change will result in the config ignoring API versions being set, so the change is non-breaking.

I have tested the new URI's and they work.

Brightpearl are deprecating the use of specific version numbers in the URI for their public API. Instead, you should use "public-api" in the same location within the URI.

- Change "2.0.0" to "public-api".
- Don't allow this change to be overridden in configuration.

This change will result in the config ignoring API versions being set, so the change is non-breaking.

I have tested the new URI's and they work.
@allolex allolex self-assigned this Feb 7, 2016
@@ -31,7 +30,7 @@
end

it "should have the correct Resource URL" do
expect(config.resource_url).to eql("https://ws-eu1.brightpearl.com/2.0.0/%s" % [ENV["NACRE_USER_ID"]])
expect(config.resource_url).to eql("https://ws-eu1.brightpearl.com/public-api/%s" % [ENV["NACRE_USER_ID"]])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [113/80]
Favor format over String#%.

- Shorten lines
- Move hard-to-read variables into simple lets.
- Use interpolation instead of string formatting
@allolex
Copy link
Owner Author

allolex commented Feb 7, 2016

Brightpearl https://www.brightpearl.com/support/documentation/features-approaching-end-life

API version number in URIs

It was our original intention that the Brightpearl API be given its own version number, independent of the version of Brightpearl you were connecting to. An artifact of this early design can be seen in the API URIs which require you to include the unchanging 2.0.0 in your URIs. As you can see in our URI syntax documentation, 2.0.0 has been replaced with public-api.

Requests with 2.0.0 in the URI will stop working (DATE TBD).

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 99.116% when pulling 60fb1b5 on feature/public-api-in-uri into 7574823 on master.

@allolex allolex merged commit ab1031a into master Jun 18, 2016
@allolex allolex deleted the feature/public-api-in-uri branch January 2, 2017 18:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants