Skip to content

Commit 3f9ae48

Browse files
authored
Remove unused preferences files + README (#58)
* Clean-up preferences * Update PR template
1 parent 27aed3a commit 3f9ae48

File tree

6 files changed

+5
-66
lines changed

6 files changed

+5
-66
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
- [ ] Have you built the package locally and made queries against it successfully?
1313
- [ ] Did you update the changelog?
1414
- [ ] Did you bump the package version?
15+
- [ ] If endpoints were removed, did you manually remove the corresponding files? (this should be rare)
1516
- [ ] For breaking changes, did you plan for the release of the new SDK versions and deploy the API to production?

README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -179,32 +179,6 @@ const minimumAvailableMass = 100; // Pass in the minimum available inventory the
179179
patch.projects.retrieveProjects({ minimumAvailableMass });
180180
```
181181

182-
### Preferences
183-
184-
Preferences are how you route your orders in Patch. If you don't have a preference, Patch will allocate your order to the least expensive option. If you do have a preference, all of your orders will be sent to that project. You can set your preferences via API, or through the [Patch Dashboard](https://dashboard.patch.io/projects).
185-
186-
[API Reference](https://docs.patch.io/#/?id=preferences)
187-
188-
#### Examples
189-
190-
```javascript
191-
// Create a preference
192-
const projectId = 'pro_test_1234'; // Pass in the project_id for your preference
193-
patch.preferences.createPreference({ project_id: projectId });
194-
195-
// Retrieve a preference
196-
const preferenceId = 'pre_test_1234'; // Pass in the preferences's id
197-
patch.preferences.retrievePreference(preferenceId);
198-
199-
// Delete a preference
200-
const preferenceId = 'pre_test_1234'; // Pass in the preferences's id
201-
patch.preferences.deletePreference(preferenceId);
202-
203-
// Retrieve a list of preferences
204-
const page = 1; // Pass in which page of preferences you'd like
205-
patch.preferences.retrievePreferences({ page });
206-
```
207-
208182
## Contributing
209183

210184
While we value open-source contributions to this SDK, the core of this library is generated programmatically. Complex additions made directly to the library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patch-technology/patch",
3-
"version": "1.17.0",
3+
"version": "1.17.1",
44
"description": "Node.js wrapper for the Patch API",
55
"license": "MIT",
66
"repository": {

src/ApiClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ApiClient {
1616
};
1717

1818
this.defaultHeaders = {
19-
'User-Agent': 'patch-node/1.17.0'
19+
'User-Agent': 'patch-node/1.17.1'
2020
};
2121

2222
/**

src/model/CreatePreferenceRequest.js

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)