• Facepunch API
    437 replies, posted
I know that they allow statistics to be performed but I still dislike the idea of them.
i know this is p minor and easily fixable on my end but would you mind returning post dates with capitalized month names? i'm almost embarrassed to ask because of how silly it is but i don't see a reason for it to be lowercase and it just makes formatting simpler for whoever is using the api.
[QUOTE=Kopimi;35338890]i know this is p minor and easily fixable on my end but would you mind returning post dates with capitalized month names? i'm almost embarrassed to ask because of how silly it is but i don't see a reason for it to be lowercase and it just makes formatting simpler for whoever is using the api.[/QUOTE] Uh, it is already? [code]"joindate": "August 2009"[/code]
sorry i should have been more specific, it's the "time" field for the post object [code]"posts": [{ "id": 34652816, "userid": 63187, "username": "Hexxeh", "username_html": "<span style=\"color:#00aa00;font-weight:bold;\">Hexxeh<\/span>", [B] "time": "11th february 2012",[/B] "usertitle": "<font color=green>Mod<b><\/b>erator Illuminati<\/font>", "joindate": "June 2006", "postcount": 4440,[/code]
[QUOTE=Kopimi;35341076]sorry i should have been more specific, it's the "time" field for the post object [code]"posts": [{ "id": 34652816, "userid": 63187, "username": "Hexxeh", "username_html": "<span style=\"color:#00aa00;font-weight:bold;\">Hexxeh<\/span>", [B] "time": "11th february 2012",[/B] "usertitle": "<font color=green>Mod<b><\/b>erator Illuminati<\/font>", "joindate": "June 2006", "postcount": 4440,[/code][/QUOTE] Ohhh, post date, sorry my mistake. Sure, I'll make that change when I get home this afternoon. Do you have a testing copy of your app online I can play with by the way? PM a link if you want to keep it private. Edit: Okay, months are now capitalised on the sandbox version. I've got some other changes that are half-done I'm gonna finish then I'll push this stuff onto the live API.
Have you updated the "live" version to include subscribed threads yet? I don't see it on the Actions page.
Yeah, updating the docs later today with the new calls, gonna do them all at once. It's basically just getsubscribedthreads, with an optional folderid. [img]http://cl.ly/FPBH/Screen%20Shot%202012-03-29%20at%2018.51.29.png[/img] Added Event Log support to Facepunch API. This is still in the sandbox, but this is the last change I'm making before moving all sandbox stuff to live API (sans metrics) and updating the docs. You can specify an event type, or use the special "user" type and specify a user ID to get events for a user in tasty JSON format.
getticker, geteventlog and getsubscribedthreads calls are now available, docs are on the normal site. As an added bonus, getposts calls now include OS and browser information for each post where available and all calls that return data (rather than just an acknowledgement) may provide an alerts key, which contains information about a new PM. If you want to test that, send yourself a PM and then immediately make a call to something like getforums. You can use this in your app in order to notify a user of a new PM whilst they're browsing.
Any progress on the generic fpapi user-agent for this and the Lua SDK?
[QUOTE=amcfaggot;35347467]Any progress on the generic fpapi user-agent for this and the Lua SDK?[/QUOTE] Sadly won't happen, garry isn't making any more changes.
[QUOTE=Map in a box;35331728]I know that they allow statistics to be performed but I still dislike the idea of them.[/QUOTE] How is this dumb? If its dumb can you tell me why? I seriously want to know why they are used.
[QUOTE=Hexxeh;35347476]Sadly won't happen, garry isn't making any more changes.[/QUOTE] Oh well, thanks for the heads up anyway.
[QUOTE=Map in a box;35347585]How is this dumb? If its dumb can you tell me why? I seriously want to know why they are used.[/QUOTE] If one person writes an application which abuses the API, for example spamming the forum - it's much easier to block it if people have to request API keys.
[QUOTE=Map in a box;35347585]How is this dumb? If its dumb can you tell me why? I seriously want to know why they are used.[/QUOTE] because you can limit who has access to the api, so if someone is abusing the api (say somebody made an application that just spammed threads over and over until they were banned), hexxeh can revoke their key and the problem is solved. i don't know why you're so adverse to the idea, it's not like it'll negatively affect you unless you do something stupid.
Actually, the purpose isn't access control. It's for other fun stuff this time around.
oke hexxeh
Testing the first API key only feature. It's pretty damn sweet.
Hexxeh told me to post here and I am a good little boy.
[QUOTE=Hexxeh;35349091]Testing the first API key only feature. It's pretty damn sweet.[/QUOTE] So what sort of API key features are you planning?
[QUOTE=Hexxeh;35349091]Testing the first API key only feature. It's pretty damn sweet.[/QUOTE] Is it still just a scraper API?
[QUOTE=swift and shift;35353680]Is it still just a scraper API?[/QUOTE] Yeah. I'm seeing what things I can do that you couldn't do on a device with scraping, but I can with a server that scrapes on your behalf. Hoping to demo the first feature later today, need to write up an application that uses it.
[QUOTE=Hexxeh;35353749]Yeah. I'm seeing what things I can do that you couldn't do on a device with scraping, but I can with a server that scrapes on your behalf. Hoping to demo the first feature later today, need to write up an application that uses it.[/QUOTE]Are there any way to get responses quicker or is it that the current server is slow-[I]ish[/I]?
[QUOTE=dije;35355336]Are there any way to get responses quicker or is it that the current server is slow-[I]ish[/I]?[/QUOTE] Facepunch is just slow, nothing I can do about that. The penalty in terms of processing time is tiny in comparison to how long it takes Facepunch to reply.
[QUOTE=Hexxeh;35355351]Facepunch is just slow, nothing I can do about that. The penalty in terms of processing time is tiny in comparison to how long it takes Facepunch to reply.[/QUOTE]Okay, thanks anyway. :smile:
I'm going to try and improve calls with smarter caching, but I wouldn't except too large an improvement on the whole. [editline]30th March 2012[/editline] Testing replies from my application. Here's some [b]bold[/b] text.
To boldly go where no app has gone before
Any chance on a search module? Also you could implement a "getpost" feature pretty easily if you just bring in the post id you can scrape [url]http://facepunch.com/showpost.php?p=35355379[/url] and pull the data from the one post.
[QUOTE=Hexxeh;35358124]I forgot to mention, using notifications is super simple. Here's a rough overview of how it works. ... When a notification is triggered for a user of your application, the API server will make a request to your callback URL with the details of the notification.[/QUOTE] [code] CallbackURL = "http://api.facepun.ch/?username=dummy&password=yaymd5&action=newreply&thread_id= [/code] Damn it! thread_id and message are POST parameters... Would've been interesting to see what happened :v:
You'd post twice and it'd get automerged at worst? Even that wouldn't happen, since you're missing username/password.
[QUOTE=douche beat;35366592]Any chance on a search module? Also you could implement a "getpost" feature pretty easily if you just bring in the post id you can scrape [url]http://facepunch.com/showpost.php?p=35355379[/url] and pull the data from the one post.[/QUOTE] Added in sandbox as getpost, parameter is post_id.
Sorry, you need to Log In to post a reply to this thread.