Hi! I've been trying to use IRE's open API (
http://www.ironrealms.com/IREAPIdocumentation.pdf ) to collect orglogs. But I've been having some weird issues accessing the api server.
1. The server returns an Http 403 (Forbidden) when there are no logs for an org for a given day, I can handle that but shouldn't that return an empty JSON object?
2. The 'count' items in the /orglogs.json endpoint never change when I give day=x parameter, they always reflect the state for day 0. Here are sample uris I'm using,
http://api.achaea.com/orglogs.json?password=secret&character=Ada&day=0http://api.achaea.com/orglogs.json?password=secret&character=Ada&day=1http://api.achaea.com/orglogs.json?password=secret&character=Ada&day=2The count is always the same O_o
My script is hosted here:
https://bitbucket.org/adayoung/adacode/src/master/irelogs.pyAnyone know what might be causing the weird behavior? Thanks in advance!
Comments
Hello @Cardan.
Would it be possible to allow
Access-Control-Allow-Origin
on the API urls? Or at least return a JSONP callback?Hi @Orzaansyn! http://api.achaea.com/gamefeed.json?jsonp=parseResponse already gives this:
HTTP/1.1 200 OKContent-Length: 661
Date: Thu, 19 Jun 2014 00:07:37 GMT
Expires: Thu, 19 Jun 2014 00:07:37 GMT
Server: Apache
X-Powered-By: PHP/5.4.22
Access-Control-Allow-Origin: *
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Type: application/json
Age: 1
Connection: keep-alive
Oh. Damn. Thank you very much @Ada ... How comes it returned me a cross domain error when I tried?