Skip to content

Commit d785803

Browse files
authored
Update README links and remove deprecated preferences modules (#51)
* update links * remove deprecated preferences * remove deprecated modules
1 parent 9f6d40b commit d785803

File tree

3 files changed

+3
-808
lines changed

3 files changed

+3
-808
lines changed

README.md

+3-34
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ If you do not know how much to purchase, use an estimate.
5757
You can also create an order with a maximum desired price, and we'll allocate enough mass to
5858
fulfill the order for you.
5959

60-
[API Reference](https://docs.usepatch.com/#/?id=orders)
60+
[API Reference](https://docs.patch.io/#/orders)
6161

6262
#### Examples
6363

@@ -105,7 +105,7 @@ patch.orders.retrieve_orders(page=page)
105105

106106
Estimates allow API users to get a quote for the cost of compensating a certain amount of CO2. When creating an estimate, an order in the `draft` state will also be created, reserving the allocation of a project for 5 minutes. If you don't place your draft order within those 5 minutes, the order will automatically be cancelled.
107107

108-
[API Reference](https://docs.usepatch.com/#/?id=estimates)
108+
[API Reference](https://docs.patch.io/#/estimates)
109109

110110
#### Examples
111111

@@ -162,7 +162,7 @@ When fetching projects, you can supply filters to the query to narrow your resul
162162
- `type`
163163
- `minimum_available_mass`
164164

165-
[API Reference](https://docs.usepatch.com/#/?id=projects)
165+
[API Reference](https://docs.patch.io/#/projects)
166166

167167
#### Examples
168168

@@ -189,37 +189,6 @@ patch.projects.retrieve_projects(country="CA")
189189
patch.projects.retrieve_projects(minimum_available_mass=100)
190190
```
191191

192-
### Preferences
193-
194-
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.usepatch.com/projects).
195-
196-
[API Reference](https://docs.usepatch.com/#/?id=preferences)
197-
198-
#### Examples
199-
200-
```python
201-
import patch_api
202-
203-
patch = patch_api.ApiClient(api_key=os.environ.get('SANDBOX_API_KEY'))
204-
205-
# Create a preference
206-
207-
project_id = 'pro_test_1234' # Pass in the project_id for your preference
208-
patch.preferences.create_preference(project_id=project_id)
209-
210-
# Retrieve a preference
211-
preference_id = 'pre_test_1234' # Pass in the preferences's id
212-
patch.preferences.retrieve_preference(preference_id=preference_id)
213-
214-
# Delete a preference
215-
preference_id = 'pre_test_1234' # Pass in the preferences's id
216-
patch.preferences.delete_preference(preference_id=preference_id)
217-
218-
# Retrieve a list of preferences
219-
page = 1 # Pass in which page of preferences you'd like
220-
patch.preferences.retrieve_preferences(page=page)
221-
```
222-
223192
## Contributing
224193

225194
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!

0 commit comments

Comments
 (0)