habit-tracker

command module
v0.0.0-...-3cad4e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

README

List all users

Definition

GET /api/v1/users

Response

  • 200 OK on success
[
    {
        "id": 1,
        "name": "Maria"
    },
    {
        "id": 2,
        "name": "John"
    }
]

Register a new user

Definition

PUT /api/v1/users

Response

  • 201 CREATED on success
{
    "name": "Joe"
}

List a user

Definition

GET /api/v1/users/<id>

Response

  • 200 OK on success
  • 404 NOT FOUND if the user with that id does not exist
{
    "id": 1,
    "name": "Maria"
}

Habits

Properties

[
    {
        "id": 1
        "name": "Read 📚",
        "days": ["Saturday", "Sunday"] 
    },
    {
        "id": 2,
        "name": "Play guitar 🎸"
        "days": ["Monday", "Sunday"] 
    }
]

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL