These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

EVE API and Public CREST discussion

First post First post First post
Author
Max Kolonko
Caldari Provisions
Caldari State
#541 - 2014-08-06 10:18:48 UTC
Im not familiar with CORS, can someone explain and give example how this can be used with eve api and what benefits this gives?
Ydnari
Estrale Frontiers
#542 - 2014-08-06 10:55:16 UTC
The short version is that it allows javascript on a Web page to call the API directly; without it, the "same origin" security rules block it, and it has to go indirectly via the websites server.

--

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#543 - 2014-08-06 11:30:57 UTC  |  Edited by: Steve Ronuken
Max Kolonko wrote:
Im not familiar with CORS, can someone explain and give example how this can be used with eve api and what benefits this gives?



Browsers have a policy, which stop you loading resources from other sites with javascript, unless those sites have a specific rule set to allow you to do so (a CORS header)

So, if I wanted to have my site take details of an API key and load it up in the client (with the key never being sent to me), parse it, allow you to mess with it, then store it, I can't do so without a CORS header.

With the header in place, I can allow people to set up a character on my site, loading the details from TQ, without me ever getting the key itself. And I don't need to worry about people throwing dodgy keys at me, which could get me banned from the API, as I never actually hit the api. It's all handled client side.


It's not something most people would need, but it's a fairly simple thing to add.


https://en.wikipedia.org/wiki/Cross-origin_resource_sharing

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Max Kolonko
Caldari Provisions
Caldari State
#544 - 2014-08-06 11:47:50 UTC
CCP FoxFour
C C P
C C P Alliance
#545 - 2014-08-06 15:51:03 UTC
Just deployed corp/blueprints and char/blueprints to Sisi. 24 hour cache. Requires director or CEO key for corps with asset list mask.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Qoi
Exert Force
#546 - 2014-08-06 17:11:02 UTC
Documentation https://neweden-dev.com/Char/Blueprints


That API call makes me very happy Big smile

http://eve-industry.org

Teoshen
Transcendent Innovations Incorporated
The.Spanish.Inquisition
#547 - 2014-08-06 17:19:57 UTC
Yay! Love it!
Ema Bane
MAAK Industries
#548 - 2014-08-06 20:26:53 UTC
CCP FoxFour wrote:
Just deployed corp/blueprints and char/blueprints to Sisi. 24 hour cache. Requires director or CEO key for corps with asset list mask.


Awesome, can't wait to see it live on TQ!
Cor'len
Doomheim
#549 - 2014-08-07 11:50:54 UTC  |  Edited by: Cor'len
Cor'len wrote:
CCP FoxFour wrote:
Whoever was writing that Android PI application: https://wiki.eveonline.com/en/wiki/Equations


Awesome! I'm going to be using that too, and I'm not even writing an Android application!

(bluh bluh broken stuff)

Any tips?

Turns out that a variety of things went wrong when I tried porting it to PHP. If anyone's interested, here's a C# port which is accurate enough (0.006% error - probably some rounding issue): http://pastebin.com/8tgU4E8K (Avoid, see below)

I also reorganized some of the code - no point in keeping the constants inside the main loop.


Thanks again for being awesome, CCP FoxFour!


Edit: The version on Evelopedia is better, as it's a perfect match for the ingame results (difference turned out to be that the game uses ints to represent each bar as opposed to floats).
CCP FoxFour
C C P
C C P Alliance
#550 - 2014-08-07 11:51:19 UTC
As described in these patch notes: http://community.eveonline.com/news/patch-notes/patch-notes-for-crius

CORS headers and PI long/lat fix is out on TQ now. Let me know if there are any issues.

As stated before the blueprints endpoint is live on Sisi now.

I have a fix internally for the cachedUntil time on the jobs endpoint.

I have a fix internally for the probability on the jobs endpoint.

The blueprints, and 2 jobs fixes will probably have to wait until Hyperion unfortunately. Sorry about that! :(

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

CCP FoxFour
C C P
C C P Alliance
#551 - 2014-08-07 11:53:49 UTC
Cor'len wrote:
Cor'len wrote:
CCP FoxFour wrote:
Whoever was writing that Android PI application: https://wiki.eveonline.com/en/wiki/Equations


Awesome! I'm going to be using that too, and I'm not even writing an Android application!

(bluh bluh broken stuff)

Any tips?

Turns out that a variety of things went wrong when I tried porting it to PHP. If anyone's interested, here's a C# port which is accurate enough (0.006% error - probably some rounding issue): http://pastebin.com/8tgU4E8K

I also reorganized some of the code - no point in keeping the constants inside the main loop.


Thanks again for being awesome, CCP FoxFour!


You're more than welcome! Thank you so much for sharing your code and digging into this. If you have the chance, and think you can, please do go back and update the EVElopedia entry to make it better/more understandable.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Cor'len
Doomheim
#552 - 2014-08-07 18:01:07 UTC
CCP FoxFour wrote:
You're more than welcome! Thank you so much for sharing your code and digging into this. If you have the chance, and think you can, please do go back and update the EVElopedia entry to make it better/more understandable.


Done. I also removed some redundant code (lots of math to get cycleNum when you can just use your iterator variable...). It's also entirely in spec now - perfect match to the EVE client, give or take a single unit.
Kangaax
Money in da bank
#553 - 2014-08-08 18:03:15 UTC
CCP FoxFour wrote:
As described in these patch notes: http://community.eveonline.com/news/patch-notes/patch-notes-for-crius

CORS headers and PI long/lat fix is out on TQ now. Let me know if there are any issues.


I love you
Warlof Tutsimo
Daerie Inc.
Toilet Paper.
#554 - 2014-08-11 11:36:35 UTC  |  Edited by: Warlof Tutsimo
CCP FoxFour wrote:
Just deployed corp/blueprints and char/blueprints to Sisi. 24 hour cache. Requires director or CEO key for corps with asset list mask.


How does we have access to test api ? I'm using my current TQ api key but test api tell me the key has expire (which is not the case)

Plus, due to latest Industry API remaniement, it will be possible to know which field has been replaced by which one ?
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#555 - 2014-08-11 11:46:37 UTC
Warlof Tutsimo wrote:
CCP FoxFour wrote:
Just deployed corp/blueprints and char/blueprints to Sisi. 24 hour cache. Requires director or CEO key for corps with asset list mask.


How does we have access to test api ? I'm using my current TQ api key but test api tell me the key has expire (which is not the case)

Plus, due to latest Industry API remaniement, it will be possible to know which field has been replaced by which one ?



community.testeveonline.com if you want to go set up your keys.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Warlof Tutsimo
Daerie Inc.
Toilet Paper.
#556 - 2014-08-11 11:59:35 UTC
Steve Ronuken wrote:

community.testeveonline.com if you want to go set up your keys.



Great, thanks a lot ! =)
Desmont McCallock
#557 - 2014-08-11 17:43:04 UTC  |  Edited by: Desmont McCallock
Idea: Implants slot 6-10 & Boosters in CharacterSheet API
Description: This will add some automation to various 3rd party tools to calculate character bonus factors for various activities. Personally (for EVEMon) I would like to know the bonus of some attribute enhancers like the Cerebral Accelerator etc.
Dragonaire
Here there be Dragons
#558 - 2014-08-14 22:52:25 UTC
Yeah I like Desmont McCallock's idea of having the rest of the implants and it shouldn't be hard to add I would think. It would make life easier for a lot of applications that need the additional info. It would probably require adding typeID fields but you might be able to drop some of the existing fields as well and maybe while you are at it you can change it into a simple rowset and rows with attributes instead of the really ugly XML that is used now Blink

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Pic'n dor
Sebiestor Tribe
Minmatar Republic
#559 - 2014-08-15 00:33:55 UTC
o/ everyone,

http://community.eveonline.com/news/dev-blogs/upcoming-api-changes-for-industry/

I read there that the corp jobs would be accessible with factory manager role.

Is it possible since i can't access https://api.eveonline.com/Corp/IndustryJobs.xml.aspx with a character API and i get a 221 error code. (and my toon got the role factory manager by title).

Any clue ?

COUCOU TOUCHE TOUCHE

CCP FoxFour
C C P
C C P Alliance
#560 - 2014-08-15 16:08:18 UTC
Pic'n dor wrote:
o/ everyone,

http://community.eveonline.com/news/dev-blogs/upcoming-api-changes-for-industry/

I read there that the corp jobs would be accessible with factory manager role.

Is it possible since i can't access https://api.eveonline.com/Corp/IndustryJobs.xml.aspx with a character API and i get a 221 error code. (and my toon got the role factory manager by title).

Any clue ?


It still needs to be a corp key, but your character has to have that role. I think is how it works.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.