Skip to content

EFForg/congress_forms_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Apr 15, 2024
543b8ef · Apr 15, 2024

History

90 Commits
Jan 14, 2022
Sep 25, 2018
Jan 14, 2022
Feb 11, 2019
Oct 19, 2018
Sep 25, 2018
Mar 5, 2019
Feb 22, 2022
Sep 25, 2018
Sep 25, 2018
Sep 25, 2018
Sep 27, 2018
Feb 12, 2019
Feb 11, 2019
Mar 4, 2019
Sep 25, 2018
Apr 15, 2024
Apr 15, 2024
Apr 15, 2024
Oct 3, 2018
Jul 19, 2019
Sep 25, 2018
Sep 25, 2018
Feb 13, 2019
Mar 25, 2019
Mar 5, 2019

Repository files navigation

CongressForms API

This is a Rails app providing a JSON-based API for the 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 README for more documentation on CWC).

The ADMIN_* variables are optional. They set the basic auth credentials used by the /delayed_job admin area.

DEBUG_KEY is required for access to some API endpoints. Read the 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 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.

License

The code is available as open source under the terms of the GPLv3 License.