https://github.com/efforg/congress_forms_api
https://github.com/efforg/congress_forms_api
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/efforg/congress_forms_api
- Owner: EFForg
- License: other
- Created: 2018-09-24T17:40:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-09T14:35:31.000Z (about 1 year ago)
- Last Synced: 2025-04-19T11:09:14.520Z (about 1 year ago)
- Language: Ruby
- Size: 124 KB
- Stars: 5
- Watchers: 12
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# CongressForms API
This is a Rails app providing a JSON-based API for the [congress_forms](https://gitlab.eff.org/ed/congress_forms) gem.
## Installation
Start by coping the example config.
```
$ cp .env.example .env
$ cp docker-compose.yml.example docker-compose.yml # if using docker
```
Fill in the `DATABASE_*` variables with your postgres address/credentials, and the `CWC_*` variables with your Communicating with Congress vendor information (see the [congress_forms](https://gitlab.eff.org/ed/congress_forms#operation-and-configuration) README for more documentation on CWC).
The `ADMIN_*` variables are optional. They set the basic auth credentials used by the [/delayed_job](https://github.com/ejschmitt/delayed_job_web) admin area.
`DEBUG_KEY` is required for access to some API endpoints. Read the [API documentation](#api-documentation) for more information.
If you're using docker, at this point you can build the containers. Either way be sure to run `rake db:setup` to initialize the database, and then you should be done!
## Delayed Messages
When a message can't be delivered, it is saved into a [delayed_job](https://github.com/collectiveidea/delayed_job) queue and attempted again later. To process this queue you need to run a delayed job worker:
```
$ rake jobs:work
```
The example docker-compose configuration includes a container running this command.
## API Documentation
See [public/index.md](https://github.com/EFForg/congress_forms_api/blob/master/public/index.md).
## License
The code is available as open source under the terms of the [GPLv3 License](https://github.com/EFForg/congress_forms_api/blob/master/LICENSE.txt).