Skip to content

Commit

Permalink
Remove unused preferences files + README (#58)
Browse files Browse the repository at this point in the history
* Clean-up preferences

* Update PR template
  • Loading branch information
pcothenet authored Feb 3, 2022
1 parent 27aed3a commit 3f9ae48
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 66 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
- [ ] Have you built the package locally and made queries against it successfully?
- [ ] Did you update the changelog?
- [ ] Did you bump the package version?
- [ ] If endpoints were removed, did you manually remove the corresponding files? (this should be rare)
- [ ] For breaking changes, did you plan for the release of the new SDK versions and deploy the API to production?
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,32 +179,6 @@ const minimumAvailableMass = 100; // Pass in the minimum available inventory the
patch.projects.retrieveProjects({ minimumAvailableMass });
```

### Preferences

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).

[API Reference](https://docs.patch.io/#/?id=preferences)

#### Examples

```javascript
// Create a preference
const projectId = 'pro_test_1234'; // Pass in the project_id for your preference
patch.preferences.createPreference({ project_id: projectId });

// Retrieve a preference
const preferenceId = 'pre_test_1234'; // Pass in the preferences's id
patch.preferences.retrievePreference(preferenceId);

// Delete a preference
const preferenceId = 'pre_test_1234'; // Pass in the preferences's id
patch.preferences.deletePreference(preferenceId);

// Retrieve a list of preferences
const page = 1; // Pass in which page of preferences you'd like
patch.preferences.retrievePreferences({ page });
```

## Contributing

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!
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@patch-technology/patch",
"version": "1.17.0",
"version": "1.17.1",
"description": "Node.js wrapper for the Patch API",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ApiClient {
};

this.defaultHeaders = {
'User-Agent': 'patch-node/1.17.0'
'User-Agent': 'patch-node/1.17.1'
};

/**
Expand Down
36 changes: 0 additions & 36 deletions src/model/CreatePreferenceRequest.js

This file was deleted.

0 comments on commit 3f9ae48

Please sign in to comment.