I tried using the api website from school.
I tried using the api website from school.
But then you have to serve the static content a lot more (once per new client). With CloudFlare, the servers are geographically distributed so you have lower latency (which improves user experience), and you get to take load off the FP server onto the CloudFlare server for static content being served to new clients.
shame facepunch.com gets routed to LA for me rather than Tokyo, Singapore or Hong Kong then
It's a Firefox user agent, but this is changing soon.
Well hey, they can't have servers everywhere. Plus the dynamic content needs to reach the FP servers anyway. But it helps!
Maybe after you implement the API keys, have devs choose the user agent per app?
they have servers in tokyo, singapore and hong kong
Then email them? What can I say, I don't work for them. Issues like these can be caused by either the ISP or the content provider, and neither of them will find out unless someone complains.
Pretty nice work Hexxeh.
Without sounding like a newfag or a total retard. We're allowed to use this for what ever? (None malicious) say I wanted to make an app or something? I did add you on steam.
Pretty nice though. Grats.
Brad,
Test
Are we still getting that generic FPAPI user agent?
huh. ( look a this user agent. )
That's on the API website
Edited:
(Sadly)
Edited:
Testing api
Edited:
Testing my Java Library. Ignore this post :)
Edited:
It works!
Alright, fine, I'll post them here.
-getnewposts does not return a current page field, which is necessary because my app can't know what page the new posts are on.
-Trying to access the google forum or the golds workshiop returns an error saying I don't have permission, despite having permission.
Fixed both, please verify.
It also posts with a custom user-agent now, but I don't think the icons are setup FP side for it.
Apologies for the huge delay on that, I know it's a simple tweak but I've been so bogged down with uni work past few weeks I just didn't get chance to even look at it.
It works, aside from the field being called "currpage"
Um, that's intentional. Current.
Ah. I'm just used to using only one r, I guess it's a matter of opinion.
Thanks!
getthreads action should include the title of the forum.
Added.
thank you
also maybe getposts could tell which subforum the thread is in. would be nice.
same for getthreads i guess.
a little bug
http://facepunch.com/threads/1170850
the api would show that the OP's avatar is /fp/social/homepage.png, even though he doesnt have an avatar.
Hexxeh, do you think you could add an API action for retrieving threads you are subscribed to?
Yep, it's coming real soon, it was suggested earlier this week but I've been really busy and not had chance to write it.
Might get chance later today to write it up.
Not really, it's mostly abbreviated as 'cur' for programmers, every time I've seen.
I've added subscribed threads to the API, however, I don't have enough threads subscribed to see whether or not the subscribed threads page has multiple pages.
If it does, can someone let me know the parameter name for the page number?
Currently only the default folder is supported, adding folder support at the moment.
How many incorrect logins until a shutout? and how long is a shutout?
I keep fucking something up. :/
in case you missed this post hexxeh, sorry if you are aware but busy.
Forgot about it, I'll get around to it soon.
This is enforced by Facepunch, not the API server. I'm not sure what it's set at currently, maybe 15 minutes?
5 tries then a 15 minute grace on the last incorrect login, if I recall correctly.
Fixed the incorrect avatar URL for users without avatars, you simply won't get an avatar key now if they don't have an avatar.
Edited:
getthreads and getposts calls will return their container name and ID now.
Think that's all the stuff you asked for sorted Pocoyo?
PM'd you Hexxeh but not sure if you got it. Would you be able to add jsonp support to the api?
For example, adding a get parameter of "callback=test" would make the api reply with, for example:
Code:test({ "login": "Login OK" })
Curious as to why you'd need this, when cross-origin requests are already permitted?
jQuery is very annoying about it. Doing "$.getJSON(url, function(data){});" gives an error of "Uncaught SyntaxError: Unexpected token :" because it's expecting a function wrapped around it.
I've gotten around it by not using jQuery, so I don't _need_ it now, but it'd still be useful.
It shouldn't do that if you don't include &callback= in your request.
You're absolutely correct. My apologies.
No worries. Look forward to seeing what you create with the API.
use this:
getJSON wasn't working for me eitherCode:$.get(url, function(data) { // do work son });
API down for an update or something?
Currently it's operating from a server hosted in an OVH datacentre. OVH's network just fell over completely, apparently all servers connected to their network have lost connectivity.
I'm moving it soon to an SSD based VPS in Germany, with 2x the RAM and 10x the bandwidth, where this shit shouldn't affect us.