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.
 

Public CREST /alliances/ and /incursions/ on Sisi now

First post
Author
CCP FoxFour
C C P
C C P Alliance
#1 - 2014-03-03 16:06:58 UTC  |  Edited by: CCP FoxFour
Hey guys,

I have been doing some more work on public CREST and have a few change deployed to Sisi right now that could use some loving attention and feedback.



There is a known issue with the alliances one, it is supposed to return 250 results per page and is not. I have a fix being reviewed and should hopefully have it out soon. For now though, let me know of any other issues.

Known issues:

  • /alliances/ is returning an incorrect number of results per page
  • /alliances/ is returning a content type of Alliances when it should be AllianceCollection

@CCP_FoxFour // Technical Designer // Team Tech Co

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

Peter Powers
FinFleet
Northern Coalition.
#2 - 2014-03-03 16:08:05 UTC  |  Edited by: Peter Powers
the Perry PHP Library to access CREST has been updated.

Please note that currently the the /alliances/ link in CREST points to a Representation named Alliances, since that will be renamed to AllianceCollection, right now Perry supports both variants. Once Alliances stops working AllianceCollection should start working - both are in the current Perry Version (0.3.*)

More information: https://github.com/3rdpartyeve/perry

Also, all previous References that should have pointed to Alliance, but did point to no-where have been changed to point to the right endpoint, meaning in Killmail, tournaments and such you can use the Reference now.

Example:
$killmail = Perry::fromUrl($urltokillmail);
if(isset($killmail->victim->alliance)) {
$alliance = $killmail->victim->alliance();
var_dump($alliance);
}
/Example

should yield information on the victims alliance now (if the victim is in an alliance)

Edit: made sure bug doesn't return once Alliances changes to AllianceCollection, so its 0.3.4 now
Edit: fixed a bug, so its 0.3.3 now
Edit: added previous/next browsing, so its 0.3.2 now
Edit: added some text to readme, so its 0.3.1 now

Edit: here an example for you, that will fetch all alliance descriptions:
https://gist.github.com/ppetermann/9345273

3rdPartyEve.net - your catalogue for 3rd party applications

Lucia Denniard
Half Empty
skill urself
#3 - 2014-03-03 16:12:11 UTC
The output of the /alliances/ array is a little weird, it seems to have an href wrapping the entire thing:
Quote:

{
"href": {
"name": "Innectis Syndicate",
"id": 99000136,
"href": "http://public-crest-sisi.testeveonline.com/alliances/99000136/",
"shortName": "INS",
"id_str": "99000136"
}
}


So I have to do this:
Quote:

>>> r["items"][0]["href"]["href"]
u'http://public-crest-sisi.testeveonline.com/alliances/99000006/'
>>> r["items"][0]["href"]["name"]
u'Everto Rex Regis'
CCP FoxFour
C C P
C C P Alliance
#4 - 2014-03-03 16:16:34 UTC
When dealing with paginated collections this is the set design. The tournaments endpoint is setup the same: http://public-crest.eveonline.com/tournaments/

To be honest I don't know the exact reasons for why it was designed this way, I am following the currently set design. I will poke around and ask if I am maybe missing something or for a reason why it was done this way.

@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
#5 - 2014-03-03 17:05:50 UTC  |  Edited by: CCP FoxFour
Adding this to known issues: /alliances/ is returning a content type of Alliances when it should be AllianceCollection

@CCP_FoxFour // Technical Designer // Team Tech Co

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

Slvrsmth
Native Freshfood
Minmatar Republic
#6 - 2014-03-04 10:04:22 UTC
You promised member counts in alliance index :(

Carebearium - find the best solar system for you!

CCP FoxFour
C C P
C C P Alliance
#7 - 2014-03-04 10:24:42 UTC
Slvrsmth wrote:
You promised member counts in alliance index :(


I hope to add that later, unfortunately it proved a bit trickier than I thought. Sorry. :(

@CCP_FoxFour // Technical Designer // Team Tech Co

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