• Facepunch API
    437 replies, posted
  • [QUOTE=Hexxeh;34709290]It's a Firefox user agent, but this is changing soon.[/QUOTE] Are we still getting that generic FPAPI user agent?
  • Avatar of Programmer
  • [QUOTE=Hexxeh;34709290]It's a Firefox user agent, but this is changing soon.[/QUOTE] [img]http://puu.sh/i6a0[/img] huh. ( look a this user agent. )
  • Avatar of dije
  • [QUOTE=Programmer;34838930][img]http://puu.sh/i6a0[/img] huh. ( look a this user agent. )[/QUOTE]That's on the API website [editline]24th February 2012[/editline] (Sadly) [editline]24th February 2012[/editline] Testing api [editline]24th February 2012[/editline] Testing my Java Library. Ignore this post :) [editline]24th February 2012[/editline] It works!
  • Avatar of geel9
  • 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.
  • Avatar of Hexxeh
  • 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.
  • Avatar of Hexxeh
  • [QUOTE=geel9;34990818]It works, aside from the field being called "cur[b]r[/b]page"[/QUOTE] Um, that's intentional. [b]Curr[/b]ent.
  • Avatar of geel9
  • Ah. I'm just used to using only one r, I guess it's a matter of opinion. Thanks!
  • Avatar of Pocoyo
  • thank you also maybe getposts could tell which subforum the thread is in. would be nice. same for getthreads i guess. a little bug [url]http://facepunch.com/threads/1170850[/url] 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?
  • Avatar of Hexxeh
  • 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.
  • Avatar of Ybbats
  • [QUOTE=geel9;34990857]Ah. I'm just used to using only one r, I guess it's a matter of opinion. Thanks![/QUOTE]Not really, it's mostly abbreviated as 'cur' for programmers, every time I've seen.
  • Avatar of Hexxeh
  • 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. :/
  • Avatar of Pocoyo
  • [QUOTE=Pocoyo;35175204]thank you also maybe getposts could tell which subforum the thread is in. would be nice. same for getthreads i guess. a little bug [url]http://facepunch.com/threads/1170850[/url] the api would show that the OP's avatar is /fp/social/homepage.png, even though he doesnt have an avatar.[/QUOTE] in case you missed this post hexxeh, sorry if you are aware but busy.
  • Avatar of Hexxeh
  • [QUOTE=Pocoyo;35303721]in case you missed this post hexxeh, sorry if you are aware but busy.[/QUOTE] Forgot about it, I'll get around to it soon. [QUOTE=Ehmmett;35237278]How many incorrect logins until a shutout? and how long is a shutout? I keep fucking something up. :/[/QUOTE] 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.
  • Avatar of Hexxeh
  • 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. [editline]28th March 2012[/editline] getthreads and getposts calls will return their container name and ID now. Think that's all the stuff you asked for sorted Pocoyo?
  • Avatar of _Undefined
  • 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" })[/code]
  • Avatar of Hexxeh
  • Curious as to why you'd need this, when cross-origin requests are already permitted?
  • Avatar of _Undefined
  • 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.
  • Avatar of Hexxeh
  • [QUOTE=_Undefined;35322959]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.[/QUOTE] It shouldn't do that if you don't include &callback= in your request.
  • Avatar of _Undefined
  • [QUOTE=Hexxeh;35323091]It shouldn't do that if you don't include &callback= in your request.[/QUOTE] You're absolutely correct. My apologies.
  • Avatar of Hexxeh
  • [QUOTE=_Undefined;35323156]You're absolutely correct. My apologies.[/QUOTE] No worries. Look forward to seeing what you create with the API.
  • Avatar of Kopimi
  • [QUOTE=_Undefined;35322959]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.[/QUOTE] use this: [code]$.get(url, function(data) { // do work son });[/code] getJSON wasn't working for me either
  • Avatar of Hexxeh
  • 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.