Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Captain Xero
Gallente 3 Star Industries
|
Posted - 2010.01.15 13:06:00 -
[1]
Hi Guys,
I wonder if anyone can tell me if the behaviour I'm seeing here is what you'd expect.
For corporation wallet transactions and journals I can query the API with 1 character and receive all the information, get a cached until value etc. I can then query the API with another character from another account but in the same corporation. This gives me up to date information and gives me a new cached until value.
However, for corporation assets this doesn't seem to be the case. After running the query with the first character I get the corporation assets and the cache until time is set to 23 hours in the future (As you would expect). Then if I do the query with the second character I get the same results back, and the cache until time is the same as above. I'd expect this if I was running the query with the same character, but not with a completely different one.
I tried running the second query from another IP address a while ago, and I think that allowed me to get up to date asset information, but that doesn't help me as I'm implementing this on a web application.
Does this match the behaviour you guys get?
Thanks in advance.
|
Catari Taga
Centre Of Attention Rough Necks
|
Posted - 2010.01.15 15:11:00 -
[2]
Yes, asset cache times are per IP, not per account. The API server does however send you the full asset list again when you query with an account on the same IP that you had not queried with before within the cache period.
|
Captain Xero
Gallente 3 Star Industries
|
Posted - 2010.01.15 16:06:00 -
[3]
Great, thanks for the reply.
I can certainly appreciate why that's necessary, but it does make it hard to develop any tools that rely on fairly up to date asset data. I'm looking at putting together a build tool for my corporation website, obviously lots can happen in 23 hours. So the asset data can quickly get out of date as people put new build jobs on and materials get used up.
This wouldn't be such a problem in a desktop application as at least a user could update the corporation assets once every 23 hours, just before they started building things. On a web application it means only 1 update for everyone in the corporation.
I guess a solution would be some sort of JavaScript asset grabber that could run on the user's browser on their IP address (which then uploads to the web application). Any volunteers?
|
Catari Taga
Centre Of Attention Rough Necks
|
Posted - 2010.01.15 17:32:00 -
[4]
For our corp the assets API is several MB in size so you can understand why the do not want this downloaded more regularly.
However, if CCP simply would allow repackaging of items outside of stations and ideally auto-stacking of repackaged items then that file would probably not even reach half a megabyte, saving many resources on their end both in their items database and with respect to the API. Why this is not done I cannot imagine.
Regarding your javascript idea the question is whether you want to transmit director level full API keys to your users' browsers.
|
Captain Xero
Gallente 3 Star Industries
|
Posted - 2010.01.15 20:38:00 -
[5]
My corp asset list is only about 400Kb, does that make me poor?
That's a very good point. Updating assets would have to be restricted to directors and only using their own API keys. Then, as you say, there is the question of getting the API key from the web application database to the browser in a sensible way...oh and dealing with a potentially large XML file in the browser and getting it back to the web server.
If nothing else it might be fun as a toy problem.
|
Leebe
|
Posted - 2010.01.16 20:39:00 -
[6]
another problem is that you can't connect use javascript to connect to any other server other then the server that delivered the javascript.
all exceptions i know use a proxy for the javascript calls on the web server ... so again it would call the api with the ip of the web server
|
Captain Xero
Gallente 3 Star Industries
|
Posted - 2010.01.16 23:22:00 -
[7]
Yes you're right, I should know that. It's a massive security issue.
|
The Ibis
|
Posted - 2010.01.17 15:45:00 -
[8]
Originally by: Leebe another problem is that you can't connect use javascript to connect to any other server other then the server that delivered the javascript.
all exceptions i know use a proxy for the javascript calls on the web server ... so again it would call the api with the ip of the web server
^^ Not entirely true.
Currently; I have a page that uses an XMLHttpRequest (JavaScript); that runs at client side, to pre-verify API keys before their submitted; and it always workes fine, to include running on the IGB (Moondoggie)
The main page is on evewormhole.com; and it pulls the xml from api.eve-online.com.. Deffinately cross-domain.
|
Captain Xero
Gallente 3 Star Industries
|
Posted - 2010.01.20 12:59:00 -
[9]
Hmmm ok. Some more research needed on my part then. Thanks for sharing your experience everyone.
|
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |