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

add proper bot support to the api #279

Open
showierdata9978 opened this issue Aug 13, 2024 · 5 comments
Open

add proper bot support to the api #279

showierdata9978 opened this issue Aug 13, 2024 · 5 comments
Labels
enhancement New feature or request Medium Priority needed but small issue
Milestone

Comments

@showierdata9978
Copy link
Member

showierdata9978 commented Aug 13, 2024

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

@showierdata9978 showierdata9978 added enhancement New feature or request Medium Priority needed but small issue labels Aug 13, 2024
@mybearworld
Copy link

How would you post from a bot? How would the resulting post look?

@showierdata9978
Copy link
Member Author

Id think you could just use the normal api for most things. (although with a couple restricted)

for posts it would look similar but a flag would be added called BOT to the partial author object

@mybearworld
Copy link

So would you be forced to use the partial author object? Does that also mean bots might have the same name as users?

@showierdata9978
Copy link
Member Author

So would you be forced to use the partial author object? Does that also mean bots might have the same name as users?

no, it would still be name exclusive, cross bots and users

@showierdata9978
Copy link
Member Author

unless we wanted to add a tag system

cc @tnix100

@williamhorning williamhorning changed the title [develop | latest] Bot API add proper bot support to the api Aug 15, 2024
@williamhorning williamhorning added this to the rest api v1 milestone Aug 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Medium Priority needed but small issue
Projects
None yet
Development

No branches or pull requests

3 participants