Skip to content

jeremiahbrem/task-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preliminary Setup

After cloaning the project, create an appsettings.Development.json in the TaskManager folder with the following schema:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "ConnectionStrings": {
    "TaskManagerContext": "Host=localhost;Database=task_manager;Username=YOUR_USERNAME;Password=YOUR_PASSWORD",
    "DbUserName": "",
    "DbPassword": ""
  }
}

Make sure postgresql is installed on your local machine.

Run Project

In the root folder:

cd TaskManager
dotnet run

The project is now running at localhost:5000.

Routes

POST Create User: /api/users/create
Example request:

{
  "firstName": "Jeremiah",
  "lastName": "Brem",
  "email": "[email protected]"
}

GET User: /api/users/{email}

GET Users: /api/users

POST Create category: /api/category/create
Example request:

{
  "name": "Category one"
}

GET Categories: /api/categories

POST Create task: /api/tasks/create
Example request:

{
  "name: "Task one",
  "category: "Category one"
}

GET Task: /api/tasks/{name}

GET Tasks: /api/tasks
GET Tasks by category: /api/tasks?category=CATEGORY

**All scheduled-task routes require an email header value in the request.**

POST Create scheduled task: /api/scheduled-tasks/create
Example request:

{
  "task": "Task one"
}

Example success response:

Scheduled task 7746615b-6359-45fa-900c-3053f494b8db created.

Example request with designating a preceding scheduled task:

{
  "task": "Task two",
  "precedingId: "7746615b-6359-45fa-900c-3053f494b8db"
}

GET Scheduled task: /api/scheduled-tasks/{id}
Example request:

http://localhost:5000/api/scheduled-tasks/7746615b-6359-45fa-900c-3053f494b8db`

GET Scheduled tasks: /api/scheduled-tasks
GET Scheduled tasks by category: /api/scheduled-tasks?category=CATEGORY

POST Complete scheduled task: /api/scheduled-tasks/complete/{id}
Example request:

http://localhost:5000/api/scheduled-tasks/complete/7746615b-6359-45fa-900c-3053f494b8db

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages