GovLib is a .NET Standard library that provides intuitive access to various government-related APIs. Currently only the ProPublica Congress API is available, but more modules are planned. Project under heavy development and may be subject to change.
Install using the .NET CLI (explicit version is required in pre-releases):
dotnet add package govlib
Instantiate the congress module using an API key string:
var congress = new Congress(apiKey); // A few of the API calls available in the Members module var reps = congress.Members.GetAllRepresentatives(); var sens = congress.Members.GetSenatorsByState(State.Colorado); var newMembers = congress.Members.GetNewMembers();
PRs are always welcome! The ProPublica tests require your ProPublica key to be stored in an environment variable named
PROPUBLICA_API_KEY. This is not required when consuming/modifying the library, only for testing purposes.
It is recommended you use VS Code to work with the GovLib source code. The workspace includes build tasks, editor settings, extension recommendations, and launch configurations to aid development in VS Code, but any editor that supports C# will do.
Ctrl + Shift + B (or
Cmd + Shift + B on Macs) to bring up the build tasks menu: