Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

add proper bot support to the api #279

@showierdata9978

Description

@showierdata9978

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions