Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Web API and Webhooks in rewrite #25

Open
perryprog opened this issue Mar 22, 2018 · 3 comments
Open

Web API and Webhooks in rewrite #25

perryprog opened this issue Mar 22, 2018 · 3 comments

Comments

@perryprog
Copy link
Collaborator

Assuming we will save all transcriptions in a db in the upcoming rewrite, it would be nice to expose an API that would allow other bots (namely ToR-Stats, soon to be merged with ToR Genius) to do computations and show information about someones transcriptions. Possible endpoints:

  • /:user → Info on a certain Redditor, like total transcriptions, or other info
  • /:user/transcriptions → Get a list of all user transcriptions
  • /:user/transcriptions?extra=true → Get a list of all user transcriptions, including the post contents (so it's easily searchable)

A system like that should be relatively easy to implement, and could also lead to more automation with things like role assigns in Discord.

Another thing to thing about is adding webhooks. Basically we could make a request to a list of URLs when a certain event occurs like "transcription marked done", or "user moved up a transcription rank". This could also help with some automation on the Discord.


All of this is relatively easy to implement, so we can probably add this in v4.0.0.

@NGTmeaty
Copy link

NGTmeaty commented Mar 22, 2018 via email

@itsthejoker itsthejoker transferred this issue from GrafeasGroup/tor Dec 18, 2018
@DavidArchibald
Copy link

Any thoughts on auth though? Should we even bother? It's not exactly too confidental, but auth would still probably be good just to prevent overuse and or tracking of people who use it. I know for sure I'd use this though if it's implemented.

@itsthejoker
Copy link
Member

I've already implemented the GET portion of the API and am working on auth now; we'll have a full API key system where you just pass your key in with your request and the API will validate it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants