FastAPI (0.1.0)

Download OpenAPI specification:

Generate Code

Request Body schema: application/json
required
username
required
string (Username) <= 25 characters

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "username": "string",
  • "project_id": 0,
  • "token": "string",
  • "code": "string"
}

Login

Request Body schema: application/json
required
cf_turnstile_response
required
string (Cf Turnstile Response)
token
required
string (Token)

Responses

Request samples

Content type
application/json
{
  • "cf_turnstile_response": "string",
  • "token": "string"
}

Response samples

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

Register

Request Body schema: application/json
required
cf_turnstile_response
required
string (Cf Turnstile Response)
token
required
string (Token)

Responses

Request samples

Content type
application/json
{
  • "cf_turnstile_response": "string",
  • "token": "string"
}

Response samples

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

Me

Authorizations:
ScratchAuth

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "scratch_id": 0,
  • "scratch_name": "string",
  • "role": "quarantine",
  • "joined_at": "2019-08-24T14:15:22Z",
  • "display_name": "string",
  • "bio": "",
  • "follower_count": 0,
  • "following_count": 0,
  • "post_count": 0,
  • "session_code": 0,
  • "banned": false,
  • "admin_message": "",
  • "deleted": false
}

Logout All

Authorizations:
ScratchAuth

Responses

Edit

Authorizations:
ScratchAuth
Request Body schema: application/json
required
Display Name (string) or Display Name (null) (Display Name)
bio
string (Bio) <= 200 characters

Responses

Request samples

Content type
application/json
{
  • "display_name": "string",
  • "bio": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "scratch_id": 0,
  • "scratch_name": "string",
  • "role": "quarantine",
  • "joined_at": "2019-08-24T14:15:22Z",
  • "display_name": "string",
  • "bio": "",
  • "follower_count": 0,
  • "following_count": 0,
  • "post_count": 0,
  • "session_code": 0,
  • "banned": false,
  • "admin_message": "",
  • "deleted": false
}

user

Get User

path Parameters
username
required
string (Username)

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "scratch_id": 0,
  • "scratch_name": "string",
  • "role": "quarantine",
  • "joined_at": "2019-08-24T14:15:22Z",
  • "display_name": "string",
  • "bio": "",
  • "follower_count": 0,
  • "following_count": 0,
  • "post_count": 0
}

Followers

path Parameters
id
required
string (Id)
query Parameters
limit
integer (Limit) [ 1 .. 40 ]
Default: 40
offset
integer (Offset) >= 0
Default: 0

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Followings

path Parameters
id
required
string (Id)
query Parameters
limit
integer (Limit) [ 1 .. 40 ]
Default: 40
offset
integer (Offset) >= 0
Default: 0

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Follow

Authorizations:
ScratchAuth
path Parameters
username
required
string (Username)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Unfollow

Authorizations:
ScratchAuth
path Parameters
username
required
string (Username)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Replies

path Parameters
id
required
string (Id)
query Parameters
limit
integer (Limit) [ 1 .. 40 ]
Default: 40
offset
integer (Offset) >= 0
Default: 0

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Ban

Authorizations:
ScratchAuth
path Parameters
username
required
string (Username)
Request Body schema: application/json
required
reason
required
string (Reason)
message
required
string (Message)

Responses

Request samples

Content type
application/json
{
  • "reason": "string",
  • "message": "string"
}

Response samples

Content type
application/json
null

studio

Get Studio

path Parameters
studio_id
required
integer (Studio Id)

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "forward_comment": false,
  • "owner": {
    },
  • "post_count": 0
}

Register

Authorizations:
ScratchAuth
path Parameters
studio_id
required
integer (Studio Id)
Request Body schema: application/json
required
cf_turnstile_response
required
string (Cf Turnstile Response)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": 0,
  • "forward_comment": false,
  • "owner": {
    },
  • "post_count": 0
}

post

Send Post

Authorizations:
ScratchAuth
Request Body schema: application/json
required
content
required
string (Content) <= 200 characters

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": 0,
  • "content": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "parent_id": 0,
  • "love_count": 0,
  • "reply_count": 0,
  • "author": {
    },
  • "studio": {
    }
}

Delete Post

Authorizations:
ScratchAuth
path Parameters
post_id
required
integer (Post Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Get Post

path Parameters
post_id
required
integer (Post Id)

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "content": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "parent_id": 0,
  • "love_count": 0,
  • "reply_count": 0,
  • "author": {
    },
  • "studio": {
    }
}

Add Love

Authorizations:
ScratchAuth
path Parameters
post_id
required
integer (Post Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Remove Love

Authorizations:
ScratchAuth
path Parameters
post_id
required
integer (Post Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Loves

path Parameters
id
required
integer (Id)
query Parameters
limit
integer (Limit) [ 1 .. 40 ]
Default: 40
offset
integer (Offset) >= 0
Default: 0

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Reply Post

Authorizations:
ScratchAuth
path Parameters
post_id
required
integer (Post Id)
Request Body schema: application/json
required
content
required
string (Content) <= 200 characters

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": 0,
  • "content": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "parent_id": 0,
  • "love_count": 0,
  • "reply_count": 0,
  • "author": {
    },
  • "studio": {
    }
}

Replies

path Parameters
id
required
integer (Id)
query Parameters
limit
integer (Limit) [ 1 .. 40 ]
Default: 40
offset
integer (Offset) >= 0
Default: 0

Responses

Response samples

Content type
application/json
[
  • {
    }
]

test

Read Users

Request Body schema: application/json
required
cf_turnstile_response
required
string (Cf Turnstile Response)

Responses

Request samples

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

Response samples

Content type
application/json
null

Test 429

query Parameters
has_token
required
number (Has Token)

Responses

Response samples

Content type
application/json
null

Error

Responses

Response samples

Content type
application/json
null