WebsiteWebsite feature requests → Website API

Website API Reverse Replies

Last edited by NotAuthentick.

This would be useless for most people, but extremely useful for people who want to make apps and stuff like that for the forums. I was actually thinking of making an app, but it's a HUGE pain to parse HTML, especially since if someone adds formatting into a post, it changes everything! I would think an API would be nice so we could overcome that problem. This is kind of what I have in mind, but it could be anything (if it were to get added)...

Get latest thread

(Based around a thread's ID number, shown in URL)
Request:

https://api.redstoner.com/threads/latest

Response:

3320


Get thread info

Request:

https://api.redstoner.com/threads/3320/content


https://api.redstoner.com/threads/3320/poster


https://api.redstoner.com/threads/3320/title


https://api.redstoner.com/threads/3320/timeposted


https://api.redstoner.com/threads/3320/stickied

Response:

This is some example content!


1337


This is an example title!


insert time here


true


Get thread reply IDs

Request:

https://api.redstoner.com/threads/3320/replies

Response:

16325
45562
56315


Get reply info

(Based on reply ID number, usually hidden in HTML, but shown when "#reply-" is in URL)
Request:

https://api.redstoner.com/replies/16325/content


https://api.redstoner.com/replies/16325/poster


https://api.redstoner.com/replies/16325/timeposted

Response:

This is some example content from a reply on the example thread! :D


420


insert time here


Get profile info

(Based on profile ID numbers, shown in URL)
Request:

https://api.redstoner.com/profiles/1337/name


https://api.redstoner.com/profiles/1337/uuid


("redstoner_session" cookie with staff user or account owner logged in required.) https://api.redstoner.com/profiles/1337/email

Response:

jyl


9f3cc068ed98469798bf15be31af8973


totally@real.email


Log into forums (validate token)

Request (POST):

https://api.redstoner.com/login
POST data: email=foo@bar.com&password=supersecurepassword&token=supersecrettokengeneratedbyredstoner

Response:

OK

or

Invalid username/password/token!


I think we get the idea from here...

8 replies.

+1
Although, none of the actually good features ever get added so...

Also, this API would also help add people like Logal put some of the other feature, like notifications on the top right corner, etc.

Soo... is this happening or nah?

Definitely a +1

+1 Yeah I could do some stuff with this

I know this will probably never actually get implemented, but to comment none the less: maybe the API should return JSON, so there's alot less requests required. For example:
https://api.redstoner.com/threads/3320

Would return:

{
   "id": 3320,
   "title": "Example",
   "poster": 1337,
   "timestamp": "time",
   "last_edit": {
      "editor": 4799,
      "timestamp": "time"
   },
   "stickied": true,
   "replies": [
      16325,
      45562,
      56315
   ]
}

Please Log in to post a reply.