Skip to content

codeforutah/utah-court-calendar-service

Repository files navigation

Utah Court Calendar Service

Usage

Visit production application at https://utah-court-calendar-service.herokuapp.com/.

Request data from the API.

API

The API requires authentication via API key. To obtain an API key:

  1. Sign-up for a developer account.
  2. Click on the link in the confirmation email to activate your account.
  3. Log in to access your API key.

Event Search

Responds with zero or more court calendar events.

GET /api/v0/event-search.json

Search Parameters

Specify one or more search parameters. A result will be included in the response if it matches ALL request conditions.

event_search_parameter description example
api_key The api key which belongs to your developer account. 123abc456def
case_number The court case number. SLC%20161901292
defendant_name The defendant name. MARTINEZ
court_room The court room name. W43
court_date The court date in YYYY-MM-DD format. 2016-02-25
defendant_otn The defendant offender tracking number. 43333145
defendant_dob The defendant date of birth in YYYY-MM-DD format. 1988-04-05
defendant_so The defendant sheriff number. 368570
defendant_lea The defendant law enforcement agency number. 15-165332
citation_number The citation number. 49090509

For additional documentation see the event search method source and tests.

Contributing

Prerequisites

Install ruby and bundler.

Install postgresql.

Download source code and install package dependencies.

git clone [email protected]:OpenSaltLake/utah-court-calendar-service.git
cd utah-court-calendar-service/
bundle install

Create database user.

psql
CREATE USER courtbot_slco WITH ENCRYPTED PASSWORD 'c0urtb0t!';
ALTER USER courtbot_slco CREATEDB;
ALTER USER courtbot_slco WITH SUPERUSER;
\q

Create and migrate database.

bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake db:seed

Extract data.

bundle exec rake extract:courts
bundle exec rake extract:court_calendars

Deploying

From master branch:

git push heroku master

From another branch:

git push heroku mybranch:master

Releases

No releases published

Packages

No packages published

Languages