-
Notifications
You must be signed in to change notification settings - Fork 682
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
Create new topic for the Peregrine REST API client #259
Conversation
Moving review and merge tasks to Sprint 25. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great and well edited as always. Just one structural change and a couple of renames.
@@ -18,5 +18,8 @@ entries: | |||
- label: List | |||
url: /peregrine/reference/list/ | |||
|
|||
- label: REST API client | |||
url: /peregrine/reference/rest-api-client/ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Peregrine, a Component
isn't a generic term like it is for other contexts. Peregrine includes utilities and stuff, but its Components are literally React Components. So I don't think we should list the REST API client in Components, since it's just a JavaScript module and not a React component.
I think this might demand a separate section for "Modules", with short explanations that Components are React Components and Modules are other utilities.
|
||
### Error handling | ||
|
||
Promoises returned by `request()` are rejected if the server responds with an HTTP error code within the 4xx-5xx range. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo, Promoises
.
|
||
To use a rolling request, set the `cache` configuration option to `reload` or `no-store`. | ||
|
||
### The `Magento2ApiRequest` class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This inconsistency is from me, not you, but in retrospect, we're going back and forth with calling this class Magento2ApiRequest
and M2ApiRequest
. In the code, the property on the request
function is named M2ApiRequest
, so we should replace all instances of Magento2ApiRequest
with M2ApiRequest
.
Pull Request Test Coverage Report for Build 930
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic, thank you!
This PR is a:
[ ] New feature
[ ] Enhancement/Optimization
[ ] Refactor
[ ] Bugfix
[ ] Test for existing code
[X] Documentation
Summary
When this pull request is merged, it will create a new documentation page for the Peregrine REST API client.