I can no longer log in, says:
[code]{
"error": "No session for that authentication information, login first to begin a session"
}[/code]
in the API console when authenticating. This sums up my worries about stability pretty much.
[QUOTE=Overv;37414824]I can no longer log in, says:
[code]{
"error": "No session for that authentication information, login first to begin a session"
}[/code]
in the API console when authenticating. This sums up my worries about stability pretty much.[/QUOTE]
Should be fixed. Guess what Overv? Your API will break sometimes too, it happens, especially when turning on major new features.
[QUOTE=Hexxeh;37418849]Should be fixed. Guess what Overv? Your API will break sometimes too, it happens, especially when turning on major new features.[/QUOTE]
What keeps you from testing it before you let it go live? I'd rather work with a production version instead of this bleeding edge version of the API.
I did, but I didn't catch that. If it shuts you up I'll write tests this week.
How often does it "refresh" it's cache?
[url]http://api.facepun.ch/?username=Matt-&password=-_-&action=getposts&thread_id=1215128&fields=title,numpages[/url]
Keeps returning 4 pages, even though there are 6? :c
[QUOTE=Matt-;37888433]How often does it "refresh" it's cache?
[url]http://api.facepun.ch/?username=Matt-&password=-_-&action=getposts&thread_id=1215128&fields=title,numpages[/url]
Keeps returning 4 pages, even though there are 6? :c[/QUOTE]
At the moment, anonymous recache requests are returning this. So if you don't provide auth info, or you provide incorrect auth info, FP returns this:
[code]At times of heavy traffic we like to stop guests viewing the forums.[/code]
So it can't recache until somebody with working credentials visits that page again.
Apparently we shouldn't be seeing that message anymore, so I'll ask garry about it.
Edit: garry has fixed this issue now, and that request is showing 6 as it should.
[QUOTE=Hexxeh;37894100]Edit: garry has fixed this issue now, and that request is showing 6 as it should.[/QUOTE]
Thanks man. :3
Note that you might still see that in Fast Threads, since that message is still enabled in there. I can't do anything about that, I'm afraid.
Query: Do the forum viewing numbers ever update?
[QUOTE=SataniX;38089408]Query: Do the forum viewing numbers ever update?[/QUOTE]
Now that they're cached, no. I'm adding a mechanism where you can bypass the cache if you care about stuff like that.
[QUOTE=Hexxeh;38101086]Now that they're cached, no. I'm adding a mechanism where you can bypass the cache if you care about stuff like that.[/QUOTE]
That'd be cool just need to make sure everyone doesn't use it for everything else they is no point of the cache.
[code]http://api.facepun.ch/?action=getforums[/code]
Is there a way of returning the newest post in sub-forums? I'm not sure if I'm missing anything.
[QUOTE=kragmars102;38408180][code]http://api.facepun.ch/?action=getforums[/code]
Is there a way of returning the newest post in sub-forums? I'm not sure if I'm missing anything.[/QUOTE]
Not at present, file a bug though: [url]https://github.com/Hexxeh/Facepunch-API/issues[/url]
[QUOTE=Hexxeh;38408211]Not at present, file a bug though: [url]https://github.com/Hexxeh/Facepunch-API/issues[/url][/QUOTE]
Done thanks, only have a few days till the end of the webdev competition !
[QUOTE=kragmars102;38408337]Done thanks, only have a few days till the end of the webdev competition ![/QUOTE]
Oh, okay, I'll cook something up now and hide it behind a flag so you can use it.
Here you go: [url]http://api.facepun.ch/?action=getforums&lastpost=true[/url]
Thank you, you're awesome!
One last thing I might as well mention. If possible in the future, the sub-forums don't have the little tag-line that's below the main title.
Sorry, not quite clear on what you mean? Unless you mean the description text?
I think that's what he means, yes.
[url]http://api.facepun.ch/?action=getforums&description=true[/url]
Le done.
I feel like a jackass asking all these questions, but this is the last one... I swear. Is there a way to grab the icon of the subforum?
[img]http://puu.sh/1p24Y[/img]
it's
http://facepunch.com/fp/forums/{forumid}.png
Cheers!
What happened? is it down just for me?
We had a period of downtime earlier this evening. One of my VPS slaves had some issues which resulted in most requests timing out. This is now resolved and the caching daemons are running normally again. It'll likely take an hour or two for things to catch up.
Sorry for the bump, but I was going to try something with this, but it looks like its down. Will you be able to fix this soon?
We had some issues overnight (actually with all of my web frontends). One of my sites I host saw some unusually high traffic and saturated the connection limit imposed by the kernel. I've tweaked things around so if this should occur again, we shouldn't fall over and hit that limit.
[QUOTE=Hexxeh;38764129]We had some issues overnight (actually with all of my web frontends). One of my sites I host saw some unusually high traffic and saturated the connection limit imposed by the kernel. I've tweaked things around so if this should occur again, we shouldn't fall over and hit that limit.[/QUOTE]
Thanks!
How would I check the rank of a user that logged in (eg. banned, blue member, gold member, mod, admin)?
[QUOTE=nick_9_8;38835259]How would I check the rank of a user that logged in (eg. banned, blue member, gold member, mod, admin)?[/QUOTE]
Request their profile and do your own analysis based on their username HTML. The reason I don't include usergroup information in the API is because this is all I'd be able to do, as far as I know Facepunch doesn't explicitly tell non-mods what usergroups somebody is in.
Request: [url]http://api.facepun.ch/?action=getprofile&target_username=Hexxeh[/url]
Response:
[code]
{
"username":"Hexxeh ",
"username_html":"<span style=\"color:#00aa00;font-weight:bold;\">Hexxeh<\/span>",
"usertitle":"<font color=green>Mod<b><\/b>erator Illuminati<\/font>",
"avatar":"image.php?u=63187&dateline=1281945425",
"joindate":"1st June 2006",
"lastactivity":"4,767",
"postcount":0,
"about":{
"twitter":"Hexxeh",
"location":"UK",
"steam":"Hexxeh",
"lastfm":"Hexxeh",
"googleplus":"https:\/\/plus.google.com\/115749542640996630663"
}
}
[/code]
You can pretty much assume green username is mod, gold username is gold, red username is banned etc.
I believe there are only a couple exceptions to that.
So is there any way to get the ratings of a post [i]and[/i] who submitted which rating with the API? I can only see a way to grab the number of ratings.
Sorry, you need to Log In to post a reply to this thread.