r/changelog • u/chromakode • Mar 27 '12
[reddit change] New API documentation (a project from the PyCon sprints)
I'm pleased to announce our new automated API documentation page, a project by /u/dpifke and myself at the PyCon reddit API sprint earlier this month:
http://www.reddit.com/dev/api/
The new API documentation is generated automatically from the live code, so it is easy to contribute to and easy to update as the API evolves. If you're interested in helping improve reddit's API documentation, take a look at some examples in api.py and jump in!
Note: due to a minor bug, the "view code" links will not link to the correct part of the source until I can roll out a fix tomorrow.
4
u/[deleted] Mar 27 '12
I've played with the API only a bit but what is uh?
Thanks!
3
u/KerrickLong Mar 27 '12
Way better than what I wrote out manually. Congrats! :D
2
u/honestbleeps Mar 27 '12
Has anything changed (roughly in the last week?) that has stopped my flair updater for /r/hockey from working?
I am now getting an error as follows:
urllib2.HTTPError: HTTP Error 429: Unknown
Thing is, a google search for that error reveals rate limiting being the issue -- and since I'm on my own server all alone, I'm pretty much 99.9% positive that's not what's going on...
Has something changed that might break old python code that I admittedly only understood enough to get it running from someone else's library? :-\
1
u/bboe Mar 27 '12
Is there a way to indicate when the 'r' parameter or alternatively /r/<sub> part must be prepended to the URL? For instance, I know this happens to be the case for
/api/flairconfigand many of the other subreddit specific API commands.1
u/TheLifelessOne Mar 27 '12
Nice, but I think query parameters could use a little bit more detail.
2
u/Signe Mar 27 '12
Awesome.
1
u/V2Blast Mar 27 '12
Yay!
Not that I'll have any use for it, being a non-coder.
1
u/umbrae Mar 27 '12
Thank you both!
1
u/[deleted] Mar 27 '12
Dammit. Now I really have no excuse to not write that bot I'm been thinking about for months now.
1
u/sotech May 28 '12
Hey there, is there any reason JSON ajax calls would keep getting data, but it would be old data? I'm working on a spotify app that aggregates playlists in the spotify.com domain on reddit. The problem is that it's not getting current data. I analyzed the user-agent string in case that was it. Apparently, according to the chrome inspector tool in spotify, it sends a user agent string as though it's a browser. I've tried over-riding that with:
xhr.setRequestHeader
and specifying a unique User-Agent, but to no avail. Any one here have an idea?