Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions api/.air.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"

[build]
args_bin = []
bin = "tmp\\main.exe"
cmd = "go build -o ./tmp/main.exe cmd/main.go"
delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html"]
include_file = []
kill_delay = "0s"
log = "build-errors.log"
poll = false
poll_interval = 0
post_cmd = []
pre_cmd = []
rerun = false
rerun_delay = 500
send_interrupt = false
stop_on_error = false

[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"

[log]
main_only = false
silent = false
time = false

[misc]
clean_on_exit = false

[proxy]
app_port = 0
enabled = false
proxy_port = 0

[screen]
clear_on_rebuild = false
keep_scroll = true
46 changes: 23 additions & 23 deletions api/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ludo API documentation

Ludo is comprised of users, boards, and items. Each board has a list of users, and a list of items. Each item has a list ID which specifies which list it belongs to. However, there is no list type. This is to genericize lists and make them act more like a _group_. Ludo is meant to be used for all kinds of boards and viewing options, and it should be left up to each boards implementation to organize and display items.
Ludo is comprised of users, boards, and items. Each board has a list of users, and a list of items.

## Endpoints

Expand All @@ -20,29 +20,30 @@ Users are not accounts. You are not _logged in_ as your user. Users are simply u

Boards are containers for items and have users assosiated with them. A board may be connected to a GitHub repo.

| Method | Path | Response Type | Description |
| ------ | ---------------------------------------- | ------------- | --------------------------- |
| GET | `/boards` | `Board[]` | Get all boards |
| POST | `/boards` | `ID` | Create new board |
| GET | `/boards/{boardId}` | `Board` | Get board by ID |
| PATCH | `/boards/{boardId}` | - | Update an existing board |
| DELETE | `/boards/{boardId}` | - | Delete a board |
| GET | `/boards/{boardId}/users` | `[]User` | Get all users in board |
| GET | `/boards/{boardId}/items` | `[]Item` | Get all items in board |
| POST | `/boards/{boardId}/users/{userId}` | - | Add user to board |
| DELETE | `/boards/{boardId}/users/{userId}` | - | Remove user from board |
| GET | `/boards/{boardId}/lists/{listId}/items` | `[]Item` | Get all items in board list |
| Method | Path | Response Type | Description |
| ------ | ----------------------------------------- | ------------- | ------------------------------------------ |
| GET | `/boards` | `Board[]` | Get all boards |
| POST | `/boards` | `ID` | Create new board |
| GET | `/boards/{boardId}` | `Board` | Get board by ID |
| PATCH | `/boards/{boardId}` | - | Update an existing board |
| DELETE | `/boards/{boardId}` | - | Delete a board |
| GET | `/boards/{boardId}/users` | `[]User` | Get all users in board |
| GET | `/boards/{boardId}/items` | `[]Item` | Get all items in board |
| POST | `/boards/{boardId}/users/{userId}` | - | Add user to board |
| DELETE | `/boards/{boardId}/users/{userId}` | - | Remove user from board |
| GET | `/boards/{boardId}/status/{status}/items` | `[]Item` | Get all items in board with given `Status` |

### Items

| Method | Path | Response Type | Description |
| ------ | ------------------------------- | ------------- | ---------------------------- |
| GET | `/items` | `[]Item` | Get all items |
| POST | `/items` | `ID` | Create an item |
| GET | `/items/{itemId}` | `Item` | Get item by ID |
| PATCH | `/items/{itemId}` | - | Update an existing item |
| DELETE | `/items/{itemId}` | - | Delete an item |
| PATCH | `/items/{itemId}/move/{listId}` | - | Move an item to another list |
| Method | Path | Response Type | Description |
| ------ | ---------------------- | ------------- | ----------------------- |
| GET | `/items` | `[]Item` | Get all items |
| POST | `/items` | `ID` | Create an item |
| GET | `/items/{itemId}` | `Item` | Get item by ID |
| PATCH | `/items/{itemId}` | - | Update an existing item |
| DELETE | `/items/{itemId}` | - | Delete an item |
| GET | `/items/{itemId}/data` | `any` | Get items data field |
| PATCH | `/items/{itemId}/data` | - | Update items data field |

## Schemas

Expand Down Expand Up @@ -93,7 +94,7 @@ When creating new objects you get its ID in response.

### Status

Item status is one of the following values. They are automatically updated if the item contains github repo/branch info.
Item status is one of the following values. They are automatically updated if the item contains github repo/branch info. Use the integer value as the status in requests.

| Name | Value | Description |
| ---------------- | ----- | -------------------------------------------------------- |
Expand All @@ -102,4 +103,3 @@ Item status is one of the following values. They are automatically updated if th
| StatusInProgress | 2 | Item is being worked on and tracks a branch |
| StatusInReview | 3 | Item has a pull request open |
| StatusClosed | 4 | Items pull request was merged or closed |

2 changes: 0 additions & 2 deletions api/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ type Config struct {
Port string
DatabaseURL string
DatabaseToken string
IsDev bool
DBFile string
GitHubAuthToken string
}

Expand Down
Loading