It’s worth sending me requests for access like that. Trike is short on time, but very keen on any time we can spend with a string multiplier on your time. What do you want in an API?
Basically, I think what’s needed is an API to retrieve a list of comments satisfying some query as an XML document. I’m not sure what kind of queries the system supports internally, so I’ll just ask for as much generality and flexibility as possible. For example, I’d like to be able to search by a combination of username, post ID, date, points (e.g., all comments above some number of points), and comment ID (e.g., retrieve a list of comments given a list of IDs, or all comments that come after a certain ID).
If that’s too hard, or development time is limited, I would settle now for just a way to retrieve all comments that come after a certain comment ID, and doing additional filtering on the client side.
Also, while I have your attention, where can I find some documentation about the Less Wrong codebase? I tried to read it once, and found it quite hard to understand, and was wondering if there’s a guide to it somewhere.
just a way to retrieve all comments that come after a certain comment ID
There is an API for that, but it’s broken. this (rss) should get you the 40 comments later than comment number 1000, but it gives 50, regardless of how many you ask for. Also, it rarely gives a link to go to the later comments (only for earlier ones). but if you’ve been walking these things, you probably knew that.
ETA: I misinterpreted the API. “count” is not supposed to control the number of comments, but as a hint to the server about how far back. If that hint is missing or wrong, it leaves out prev/next. Especially prev. You can make prev appear by adding &count=60 (anything over 50), but every time you click prev, it will decrease this number by 50 and eventually not give the prev. You could make it very large.
Awesome! I occasionally want to skim through someone’s posts chronologically, or at least read their first few comments, to see how their views might have changed over time, and see to what extent I can tell the state of mind they were in when they arrived here.
It’s worth sending me requests for access like that. Trike is short on time, but very keen on any time we can spend with a string multiplier on your time. What do you want in an API?
Basically, I think what’s needed is an API to retrieve a list of comments satisfying some query as an XML document. I’m not sure what kind of queries the system supports internally, so I’ll just ask for as much generality and flexibility as possible. For example, I’d like to be able to search by a combination of username, post ID, date, points (e.g., all comments above some number of points), and comment ID (e.g., retrieve a list of comments given a list of IDs, or all comments that come after a certain ID).
If that’s too hard, or development time is limited, I would settle now for just a way to retrieve all comments that come after a certain comment ID, and doing additional filtering on the client side.
Also, while I have your attention, where can I find some documentation about the Less Wrong codebase? I tried to read it once, and found it quite hard to understand, and was wondering if there’s a guide to it somewhere.
There is an API for that, but it’s broken. this (rss) should get you the 40 comments later than comment number 1000, but it gives 50, regardless of how many you ask for. Also, it rarely gives a link to go to the later comments (only for earlier ones). but if you’ve been walking these things, you probably knew that.
ETA: I misinterpreted the API. “count” is not supposed to control the number of comments, but as a hint to the server about how far back. If that hint is missing or wrong, it leaves out prev/next. Especially prev. You can make prev appear by adding &count=60 (anything over 50), but every time you click prev, it will decrease this number by 50 and eventually not give the prev. You could make it very large.
Would I modify this, or something else, to get the first comment of a particular user?
You can stick ?before=t1_1 onto the end of a user page to get the first comment. yours
Awesome! I occasionally want to skim through someone’s posts chronologically, or at least read their first few comments, to see how their views might have changed over time, and see to what extent I can tell the state of mind they were in when they arrived here.
Since this interface is broken, it’s not so easy to skim. The page is supposed to have a “prev”[1] link at the bottom, but it doesn’t.
ETA: better for skimming is to add not just ?before=t1_1 to the user page, but also &count=100000
[1] I hate the use of prev/next, at least because it isn’t standard (eg, it’s opposite to livejournal). “earlier” and “later” would be clear.
http://github.com/tricycle/lesswrong—see “Resources” at bottom of page, mostly this (which is a wiki, so if you learn more, please share).