You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Golang API client for interacting with the [ProPublica Congress API](https://www.propublica.org/datastore/api/propublica-congress-api), which provides access to some of the most extensive data available about the United States Congress, both its current sessions and going decades into the past. **This library is in no was affiliated with ProPublica or Congress.**
3
+
A Golang API client for interacting with the [ProPublica Congress API](https://www.propublica.org/datastore/api/propublica-congress-api), which provides access to some of the most extensive data available about the United States Congress, both its current sessions and going decades into the past. **This library is in no was affiliated with ProPublica or Congress.**
4
+
5
+
## Getting started
6
+
7
+
Add `import "github.com/rabdill/go-congress/congress"` to the top of your script or application file, with the rest of your imports. From there, all you need to start making calls is a client:
(You can request a free API key from ProPublica [on their website](https://www.propublica.org/datastore/api/propublica-congress-api), which also has the [API documentation](https://projects.propublica.org/api-docs/congress-api/).)
17
+
18
+
Authenticating to the Congress API is simple and happens without intervention; you can jump right into making calls now:
19
+
20
+
```go
21
+
members, _:= c.GetDepartingMembers(115, "senate")
22
+
```
23
+
24
+
If you just want to test things out (and make sure your key is working), you can create a file called `main.go` in the root of this repository and paste this code in:
From there, all you'll need to do is run `go run main.go` and it should print out a list of members departing the current Senate. Uncommenting any of the other calls will give you different sets of results.
0 commit comments