• Facepunch API
    437 replies, posted
All threads have ID 0 in getthreads [editline]29th May 2012[/editline] And getreadthreads
Forums are defaulting to non-SEO URLs, so a lot of the parsing is broken. I've asked garry if we can those those URLs back.
Wouldn't it only take you a couple of minutes to edit the URLS in your scraper?
[QUOTE=douche beat;36124519]Wouldn't it only take you a couple of minutes to edit the URLS in your scraper?[/QUOTE] Yeah, I had to change the ones in my scripts as well, took 2 minutes. Hexxeh, could you provide an interface for the ticker? My scripts keep hitting the damn Cloudflare shield.
[QUOTE=Overv;36124535]Yeah, I had to change the ones in my scripts as well, took 2 minutes. Hexxeh, could you provide an interface for the ticker? My scripts keep hitting the damn Cloudflare shield.[/QUOTE] There is some basic ticker support, I'll see about exposing it publicly. Actually, it's already in there. Check the getticker call on the docs. It's in a nicer format than the FP ticker JSON, too! :v: [QUOTE=douche beat;36124519]Wouldn't it only take you a couple of minutes to edit the URLS in your scraper?[/QUOTE] It's not the URLs it requests, it's still like the thread list it parses. I could go change these, but frankly it'd be easier if we just had the old URLs back. If I changed it, that might break other stuff. It's just easier to ask garry to renable it.
Last I heard, him and ModRewrite had a big falling out during the switch to nix/apache which ended up with us back on the ol' .php links.
Eh, changed it to use the non-SEO URLs. Let me know if you see anything amiss.
Sweet. You fixed geel's app, thanks
I knew it wasn't my fault!
Users post counts are all 0
Fixed.
Please add a module to retrieve ratings for a post ASAP. The API is useless to me without it.
[QUOTE=Overv;36133664]Please add a module to retrieve ratings for a post ASAP. The API is useless to me without it.[/QUOTE] Use the "getpost" action
[QUOTE=Overv;36133664]Please add a module to retrieve ratings for a post ASAP. The API is useless to me without it.[/QUOTE] Use getpost?
was just testing the "newthread" request, the thread was successfully posted but the API response was: "FP-API Response Error: Internal API error" thought i'd post and let you know in case you're not already working on it
Should be fixed now.
I have borders around most of the images on Firefox 3.6.28 Don't think it matters that much since it's such an old version, and I'm at school, but who knows.
[QUOTE=Ohfoohy;36143518]I have borders around most of the images on Firefox 3.6.28 Don't think it matters that much since it's such an old version, and I'm at school, but who knows.[/QUOTE] How is this a problem with the API?
[QUOTE=Hexxeh;36136555]Use getpost?[/QUOTE] Oh, that function was not documented on the website. Nevertheless, it is way too slow for my operations. It has a response time of ~3 seconds, my maximum budget is 250 ms.
[QUOTE=Overv;36155970]Oh, that function was not documented on the website. Nevertheless, it is way too slow for my operations. It has a response time of ~3 seconds, my maximum budget is 250 ms.[/QUOTE] Facepunch itself doesn't reply to the API server that fast, we can't achieve that low a response time.
Hey Hexxeh, you should probably switch over to this now (unless that's what you're using?) User Friendly: [url]http://api.facepunch.com/#/[/url] JSON: [url]http://api.facepunch.com/API/FORUM/LIST/001/[/url] User Friendly: [url]http://api.facepunch.com/#/forum/6[/url] JSON: [url]http://api.facepunch.com/API/THREAD/LIST/001/?forumid=6&page=1[/url] User Friendly: [url]http://api.facepunch.com/#/thread/1152035/page/1[/url] JSON: [url]http://api.facepunch.com/API/POST/LIST/001/?threadid=1152035&page=1[/url] All of them seem to be fast except the post list one which I can't even get to load.
[QUOTE=Hexxeh;36162816]Facepunch itself doesn't reply to the API server that fast, we can't achieve that low a response time.[/QUOTE] The AJAX rating list page loads in that time for me and your API forces me to load an entire thread, which doesn't even get me the rating data I need.
Hexxeh... please tell me you didn't break the API again...
If there are API problems, you're best tweeting me, since I see those messages more often than this thread. Just tweeting me telling me to check this thread works. When I get time and garry's new API has stabilised, I'll probably make a wrapper so applications that use this API can use the new one with no/minimal changes.
I'm trying to use your API, but for some reason it doesn't let me authorize succesfully. It returns [CODE] {"userid": false, "login": "Login OK"}[/CODE] , but everytime I try to use another function, it says that I'm not logged in. I used "api.facepun.ch/?username=marvinelo&password=mypasswordasMD5here&action=authenticate" to authenticate.
every time I try to authenticate from my webserver it times out [editline]25th June 2012[/editline] also getting userid: false from my own browser, but my biggest issue is being unable to login [editline]25th June 2012[/editline] [code]{"userid": false, "login": "Login OK"}[/code] getting that for logins that don't work either of course that's when the authenticate action actually works, which is rarely (and only from my browser or rarely from the API console page, never from my webserver)
API has had some issues recently. It should be all fixed up now. If there are issues in future, bump this thread and/or tweet me @Hexxeh. The Facepunch server IPs changed and so the API was timing out connecting to an IP that was no longer Facepunch. In case this happens again, I've figured out a couple ways of discovering the CloudFlare protected IP so that I can update the IP without needing to ask garry. I'm also going to rewrite the Nitro caching server to make the API more attractive. Think faster Facepunch load times than loading Facepunch normally.
Is there some method of getting push notifications from the api? I've looked though the thread but there is only one mention on it on this page, and there's nothing on the site about it, as far as I can see.
[QUOTE=_Undefined;37341962]Is there some method of getting push notifications from the api? I've looked though the thread but there is only one mention on it on this page, and there's nothing on the site about it, as far as I can see.[/QUOTE] Yeah, there's no web interface for getting access to this yet though. At present, push isn't running. It's part of the Nitro cache server which I'm rewriting at the moment. If you're interested in using it, IM/PM me letting me know what your plans are.
Nitro is now ready for testing. It's enabled for everyone by default. If you find issues, report them in this thread. If they're security related, please report via PM. Currently it's averaging around 3x faster than without Nitro. It's certainly living up to it's name.
Sorry, you need to Log In to post a reply to this thread.