Hey all,
So... from a few requests I'm finally getting around to coming up with some Web API that can be used to pull information from the database. The below example page is in flux.. so it could change, and not everything I've mentioned is implemented.
Example page for Sugar0o (Since there's multiple stories there too!). Sorry the CDATA sections are a pain, and I
probably don't need to encode the HTML entities there... :/
Edit:
And here's a link for the output for stories....
Stories example
Edit 2:
Updated so the
users one outputs pure XML by default. If you want the text output add the param: ?output=text to the URL.
Example text output for Sugar0o
The basic usage is planned to be something like:
host.here/api/users/Sugar0o -- Pull everything attached to the username (ID works too)
host.here/api/users/Sugar0o/stories -- Pull only stories
host.here/api/users/Sugar0o/forum -- Forum info
host.here/api/stories/1234 -- Pull the *summary* info for the story with ID 1234
host.here/api/stories/1234/34 -- Pull chapter 34 of story
host.here/api/stories/1234/full -- Pull the Full story (maybe? Could probably destroy the DB access times if there were lots of pulls :/ )
The output is going to be basic XML (what's shown at the end of the example). Right now I only have the users partially written, but I have some questions.
1) For you users: What data do you want made available? I need to use the 'username' field, and
not the name field, as the username needs to be unique but the name doesn't. For your e-mails, I'm
NOT going to make that available unless for some reason the majority wants that.
If that's the case, then I'll probably find some way to make an option to allow the API access to show the e-mail that can be set in your profile.
2) For any doing developing: What data do you want access to? (Besides the standard: "
Everything you have." reply). What would you
need to make whatever it is your doing work?
2a) I *will* be doing some API Key type thing and restricting access. So the real requests would look something like:
host.here/api/users/Sugar0o?apikey=[whatever]
And then that key would need to be valid, before it'd even try pulling anything. Probably will allow for both GET/POST requests, even though nothing will be allowed to be changed through the API; Only pulling data.
Err... yeah. So... Let me know!
-J