README.md in patch_ruby-1.3.0 vs README.md in patch_ruby-1.4.0
- old
+ new
@@ -142,10 +142,16 @@
```
### Projects
Projects are the ways Patch takes CO2 out of the air. They can represent reforestation, enhanced weathering, direct air carbon capture, etc. When you place an order via Patch, it is allocated to a project.
+When fetching Projects, you can add filters to the query to narrow the result. Currently supported filters are:
+
+- `country`
+- `type`
+- `minimum_available_mass`
+
[API Reference](https://docs.usepatch.com/#/?id=projects)
#### Examples
```ruby
# Retrieve a project
@@ -153,9 +159,21 @@
Patch::Project.retrieve_project(project_id)
# Retrieve a list of projects
page = 1 # Pass in which page of projects you'd like
Patch::Project.retrieve_projects(page: page)
+
+# Retrieve all projects from the United States
+country = 'US'
+Patch::Project.retrieve_projects(country: country)
+
+# Retrieve all biomass projects
+type = 'biomass'
+Patch::Project.retrieve_projects(type: type)
+
+# Retrieve a list of projects with at least 100 grams of available offsets
+minimum_available_mass = 100
+Patch::Project.retrieve_projects(minimum_available_mass: minimum_available_mass)
```
### 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.usepatch.com/projects).