Skip to content

Implement awards, agencies, recipients ops#1

Merged
tamnd merged 1 commit into
mainfrom
feat/implement-usaspending-ops
Jun 14, 2026
Merged

Implement awards, agencies, recipients ops#1
tamnd merged 1 commit into
mainfrom
feat/implement-usaspending-ops

Conversation

@tamnd

@tamnd tamnd commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces scaffold stubs in usaspending/usaspending.go and usaspending/domain.go with three real operations against https://api.usaspending.gov/api/v2
  • awards — search federal contracts/grants via POST /search/spending_by_award/; supports --agency, --keyword, --award-type (contract/grant), --year, --limit
  • agencies — list federal agencies with obligated spending via POST /spending/; supports --fy, --limit
  • recipients — top recipients by spending via POST /search/spending_by_category/recipient/; supports --year, --award-type, --limit

Test plan

  • go test ./usaspending/... passes (7 tests, all offline via httptest)
  • ./bin/usaspending agencies --limit 5 returns live agency data
  • ./bin/usaspending awards --limit 3 returns live award data
  • ./bin/usaspending recipients --limit 5 returns live recipient data

Three list operations against https://api.usaspending.gov/api/v2:
- awards: search federal contracts/grants via /search/spending_by_award/
- agencies: list agencies with obligated spending via /spending/
- recipients: top spenders via /search/spending_by_category/recipient/

All ops tested offline (httptest) and verified live against the real API.
@tamnd tamnd merged commit 38965a5 into main Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant