Skip to content

vladaoleynik/todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API on Bottle framework

To work with API use curl, please!

Add information
Helps to add task to concrete task list.
/todo/tasks/(task_name) POST-method
Required data:
task description;
task importance;
task deadline;
Example: curl -H "Content-Type: application/json" -X POST -d '{"description":0,"deadline":0,"importance":0}' http://localhost:8080/todo/tasks/list

Edit information
Helps to edit task in concrete task list.
/todo/tasks/(task_name)/(task_id:int) PUT-method
Required data (at least one of these items):
task description;
task importance;
task deadline;
Example: curl -H "Content-Type: application/json" -X PUT -d '{"description":bla}' http://localhost:8080/todo/tasks/list/1

Clearing the whole DB
Deleting all the task lists.
/todo/tasks DELETE-method
Required data: none
Example: curl -X DELETE http://localhost:8080/todo/tasks

Clearing the task list
Deleting all the tasks in task list.
/todo/tasks/(task_name) DELETE-method
Required data: none
Example: curl -X DELETE http://localhost:8080/todo/tasks/list

Deleting the task
Deleting the task from task list.
/todo/tasks/(task_name)/(task_id) DELETE-method
Required data: none
Example: curl -X DELETE http://localhost:8080/todo/tasks/list/2

Printing all the task lists
Printing the names of all task lists in our db.
/todo/tasks GET-method
Required data: none
Example: curl -X GET http://localhost:8080/todo/tasks

Printing all the tasks
Printing all the tasks in task list.
/todo/tasks/(name) GET-method
Required data: none
Example: curl -X GET http://localhost:8080/todo/tasks/list

Working with argparse

-i task_list_name -a args - adding task to the task_list_name list

-i task_list_name -e args - editing task in the task_list_name list

-i task_list_name -d all - deleting all the tasks from task_list_name list

-i task_list_name -d task_id - deleting all the task_id task from task_list_name list

-d all - deleting all the task lists in db

-p - printing names of all existing in db task lists

-i task_list_name -p - printing all the tasks from task_list_name list

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages