-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Summary
Expand the Client to also support a Client.opportunities.search() method which makes calls to the POST /common-grants/opportunities/search/ endpoint. The first iteration can support only default fields and filters.
Acceptance criteria
- SDK users can search opportunities with the following code:
from commongrants.client import Client, Auth
from commongrants.schemas.pydantic import Opportunity
client = Client(
base_url="https://api.example.org",
auth=Auth.bearer("YOUR_TOKEN"),
timeout=10, # seconds
)
# List opportunities with transparent pagination and typed results
# If `total=` exceeds max batch size (100) then paginate the results
for opp in client.opportunities.search(q="Education", status="open", paginate=True):
print(opp.id, opp.title)Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
In Progress