Commit Graph

3 Commits (master)

Author SHA1 Message Date
Rachel Kim cc4c4e1a24
Remove print statements
Remove print statements per Eric's comment since they are not needed
2020-05-07 22:11:06 -04:00
Rachel Kim 1bec15f97f Added new search functionality 2020-05-05 22:32:28 -04:00
Mike Benowitz d8f676c88f SFR-479 Add Basic API
Add a basic `Flask` API that responds to queries for copyright data. This includes 5 basic endpoints:

- `/search/fulltext`: queries all text fields in the Registration and Renewal records
- `/search/registration/<regnum>`: queries the collection for a specific copyright registration by registration number
- `/search/renewal/<rennum>`: queries the collection for a specific copyright renewal by renewal number
- `/registration/<uuid>`: fetches a single registration record by internally assigned UUID
- `/registration/<uuid?`: fetches a single renewal record by internally assigned UUID

The api can be run with the standard `python -m flask run` from the root of the project and by default will run in `production` mode. To set `development` run `export FLASK_ENV=development` before starting the application.
2019-06-04 16:43:08 -04:00