toybox-server (0.1.0)

Download OpenAPI specification:Download

auth

Sign Up

Request Body schema: application/json
required
name
required
string (Name)
email
required
string <email> (Email)
password
required
string (Password)
display_name
required
string (Display Name)
avatar_url
string <uri> (Avatar Url) [ 1 .. 2083 ] characters

Responses

Request samples

Content type
application/json
{
  • "name": "new_user",
  • "email": "example@example.mail",
  • "password": "password",
  • "display_name": "new_display_name",
  • "avatar_url": "https://example.com"
}

Response samples

Content type
application/json
{
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "name": "user1",
  • "display_name": "display name",
  • "avatar_url": "https://example.com",
  • "profile": "user profile",
  • "twitter_id": "twitter_id",
  • "github_id": "github_id",
  • "created_at": "2022-10-30T18:05:09.184Z",
  • "updated_at": "2022-10-30T18:05:09.184Z"
}

Refresh Token Exchange

Request Body schema: application/json
required
refresh_token
required
string (Refresh Token)

Responses

Request samples

Content type
application/json
{
  • "refresh_token": "string"
}

Response samples

Content type
application/json
{
  • "expired_at": "string",
  • "refresh_token": "string",
  • "access_token": "string"
}

Discord Login Redirect

Responses

Response samples

Content type
application/json
null

Discord Callback

query Parameters
code
string (Code)
Default: ""

Responses

Response samples

Content type
application/json
{
  • "expired_at": "string",
  • "refresh_token": "string",
  • "access_token": "string"
}

users

Get Me

Authorizations:
HTTPBearer

Responses

Response samples

Content type
application/json
{
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "name": "user1",
  • "display_name": "display name",
  • "avatar_url": "https://example.com",
  • "profile": "user profile",
  • "twitter_id": "twitter_id",
  • "github_id": "github_id",
  • "created_at": "2022-10-30T18:05:09.184Z",
  • "updated_at": "2022-10-30T18:05:09.184Z"
}

Put User Info

Authorizations:
HTTPBearer
Request Body schema: application/json
required
display_name
string (Display Name)
avatar_url
string <uri> (Avatar Url) [ 1 .. 2083 ] characters
profile
string (Profile)
twitter_id
string (Twitter Id)
github_id
string (Github Id)

Responses

Request samples

Content type
application/json
{
  • "display_name": "user_display_name",
  • "avatar_url": "https://example.com",
  • "profile": "user profile",
  • "twitter_id": "twitter_id",
  • "github_id": "github_id"
}

Response samples

Content type
application/json
{
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "name": "user1",
  • "display_name": "display name",
  • "avatar_url": "https://example.com",
  • "profile": "user profile",
  • "twitter_id": "twitter_id",
  • "github_id": "github_id",
  • "created_at": "2022-10-30T18:05:09.184Z",
  • "updated_at": "2022-10-30T18:05:09.184Z"
}

Get User

path Parameters
user_id
required
string (User Id)

Responses

Response samples

Content type
application/json
{
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "name": "user1",
  • "display_name": "display name",
  • "avatar_url": "https://example.com",
  • "profile": "user profile",
  • "twitter_id": "twitter_id",
  • "github_id": "github_id",
  • "created_at": "2022-10-30T18:05:09.184Z",
  • "updated_at": "2022-10-30T18:05:09.184Z"
}

Get User List

query Parameters
limit
integer (Limit)
Default: 30
oldest_user_id
string (Oldest User Id)
newest_user_id
string (Newest User Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get My Works

Authorizations:
HTTPBearer
query Parameters
visibility
string (Visibility)
Enum: "public" "private" "draft"
Example: visibility=public

An enumeration.

oldest_user_id
string (Oldest User Id)
newest_user_id
string (Newest User Id)
tags
string (Tags)
limit
integer (Limit)
Default: 30

Responses

Response samples

Content type
application/json
{
  • "works": [
    ],
  • "works_total_count": 4
}

Get Users Works

Authorizations:
HTTPBearer
path Parameters
user_id
required
string (User Id)
query Parameters
oldest_user_id
string (Oldest User Id)
newest_user_id
string (Newest User Id)
limit
integer (Limit)
Default: 30
tags
string (Tags)
visibility
string (Visibility)
Enum: "public" "private" "draft"
Example: visibility=public

An enumeration.

Responses

Response samples

Content type
application/json
{
  • "works": [
    ],
  • "works_total_count": 4
}

Favorite By User Id

Authorizations:
HTTPBearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Favorite By User Id

Authorizations:
HTTPBearer
path Parameters
user_id
required
string (User Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

tags

Tags All

query Parameters
limit
integer (Limit)
Default: 100
smallest_tag_id
string (Smallest Tag Id)
biggest_tag_id
string (Biggest Tag Id)
w
string (W)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Post Tag

Authorizations:
HTTPBearer
Request Body schema: application/json
required
name
required
string (Name)
color
required
string (Color)

Responses

Request samples

Content type
application/json
{
  • "name": "hack",
  • "color": "blue"
}

Response samples

Content type
application/json
{
  • "name": "hack",
  • "color": "blue",
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524"
}

Tag By Id

path Parameters
tag_id
required
string (Tag Id)

Responses

Response samples

Content type
application/json
{
  • "name": "hack",
  • "color": "blue",
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524"
}

Tag By Id

Authorizations:
HTTPBearer
path Parameters
tag_id
required
string (Tag Id)
Request Body schema: application/json
required
name
string (Name)
color
string (Color)

Responses

Request samples

Content type
application/json
{
  • "name": "hack",
  • "color": "blue"
}

Response samples

Content type
application/json
{
  • "name": "hack",
  • "color": "blue",
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524"
}

Tag By Id

Authorizations:
HTTPBearer
path Parameters
tag_id
required
string (Tag Id)

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}

works

Get Works

Authorizations:
HTTPBearer
query Parameters
limit
integer (Limit)
Default: 30
visibility
string (Visibility)
Enum: "public" "private" "draft"
Example: visibility=public

An enumeration.

oldest_work_id
string (Oldest Work Id)
newest_work_id
string (Newest Work Id)
tag_names
string (Tag Names)
tag_ids
string (Tag Ids)
search_word
string (Search Word)

Responses

Response samples

Content type
application/json
{
  • "works": [
    ],
  • "works_total_count": 4
}

Post Work

Authorizations:
HTTPBearer
query Parameters
post_discord
required
boolean (Post Discord)
Request Body schema: application/json
required
title
required
string (Title)
description
required
string (Description)
visibility
required
string (Visibility)
thumbnail_asset_id
required
string (Thumbnail Asset Id)
assets_id
required
Array of strings (Assets Id)
required
Array of objects (Urls)
tags_id
required
Array of strings (Tags Id)

Responses

Request samples

Content type
application/json
{
  • "title": "post title",
  • "description": "post description",
  • "visibility": "public",
  • "thumbnail_asset_id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "assets_id": [
    ],
  • "urls": [],
  • "tags_id": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "title": "title",
  • "description": "description",
  • "description_html": "<h1>Description Html</h1>",
  • "user": {
    },
  • "assets": [
    ],
  • "urls": [
    ],
  • "visibility": "public",
  • "tags": [
    ],
  • "thumbnail": {
    },
  • "favorite_count": 10,
  • "is_favorite": true,
  • "created_at": "2022-10-30T18:05:09.184Z",
  • "updated_at": "2022-10-30T18:05:09.184Z"
}

Get Work

Authorizations:
HTTPBearer
path Parameters
work_id
required
string (Work Id)

Responses

Response samples

Content type
application/json
{
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "title": "title",
  • "description": "description",
  • "description_html": "<h1>Description Html</h1>",
  • "user": {
    },
  • "assets": [
    ],
  • "urls": [
    ],
  • "visibility": "public",
  • "tags": [
    ],
  • "thumbnail": {
    },
  • "favorite_count": 10,
  • "is_favorite": true,
  • "created_at": "2022-10-30T18:05:09.184Z",
  • "updated_at": "2022-10-30T18:05:09.184Z"
}

Put Work

Authorizations:
HTTPBearer
path Parameters
work_id
required
string (Work Id)
Request Body schema: application/json
required
title
required
string (Title)
description
required
string (Description)
visibility
required
string (Visibility)
thumbnail_asset_id
required
string (Thumbnail Asset Id)
assets_id
required
Array of strings (Assets Id)
required
Array of objects (Urls)
tags_id
required
Array of strings (Tags Id)

Responses

Request samples

Content type
application/json
{
  • "title": "post title",
  • "description": "post description",
  • "visibility": "public",
  • "thumbnail_asset_id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "assets_id": [
    ],
  • "urls": [],
  • "tags_id": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "title": "title",
  • "description": "description",
  • "description_html": "<h1>Description Html</h1>",
  • "user": {
    },
  • "assets": [
    ],
  • "urls": [
    ],
  • "visibility": "public",
  • "tags": [
    ],
  • "thumbnail": {
    },
  • "favorite_count": 10,
  • "is_favorite": true,
  • "created_at": "2022-10-30T18:05:09.184Z",
  • "updated_at": "2022-10-30T18:05:09.184Z"
}

Delete Work

Authorizations:
HTTPBearer
path Parameters
work_id
required
string (Work Id)

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}

Get Comments

Authorizations:
HTTPBearer
path Parameters
work_id
required
string (Work Id)
query Parameters
limit
integer (Limit)
Default: 30
oldest_comment_id
string (Oldest Comment Id)
newest_comment_id
string (Newest Comment Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Post Comment

Authorizations:
HTTPBearer
path Parameters
work_id
required
string (Work Id)
query Parameters
reply_at
string (Reply At)
visibility
string (Visibility)
Default: "public"
Enum: "public" "private" "draft"
Example: visibility=public

An enumeration.

Request Body schema: application/json
required
content
required
string (投稿内容) [ 1 .. 500 ] characters

Responses

Request samples

Content type
application/json
{
  • "content": "this is post comment"
}

Response samples

Content type
application/json
{
  • "content": "this is comment content",
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "user": {
    },
  • "work_id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "visibility": "public",
  • "reply_at": "2022-10-30T18:05:09.184Z",
  • "created_at": "2022-10-30T18:05:09.184Z",
  • "updated_at": "2022-10-30T18:05:09.184Z",
  • "number_of_reply": 4
}

Get Reply Comments

Authorizations:
HTTPBearer
path Parameters
work_id
required
string (Work Id)
comment_id
required
string (Comment Id)
query Parameters
limit
integer (Limit)
Default: 10
oldest_comment_id
string (Oldest Comment Id)
newest_comment_id
string (Newest Comment Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete Comment

Authorizations:
HTTPBearer
path Parameters
comment_id
required
string (Comment Id)
work_id
required
string (Work Id)

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}

Favorite By Work Id

Authorizations:
HTTPBearer
path Parameters
work_id
required
string (Work Id)

Responses

Response samples

Content type
application/json
{
  • "favorites": [
    ],
  • "is_favorite": true,
  • "favorite_count": 3
}

Post Favorite

Authorizations:
HTTPBearer
path Parameters
work_id
required
string (Work Id)

Responses

Response samples

Content type
application/json
{
  • "favorites": [
    ],
  • "is_favorite": true,
  • "favorite_count": 3
}

Delete Favorite

Authorizations:
HTTPBearer
path Parameters
work_id
required
string (Work Id)

Responses

Response samples

Content type
application/json
{
  • "favorites": [
    ],
  • "is_favorite": true,
  • "favorite_count": 3
}

assets

Post Asset

Authorizations:
HTTPBearer
Request Body schema: multipart/form-data
required
file
required
string <binary> (File)
asset_type
required
string (AssetType)
Enum: "zip" "image" "video" "music" "model"

An enumeration.

Responses

Response samples

Content type
application/json
{
  • "asset_type": "video",
  • "id": "84A743F4-97E6-42A9-9F6B-3B83B90BF524",
  • "user": {
    },
  • "extension": "mp4",
  • "created_at": "2022-10-30T18:05:09.184Z",
  • "updated_at": "2022-10-30T18:05:09.184Z"
}

Delete Asset

Authorizations:
HTTPBearer
path Parameters
asset_id
required
string (Asset Id)

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}