Skip to content

tjphopkins/submissions_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Studies and submissions Flask API

Install

pip install -r requirements.txt

Run

From the top-level submissions_api directory, run python runserver.py. Notw the localhost port on which the Flask dev server is running printed to the terminal.

Run tests

From the top-level submissions_api directory, run python tests.py.

Use Cases

  • List all studies: curl http://localhost:5000/studies

  • List all studies for a given user: curl http://localhost:5000/studies?user=user_id

  • Create new study: curl --data "name=study_name&available_places=30&user=user_id" http://localhost:5000/studies

  • List all submissions by user: curl http://localhost:5000/submissions?user=user_id

  • Create new submission curl --data "study=:study_id&user:user_id" http://localhost:5000/submissions

Next steps for development

  • Write integration tests for api endpoints
  • Write User model

About

Submissions and studies api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages