-
Notifications
You must be signed in to change notification settings - Fork 14
add proper bot support to the api #279
Description
Is your feature request related to a problem? Please describe.
Bots are currently user accounts. They should be in their own collection.
Describe the solution you'd like
This issue will serve as both the feature request and spec. Please read the full thing.
Feel free to request changes in it, because this spec is what will get implemented in the end.
The bot API will be hosted on /bots/. Assume all urls are prefixed by that.
POST /
{
name: string,
description: string
}Auth required.
response
{
"id": string
"name": string,
"description": string,
"owner": string
"token": string,
"icon": string
"error": bool // normally false
}GET /
Auth Required. Owners bots only.
Url args
?page=number
response
{
"error": bool,
"bots": [
{
"id": string,
"name": string,
"icon": string
}
],
"page": number,
"pages": number
}GET /<id>/
Auth not required.
Response
{
"error": bool,
"id": string,
"name": string,
"description": string,
"owner": string,
"icon": string
}PATCH /<id>/
Auth required.
{
name: string | null,
description: string | null
}Response
{
"id": string
"name": string,
"description": string,
"owner": string
"icon": string
"error": bool // normally false
}DELETE /<id>
Auth required, if MFA is enabled, that's required too.
Response
{"error": "false"}POST /<id>/token/regenerate
MFA (if enabled) and auth required
Response
{
error: false,
token: string
}Describe alternatives you've considered
There are no alternatives as the TOS says we will provide a tool in the future to make bots.
Additional context
https://meower.org/legal/#Automated-accounts