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
Aineko Macx
#601 - 2014-09-15 18:26:46 UTC  |  Edited by: Aineko Macx
Also hoping for a fix to the faulty productTypeID=0 in Jobs XML...
Cor'len
Doomheim
#602 - 2014-09-15 21:01:11 UTC
Roshni Ellecon wrote:
I've searched for this a number of times but can't find the answer so please excuse me if it's a duplicate and point me to the thread or resource.

I'm having problems with the PlanetaryPins API. What do I need to do trigger a refresh in the data? I've tried keeping the planet open in Planet Mode and clicking on each facility to open them up. Still the data is stale. I don't mind jumping through hoops to get refresh the data but at this point I'd be better off manually inputting the data... and I hate data entry.


As Foxfour said, the data is only updated when you view the planets (or customs offices) - you may even have to import/export/change something for it to update, I haven't tested it.

If you want to know the "current" state of something, you essentially need to simulate all the features of PI yourself, and internally iterate over it until you can get from lastUpdated to the current time - this is what I'm doing.

Feel free to evemail me if your application is written in PHP - I've got a fairly complete and stable PI simulator. It's missing some features I don't use myself (multiple output routes, silos), but I'm sure something could be done about that. It's still a work in progress, mind you.


(The awesome thing about running the sim yourself as opposed to relying on a pre-computed result is that it only requires an API update when things change, and it automatically generates alerts if something's not routed correctly, if factories don't get enough materials, a launchpad gets full, etc.)
Roshni Ellecon
Kirlian Enterprises
#603 - 2014-09-16 05:34:42 UTC
CCP FoxFour wrote:
[quote=Roshni Ellecon]Are you paying attention to the cachedUntil values? Also remember that PI only "updates" when you make a change. Other then that the data is all simulated.


Yes, I was trying to look at it one night before bed, got up the next morning and still no update. It's the "change" thing I was missing. I could never find that piece (or didn't recognize it when I saw it) during my searches.

Thanks, I'll give that a try.

I think part of the problem was I was loading all planets at once. I think I was running into the cachedUntil values at that point.
Roshni Ellecon
Kirlian Enterprises
#604 - 2014-09-16 05:44:01 UTC
Cor'len wrote:
Feel free to evemail me if your application is written in PHP


I'm using C#. Actually, it started out as a way to transition to c# from vb.net. I just write little modules to help myself (or try to help myself) wade through all the data.

Thanks for the reply. Big smile
Roshni Ellecon
Kirlian Enterprises
#605 - 2014-09-16 06:12:15 UTC
CCP FoxFour wrote:
Also remember that PI only "updates" when you make a change. Other then that the data is all simulated.


Yay! That worked. I'm assuming by "make a change" you mean a change that brings up the EDITS PENDING dialog and requires you to click on the Submit button to commit the change.

I just went to each planet and deleted or added a route to one of the facilities and then ran the api. That seemed to do the trick.

Thanks again!
CCP FoxFour
C C P
C C P Alliance
#606 - 2014-09-16 07:51:03 UTC  |  Edited by: CCP FoxFour
Roshni Ellecon wrote:
I think part of the problem was I was loading all planets at once. I think I was running into the cachedUntil values at that point.


I think you are misunderstanding the cachedUntil values.

All they mean is the information in THAT result will not change until the cachedUntil time comes. So you should not fetch it again until such time as the cachedUntil expires.

So if you fetch planet 1 and it's cached until 14:00, don't fetch planet 1 until 14:01. You can still go ahead and fetch planet 2, which will then have it's own cachedUntil value.

@CCP_FoxFour // Technical Designer // Team Tech Co

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

Desmont McCallock
#607 - 2014-09-16 16:48:42 UTC
Roshni Ellecon wrote:
CCP FoxFour wrote:
Also remember that PI only "updates" when you make a change. Other then that the data is all simulated.


Yay! That worked. I'm assuming by "make a change" you mean a change that brings up the EDITS PENDING dialog and requires you to click on the Submit button to commit the change.

I just went to each planet and deleted or added a route to one of the facilities and then ran the api. That seemed to do the trick.

Thanks again!
Exactly that. API updates only when you click the "Submit" button.
Cor'len
Doomheim
#608 - 2014-09-17 12:33:27 UTC
So on the matter of PI:

Any chance of releasing the code that generates pin names? I expect them to be derived from the pinID, and hopefully not run through too many iterations of CCP's magical randomizer. I'd like to show alerts for various things, and it'd be convenient to be able to use the same naming scheme as is used ingame.
Kali Izia
GoomWaffe
#609 - 2014-09-17 14:04:10 UTC
Cor'len wrote:
So on the matter of PI:

Any chance of releasing the code that generates pin names? I expect them to be derived from the pinID, and hopefully not run through too many iterations of CCP's magical randomizer. I'd like to show alerts for various things, and it'd be convenient to be able to use the same naming scheme as is used ingame.

I've only tested with one pin because I'm lazy but this should work:

  • The name is calculated using the string '123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  • Calculate 5 indexes using pinID / len^i % len, where len is the length of the string above, and i is 0 to 4


Rough PHP code:
Quote:
function getPinName($pinID)
{
$baseStr = '123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$baseStrLen = strlen($baseStr) - 1;

$pinName = '';
for ($i = 0; $i < 5; $i++) {
$pinName .= $baseStr[$pinID / pow($baseStrLen, $i) % $baseStrLen];
}

return preg_replace('/^(.{2})(.{3})$/', '$1-$2', $pinName);
}
Cor'len
Doomheim
#610 - 2014-09-17 16:04:34 UTC
Kali Izia wrote:

I've only tested with one pin because I'm lazy but this should work:

  • The name is calculated using the string '123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  • Calculate 5 indexes using pinID / len^i % len, where len is the length of the string above, and i is 0 to 4




Thanks! Didn't work out of the box (probably because PHP is horrible; the modulo operation (%) returned negative numbers...).
Changed
$pinName .= $baseStr[$pinID / pow($baseStrLen, $i) % $baseStrLen];
to
$pinName .= $baseStr[fmod($pinID / pow($baseStrLen, $i), $baseStrLen)];

Works like a charm now.
Desmont McCallock
#611 - 2014-09-17 18:24:38 UTC
Kali Izia wrote:
Cor'len wrote:
So on the matter of PI:

Any chance of releasing the code that generates pin names? I expect them to be derived from the pinID, and hopefully not run through too many iterations of CCP's magical randomizer. I'd like to show alerts for various things, and it'd be convenient to be able to use the same naming scheme as is used ingame.

I've only tested with one pin because I'm lazy but this should work:

  • The name is calculated using the string '123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  • Calculate 5 indexes using pinID / len^i % len, where len is the length of the string above, and i is 0 to 4


Rough PHP code:
Quote:
function getPinName($pinID)
{
$baseStr = '123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$baseStrLen = strlen($baseStr) - 1;

$pinName = '';
for ($i = 0; $i < 5; $i++) {
$pinName .= $baseStr[$pinID / pow($baseStrLen, $i) % $baseStrLen];
}

return preg_replace('/^(.{2})(.{3})$/', '$1-$2', $pinName);
}
Thanks for the tip, I was looking for that.
Bubb Bastanold
Doomheim
#612 - 2014-09-17 18:30:39 UTC
When opening EVE Droid today I was surprised to see it displayed a list of mail headers from my eve-mailbox, even though the API key it uses does not have MailMessages or MailBodies enabled, and never has had (I double checked). Where did it get the mail headers from?
Roshni Ellecon
Kirlian Enterprises
#613 - 2014-09-18 05:38:16 UTC
CCP FoxFour wrote:
I think you are misunderstanding the cachedUntil values.


Nope, I understood that. My program was looping through all the planets when I clicked my button. So it basically gave me the same cachedUntil date/time for all planets. I've revised my program to pause between planets so I can go in and make a change. It may be a clunky way to do it but it works for me. Big smile
Nosferatu Zodd
Behelith
#614 - 2014-09-18 20:02:24 UTC  |  Edited by: Nosferatu Zodd
I noticed that the Wiki page EVE API was deleted with it's contents moved to XML API Getting Started.
The EVE API page contained the API rate limits and those where not moved to XML API getting started.
And I can't find the info elsewhere, 3rd party webpages link to the EVE API page..
@CCP FoxFour : you deleted deleted that page, will the information be available again?
CCP FoxFour
C C P
C C P Alliance
#615 - 2014-09-18 21:34:14 UTC
That will hopefully be sorted out next week. Until then: https://forums.eveonline.com/default.aspx?g=posts&t=344803&find=unread

@CCP_FoxFour // Technical Designer // Team Tech Co

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

hfo df
Ramm's RDI
Tactical Narcotics Team
#616 - 2014-09-19 09:37:12 UTC
Will buy you a beer if we ever meet if you're up to adding clones to /char/CharacterSheet.xml.aspx.
Don't really care about implants (step1), but i'm sure others do (step2)!
Xinryu
NEXUS Financial
#617 - 2014-09-29 14:54:58 UTC
Osi Shannara
Perkone
Caldari State
#618 - 2014-10-05 21:40:09 UTC
Is there an ETA where at least a part of the CREST API will be available? Every single thread that talks about CREST (this one included) only links to the legacy API ...

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#619 - 2014-10-05 22:38:58 UTC
Osi Shannara wrote:
Is there an ETA where at least a part of the CREST API will be available? Every single thread that talks about CREST (this one included) only links to the legacy API ...




There are public CREST pages available.

http://public-crest.eveonline.com/

Authenticated CREST isn't available yet.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

sprut01
TaxiDermiya
#620 - 2014-10-08 19:27:22 UTC
Hi All,

Can anyone tell me how I can get information about one particular solar system ? By name or by solar system id ?

https://public-crest.eveonline.com/industry/systems/ - this allows me get info about all systems.