Skip to content
This repository has been archived by the owner on Mar 30, 2020. It is now read-only.
/ workout Public archive
Notifications You must be signed in to change notification settings

orsinium-archive/workout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run server

  1. Apply migrations:
    sudo docker-compose run workout-project migrate
    
  2. Run server:
    sudo docker-compose up workout-project
  3. Open API: 127.0.0.1:1337/api/v1/

Run tests

sudo docker-compose run --entrypoint tox workout-project

Make requests

  1. Add user:
    sudo docker-compose run workout-project createsuperuser
  2. Get token:
    curl -X POST -d "username=USER&password=PASSWORD" http://127.0.0.1:1337/api/v1/token/obtain/
  3. Get endpoints:
    curl -H "Authorization: JWT <your_token>" http://127.0.0.1:1337/api/v1/ | json_pp

Response:

{
   "exercises" : "http://127.0.0.1:1337/api/v1/exercises/?format=json",
   "users" : "http://127.0.0.1:1337/api/v1/users/?format=json",
   "plans" : "http://127.0.0.1:1337/api/v1/plans/?format=json",
   "days" : "http://127.0.0.1:1337/api/v1/days/?format=json"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published