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
CCP FoxFour
C C P
C C P Alliance
#661 - 2014-12-11 13:59:35 UTC
Brian Paignton wrote:
Hi, I read this in the Rhea patch notes...

Quote:
Exposed the ItemCategories, ItemCategory, ItemGroups, ItemGroup, ItemTypes, and ItemType resources for inventory data. These resources are available in public CREST.


So I went to https://public-crest.eveonline.com/ which gave me a REST endpoint of https://public-crest.eveonline.com/types/ which can be called. So I tried to access this to get a list of all the items but got the following error...

Quote:
{
"message": "The route was not found",
"key": "routeMissing",
"exceptionType": "NotFoundError"
}


So I then tried going through the industry groups...

https://public-crest.eveonline.com/inventory/groups/28/

... which gave me an new end point of ...

https://public-crest.eveonline.com/types/648/

... but that also gave me the same error about a missing route.

Am I doing something wrong or is this data just not available yet?

I can lift all of this from the SDE but its way more convenient to get it from CREST if it is going to be available there.

Thanks.


Welp. Try now. :)

@CCP_FoxFour // Technical Designer // Team Tech Co

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

Brian Paignton
Lom Corporation
#662 - 2014-12-11 16:07:25 UTC
Thanks. Much better!
However, the feed seems to be missing a number of types. I could not find...

Viator
Anshar
Obelisk (thinking that an Anshar possibly used the Obelisk typeId)

Is the feed complete?

Thanks again.
Querns
GoonWaffe
Goonswarm Federation
#663 - 2014-12-11 16:25:30 UTC
CCP FoxFour wrote:

For your concerns of mobile power consumption: Once Authed CREST is out with actual private data, I hardly see people using Public CREST on mobile. They would be getting private data through Authed CREST. If you are getting private data from Authed CREST it's not worth the added complexity of getting data from both Authed and Public CREST. Add in some basic client side caching, and things should be fine on mobile. Public CREST will mainly be used by... well I am not entirely sure at this point now that Authed CREST is out with a much higher rate limit.

Unauthenticated CREST is still very useful for the client-side code on a website. For example, since CORS headers are being sent, it's very feasible for the client javascript portion of a site to rely on unauthenticated CREST to fetch things like solar system data and type names directly from CREST without having to expose the developer's authentication credentials. Stuff like this is important to me because my primary development is for sites that use AngularJS, which tend towards very light server-side implementations and heavy client implementations.

This post was crafted by the wormhole expert of the Goonswarm Economic Warfare Cabal, the foremost authority on Eve: Online economics and gameplay.

Cor'len
Doomheim
#664 - 2014-12-11 18:28:06 UTC
Hey, CCP Foxfour!

Could you take a look at the cache timer for the MemberTrackingExtended API call? You mentioned that you'd look into reducing it a few months ago, and it'd be very convenient if you could do just that. ;)
Drailen
Doomheim
#665 - 2014-12-11 22:06:36 UTC
I've seen several posts indicating that the CREST root should provide the URIs of all the available endpoints but I can't seem to see the killmail endpoint listed anywhere in the root.

Should it be in there?
Kali Izia
GoomWaffe
#666 - 2014-12-12 07:05:52 UTC  |  Edited by: Kali Izia
Drailen wrote:
I've seen several posts indicating that the CREST root should provide the URIs of all the available endpoints but I can't seem to see the killmail endpoint listed anywhere in the root.

Should it be in there?

It's not listed in the root because it's not something you would access directly. CREST links to killmails when you follow wars from the root (e.g. https://public-crest.eveonline.com/wars/398587/killmails/all/ is one that has kills).
Drailen
Doomheim
#667 - 2014-12-12 11:21:50 UTC
Thanks for the reply.

I was looking to try and avoid hardcoded endpoints and rely on whatever the root returned, but it looks like at least non-war killmails and the market history will require fixed code as there is no reference to these that I could find.
CCP FoxFour
C C P
C C P Alliance
#668 - 2014-12-12 11:54:13 UTC
Drailen wrote:
Thanks for the reply.

I was looking to try and avoid hardcoded endpoints and rely on whatever the root returned, but it looks like at least non-war killmails and the market history will require fixed code as there is no reference to these that I could find.


The market history stuff will probably be changed to match how the market orders works early next year.

@CCP_FoxFour // Technical Designer // Team Tech Co

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

Galattico Bontius
Doomheim
#669 - 2014-12-13 16:59:00 UTC
Does Thera have a system costIndex? The CREST industry/systems systemCostIndicies endpoint doesn't seem to return Thera.
CCP FoxFour
C C P
C C P Alliance
#670 - 2014-12-13 17:14:22 UTC
Galattico Bontius wrote:
Does Thera have a system costIndex? The CREST industry/systems systemCostIndicies endpoint doesn't seem to return Thera.


Interesting... I am away on vacation now so cannot really look into it. I suggest poking @CCP_Nullarbor on twitter and pointing him this way.

@CCP_FoxFour // Technical Designer // Team Tech Co

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

Circumstantial Evidence
#671 - 2014-12-13 19:12:05 UTC
Galattico Bontius wrote:
Does Thera have a system costIndex? The CREST industry/systems systemCostIndicies endpoint doesn't seem to return Thera.
I wonder if it SHOULD (game design question. Perhaps some things are best known to the intrepid explorers who get there.)
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#672 - 2014-12-13 22:18:54 UTC
Circumstantial Evidence wrote:
Galattico Bontius wrote:
Does Thera have a system costIndex? The CREST industry/systems systemCostIndicies endpoint doesn't seem to return Thera.
I wonder if it SHOULD (game design question. Perhaps some things are best known to the intrepid explorers who get there.)



That's one of the reasons none of the other wormhole places have them. visible via the API

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Max Kolonko
Caldari Provisions
Caldari State
#673 - 2014-12-13 23:55:17 UTC  |  Edited by: Max Kolonko
If I go to:

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

And follow link to:

https://public-crest.eveonline.com/regions/

And follow to:

https://public-crest.eveonline.com/regions/10000002/

And want to follow to (i'm getting item type link also following the CREST resources):

https://public-crest.eveonline.com/market/10000002/orders/buy/?type=https://public-crest.eveonline.com/types/185/


I get this error:
{
    "message": "The route was not found",
    "key": "routeMissing",
    "exceptionType": "NotFoundError"
}
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#674 - 2014-12-14 00:07:50 UTC
Max Kolonko wrote:
If I go to:

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

And follow link to:

https://public-crest.eveonline.com/regions/

And follow to:

https://public-crest.eveonline.com/regions/10000002/

And want to follow to (i'm getting item type link also following the CREST resources):

https://public-crest.eveonline.com/market/10000002/orders/buy/?type=https://public-crest.eveonline.com/types/185/


I get this error:
{
    "message": "The route was not found",
    "key": "routeMissing",
    "exceptionType": "NotFoundError"
}



Public crest doesn't allow you to get to the market orders. you have to do that with authenticated crest.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Max Kolonko
Caldari Provisions
Caldari State
#675 - 2014-12-14 00:50:18 UTC
Steve Ronuken wrote:
Max Kolonko wrote:
If I go to:

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

And follow link to:

https://public-crest.eveonline.com/regions/

And follow to:

https://public-crest.eveonline.com/regions/10000002/

And want to follow to (i'm getting item type link also following the CREST resources):

https://public-crest.eveonline.com/market/10000002/orders/buy/?type=https://public-crest.eveonline.com/types/185/


I get this error:
{
    "message": "The route was not found",
    "key": "routeMissing",
    "exceptionType": "NotFoundError"
}



Public crest doesn't allow you to get to the market orders. you have to do that with authenticated crest.


so why is crest pointing me to public-crest.evo link?
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#676 - 2014-12-14 01:44:03 UTC
Max Kolonko wrote:
Steve Ronuken wrote:
Max Kolonko wrote:
If I go to:

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

And follow link to:

https://public-crest.eveonline.com/regions/

And follow to:

https://public-crest.eveonline.com/regions/10000002/

And want to follow to (i'm getting item type link also following the CREST resources):

https://public-crest.eveonline.com/market/10000002/orders/buy/?type=https://public-crest.eveonline.com/types/185/


I get this error:
{
    "message": "The route was not found",
    "key": "routeMissing",
    "exceptionType": "NotFoundError"
}



Public crest doesn't allow you to get to the market orders. you have to do that with authenticated crest.


so why is crest pointing me to public-crest.evo link?



The public crest endpoint is.

The public crest endpoint is somewhat of a hack.

if you use crest-tq.eveonline.com you'll get what you should.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Max Kolonko
Caldari Provisions
Caldari State
#677 - 2014-12-14 06:49:20 UTC
Steve Ronuken wrote:
Max Kolonko wrote:
Steve Ronuken wrote:
Max Kolonko wrote:
If I go to:

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

And follow link to:

https://public-crest.eveonline.com/regions/

And follow to:

https://public-crest.eveonline.com/regions/10000002/

And want to follow to (i'm getting item type link also following the CREST resources):

https://public-crest.eveonline.com/market/10000002/orders/buy/?type=https://public-crest.eveonline.com/types/185/


I get this error:
{
    "message": "The route was not found",
    "key": "routeMissing",
    "exceptionType": "NotFoundError"
}



Public crest doesn't allow you to get to the market orders. you have to do that with authenticated crest.


so why is crest pointing me to public-crest.evo link?



The public crest endpoint is.

The public crest endpoint is somewhat of a hack.

if you use crest-tq.eveonline.com you'll get what you should.


Ok good to know. Why there is no info on that? Why there is no URL's related to crest on developers page CREST article? Why I have to ask those question in a forum?
Max Kolonko
Caldari Provisions
Caldari State
#678 - 2014-12-14 07:09:02 UTC  |  Edited by: Max Kolonko
Ok I got the response but I need to know what is the response format.
I got binary data as response instead of plaintext, so I assume its gzip or something?

I'm trying to do this in RStudio and like I wrote already managed to get what I think is valid response:

Response [https://crest-tq.eveonline.com/market/10000002/orders/buy/?type=https://crest-tq.eveonline.com/types/185/]
  Date: 2014-12-14 08:05
  Status: 200
  Content-type: application/vnd.ccp.eve.MarketOrderCollection-v1+json; charset=utf-8
  Size: 7.61 kB
[BINARY BODY]



Edit: read the headers and indeed its gzip, now I need to figure out how to deal with it using R :)

Edit2: DONE :) the problem was weird Content-Type returned by API (application/vnd.ccp.eve.MarketOrderCollection-v1+json; charset=utf-8)

What I did was:
result <- content(req, type = "application/json; charset=utf-8")

By forcing regular app/json type R was able to read data

I will post my complete code in next post :)
Max Kolonko
Caldari Provisions
Caldari State
#679 - 2014-12-14 18:21:38 UTC
https://github.com/Tetlanesh/r_eve_crest

its in "working" state. It will prompt You for login, handle Your refresh token (at least during single R session) and will follow CREST endpoint href links so if something changes in url it will still work.

There is no chaching for now, no depreciation headers checking (i dont even know how it works yet) and no error handling

Very easy to use:

token<-SETEVE("yourappname", "yourclientid", "yoursecret")
orders<-GETEVE_marketorders("The Forge","Moros Blueprint",token)


This will produce list of two data frames: buy and sell orders


note: I'm playing with this while I'm learning R from scratch (my first "real" challange as oposed to examples from my course) so a lot of this might be done much better, faster, cheaper, etc...
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#680 - 2014-12-14 21:50:28 UTC
The Content-Type is used to specify specific version of the data returned (Well, the Accept header is. The content-type header is the response for that.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter