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.
Previous page123Next page
 

XML API (angry thoughts)

First post
Author
Jone Sad
Doomheim
#21 - 2017-01-13 15:06:42 UTC  |  Edited by: Jone Sad
Whitney Aubaris wrote:
I am cool with the idea of the new codes although it would be nice if they kept the old simple API keys for the newbs like me who can only just scrape by with the little code we know.

I just spent a week building my self a vary good looking fully detailed site that runs off just API grabs and now I hear they are going to change how we get the info. Makes me wish I didn't wast my time with any of it.

C.orporate
C.ontrol
P.ointing

E.veryone's
V.ision
E.lsewhere

Fly Safe everyone o7


Your time wasted, same as any developer that will do any software now. :(

Lest look closer.

You need sso. Then you should use latest 'good' api it's seems like CREST !?!? But it's not full! So... You will use XML API, that will be deprecated in a year, mb more. And what now you think "wtf then what i should use?". Everyone say use ESI new and cool! But... ESI same as CREST - has not full api calls that REALLY needed. It's like have titan but you have no injected skills for it. You forgot about BASIC things. People use api first of all for CORPORATION, not for single use...

FOR CCP: First of all you HAVE TO implement wallets (corp\char), assets (corp\char), mails\notifcations (corp\char) and ONLY after that do you want. Without it it's not api - it something useless...

BTW only XML API (vCode + keyID) was done completely. All others cannot be used standalone from other apis (crest\esi\sso). It's means that I should learn ALL that thrash (uncomplete) that you did to create own working well application and use several api types. NICE. And noone know, what api will be deprecated next...


PS: My butt hurt doesn't know the end.... XD
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#22 - 2017-01-13 18:02:15 UTC
Whitney Aubaris wrote:
I am cool with the idea of the new codes although it would be nice if they kept the old simple API keys for the newbs like me who can only just scrape by with the little code we know.

I just spent a week building my self a vary good looking fully detailed site that runs off just API grabs and now I hear they are going to change how we get the info. Makes me wish I didn't wast my time with any of it.

C.orporate
C.ontrol
P.ointing

E.veryone's
V.ision
E.lsewhere

Fly Safe everyone o7


Uhhh, you spent time building something, without taking a look at what CCP were going to do? CREST has been out for a fair time now. ESI was announced 2 months ago.

And it's CCP's fault?

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Jone Sad
Doomheim
#23 - 2017-01-14 00:23:54 UTC
Steve Ronuken wrote:
Whitney Aubaris wrote:
I am cool with the idea of the new codes although it would be nice if they kept the old simple API keys for the newbs like me who can only just scrape by with the little code we know.

I just spent a week building my self a vary good looking fully detailed site that runs off just API grabs and now I hear they are going to change how we get the info. Makes me wish I didn't wast my time with any of it.

C.orporate
C.ontrol
P.ointing

E.veryone's
V.ision
E.lsewhere

Fly Safe everyone o7


Uhhh, you spent time building something, without taking a look at what CCP were going to do? CREST has been out for a fair time now. ESI was announced 2 months ago.

And it's CCP's fault?


ESI same *hit as CREST... Something is doing but will it has the working end? Nobody knows... LOL
CowRocket Void
Of Tears and ISK
ISK.Net
#24 - 2017-01-14 02:00:16 UTC
The "mostly code illiterate" folks (me) who do "stuff"(also me) with the current XML api got a big kick in the junk with ESI.

bleeding shadow darkness > did i just saw a red procurer? :P

Whitney Aubaris
AWOLGamers
#25 - 2017-01-14 20:53:32 UTC  |  Edited by: Whitney Aubaris
Steve Ronuken wrote:
Whitney Aubaris wrote:
I am cool with the idea of the new codes although it would be nice if they kept the old simple API keys for the newbs like me who can only just scrape by with the little code we know.

I just spent a week building my self a vary good looking fully detailed site that runs off just API grabs and now I hear they are going to change how we get the info. Makes me wish I didn't wast my time with any of it.

C.orporate
C.ontrol
P.ointing

E.veryone's
V.ision
E.lsewhere

Fly Safe everyone o7


Uhhh, you spent time building something, without taking a look at what CCP were going to do? CREST has been out for a fair time now. ESI was announced 2 months ago.

And it's CCP's fault?


CCP's fault? Yes. Now on the other hand If they keep the API system running and keep it updated then I have no problem with new systems coming out and CCP would not need to take any blame. Just keep API's active and running until the end of EVE so newbs like me can make stuff happen.

Being a CSM I would hope you had the guts to bring it up in a meeting and even push hard for it as the majority of the EVE players have little to no knowledge in code.

Another thing to do seeing that you guys want to get rid of API so badly would be to provide tutorials (in full detail) on how the new codes are to be setup/built so newbs like my self can follow along and learn a few things.

Final note and anyone here that plays some of the newer games that have been released in the past 4ish years would likely agree with me. Most of the games being released the past few years are incomplete games full of bugs and interest killers. Now look at CCP they are starting to look just like everyone else. Adding new things to the game and to the coding groups that are incomplete and broken. The players are not your beta testers unless its on the beta server only. When the project is complete then you can release your final product. If you have to push the release date back so be it. Don't be an artist that tries to sale his/her art before your done with it.

PS: Your not the only one out there that needs to do some coding Fuzzworks. There shouldn't be a monopoly on the coding market for anyone making EVE apps, sites, etc.
Jone Sad
Doomheim
#26 - 2017-01-15 14:56:13 UTC
Whitney Aubaris wrote:
Steve Ronuken wrote:
Whitney Aubaris wrote:
I am cool with the idea of the new codes although it would be nice if they kept the old simple API keys for the newbs like me who can only just scrape by with the little code we know.

I just spent a week building my self a vary good looking fully detailed site that runs off just API grabs and now I hear they are going to change how we get the info. Makes me wish I didn't wast my time with any of it.

C.orporate
C.ontrol
P.ointing

E.veryone's
V.ision
E.lsewhere

Fly Safe everyone o7


Uhhh, you spent time building something, without taking a look at what CCP were going to do? CREST has been out for a fair time now. ESI was announced 2 months ago.

And it's CCP's fault?


CCP's fault? Yes. Now on the other hand If they keep the API system running and keep it updated then I have no problem with new systems coming out and CCP would not need to take any blame. Just keep API's active and running until the end of EVE so newbs like me can make stuff happen.

Being a CSM I would hope you had the guts to bring it up in a meeting and even push hard for it as the majority of the EVE players have little to no knowledge in code.

Another thing to do seeing that you guys want to get rid of API so badly would be to provide tutorials (in full detail) on how the new codes are to be setup/built so newbs like my self can follow along and learn a few things.

Final note and anyone here that plays some of the newer games that have been released in the past 4ish years would likely agree with me. Most of the games being released the past few years are incomplete games full of bugs and interest killers. Now look at CCP they are starting to look just like everyone else. Adding new things to the game and to the coding groups that are incomplete and broken. The players are not your beta testers unless its on the beta server only. When the project is complete then you can release your final product. If you have to push the release date back so be it. Don't be an artist that tries to sale his/her art before your done with it.

PS: Your not the only one out there that needs to do some coding Fuzzworks. There shouldn't be a monopoly on the coding market for anyone making EVE apps, sites, etc.


CSM is useless position in CCP. CCP doesn't listen it at all. ;) CSM is some kind of "throughts collector". When he\she collects thoughts he announce them to CCP. And that's all.

I aggree with you man. As I said earlier they doing api such way that only developer (in rl) can handle their API (FOR FREE, you cannot ask real money for it!). And in the end - their api will die. It's dieing now...


We need ready api with full manual or just close all uncomplete branches - what for are they? They confuse anyone who tries to create something... They only shows that ccp pay someone money to create new some api and then fire it.

I see it in this way.
Was a person group that creates XML API (hello old school! you are great). Then came new group that creates CREST... But wait! Lest create SSO! Another group of devs came? LOL And now new (afaik) came to develop that ESI....

So CCP spent their money ... For what!? LOL

Your problem that you hiring wrong guys, and I think not for "free"...

PS: When you work developer a lot, you know how it goes in another companies.

PS2: CSM is a regular person, don't rely on him\her, he cannot affect at all, he\she can only suggest. And mostly CCP refuse suggestion. I talked to CSM guys a lot, it's only fiction that you can change something, it's same like you post your thought on this forum.
Farmer Johnson's Daughter
United Federation Of Space Dealers
Already Replaced.
#27 - 2017-01-15 18:24:05 UTC  |  Edited by: Farmer Johnson's Daughter
One of the things that drives me nuts is this sso crap. Everyone points to the docs with endpoints and says "its all there" , you know...except and actual working friggen example for php.

A full, complete example to check any authenticated endpoint with this sso garbage. Laravel support?. Anything. One simple example. Show me the light :)

Phealng is great but how long will crest be around? 16months?
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#28 - 2017-01-15 18:24:54 UTC
Hate to tell you this, but your suppositions on _why_ the new APIs happens is wrong. Which is fairly obvious to anyone who interacts with the wider Eve third party community. Where the developers involved are actually pretty responsive.

Will there be a full manual for the API? I seriously doubt it. There's documentation now, with ESI. That's a bonus from the way they're doing it. Swagger pretty much means that there is some documentation.

The XML api has _severe_ limitations, mostly stemming from how it interacts with Eve. (It talks directly to the database. Which doesn't contain full state)

Crest was primarily created for the Dust integration, allowing for some limited interaction with game state.

CREST has some other limits, and wasn't suitable for the mobile app, which is the main driver for ESI. There are devs who have some and gone in that time, but that's just people moving from companies. It happens. Not people being fired.


As for why some things are taking longer to port than you might expect: Eve's complicated. And this is trying to graft functionality which was never designed into it. Assumptions which made perfect sense when they were made, no longer do, and cause problems. One of the big problems is sessions. Eve was designed for a single session per user. The API (other than XML, but that can't actually do anything which would need one) would need a second. Which breaks things. so fun for everyone involved

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#29 - 2017-01-15 18:37:24 UTC
Farmer Johnson's Daughter wrote:
One of the things that drives me nuts is this sso crap. Everyone points to the docs with endpoints and says "its all there" , you know...except and actual working friggen example for php.

A full, complete example to check any authenticated endpoint with this sso garbage. Laravel support?. Anything. One simple example. Show me the light :)

Phealng is great but how long will crest be around? 16months?



https://github.com/fuzzysteve/fleetTracker

is a crest example.

(rename secret.php.example to secret.php, and give it the details from your app on the dev site)

ESI is pretty much the same as crest from an auth perspective. You hand the auth header in the same way.


Auth is OAUTH2. An industry standard.

https://esi.tech.ccp.is/latest/ has all the endpoints, and has the option to do lookups with it, for example.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Farmer Johnson's Daughter
United Federation Of Space Dealers
Already Replaced.
#30 - 2017-01-15 18:48:23 UTC  |  Edited by: Farmer Johnson's Daughter
Steve Ronuken wrote:



https://github.com/fuzzysteve/fleetTracker

is a crest example.

(rename secret.php.example to secret.php, and give it the details from your app on the dev site)

ESI is pretty much the same as crest from an auth perspective. You hand the auth header in the same way.


Auth is OAUTH2. An industry standard.

https://esi.tech.ccp.is/latest/ has all the endpoints, and has the option to do lookups with it, for example.


Thanks steve but this is what im talking about, you showed me a crest example, not a esi example, then referenced the esi latest again which is useless as it doesn't show me how to actually use it with php from my local testing environment.

Example: how do i, from scratch, simply get the wallet of my own character.

for example, i have this so far, and that's it, where the hell do i start lol. I know its a lot to ask but so frustrating without a clear example for less experienced devs. I can work laravel pretty well but cant figure out this sso crap to save my life

"$authorization = "Authorization: Bearer how the hell do i get this, from where, what process";
$ch = curl_init("https://esi.tech.ccp.is/latest/characters/{character_id}/wallets//?datasource=tranquility");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
$authorization,
));
// curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// curl_setopt($ch, CURLOPT_POSTFIELDS,$authorization);
// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
// curl_setopt($ch, CURLOPT_POST,false);
$result = curl_exec($ch);
//dd($result);
curl_close($ch);
return $result;"




hopefully someone will whip up a CLEAR laravel package :)
Jone Sad
Doomheim
#31 - 2017-01-15 18:56:34 UTC
Farmer Johnson's Daughter wrote:
[quote=Steve Ronuken]hopefully someone will whip up a CLEAR laravel package :)

Rly? AHAHAHAHAH common dude. Who will spent his time to handle x3 apis of ccp and will create clean solution... With deprecated branches... And support, etc. For free! Forget about it. Do it by yourself... :(

Hm, but wait, I know, CSM guy will do? Right? He think it's easy and clean.
Farmer Johnson's Daughter
United Federation Of Space Dealers
Already Replaced.
#32 - 2017-01-15 19:00:14 UTC  |  Edited by: Farmer Johnson's Daughter
Jone Sad wrote:
Farmer Johnson's Daughter wrote:
[quote=Steve Ronuken]hopefully someone will whip up a CLEAR laravel package :)

Rly? AHAHAHAHAH common dude. Who will spent his time to handle x3 apis of ccp and will create clean solution... With deprecated branches... And support, etc. For free! Forget about it. Do it by yourself... :(

Hm, but wait, I know, CSM guy will do? Right? He think it's easy and clean.


I meant a package for only esi for laravel. A man can dream right?

Id take a one page script showing me how to pull the data i asked for above (wallet) , i can get the rest from there. IM looking through the link steve posted i think i see it in his examples but i have to try to make it work

If its a simple as they claim it should be dead simple to show me a one page php example that can grab the wallet right?

I'm using phealng right now and i have that all figured but how long is crest going to be around? i heard 16months, true?
Jone Sad
Doomheim
#33 - 2017-01-15 19:10:42 UTC
Steve Ronuken wrote:
...


Man you linking all the time ESI latest... But SIMPLE QUESTION, that any developer look in this "manual" - WHAT IS THE BASE URL? Where is manual? LOL Only description of simple queries. STOP linking that uncomplete site... It's annoying.

Link it when it will be totally ready. Stop rly...

And you linking your code... =\
BTW fix first your site. Half of data\code you presented doesn't work or old (calculations).
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#34 - 2017-01-15 19:17:37 UTC
Farmer Johnson's Daughter wrote:
Steve Ronuken wrote:



https://github.com/fuzzysteve/fleetTracker

is a crest example.

(rename secret.php.example to secret.php, and give it the details from your app on the dev site)

ESI is pretty much the same as crest from an auth perspective. You hand the auth header in the same way.


Auth is OAUTH2. An industry standard.

https://esi.tech.ccp.is/latest/ has all the endpoints, and has the option to do lookups with it, for example.


Thanks steve but this is what im talking about, you showed me a crest example, not a esi example, then referenced the esi latest again which is useless as it doesn't show me how to actually use it with php from my local testing environment.

Example: how do i, from scratch, simply get the wallet of my own character.

for example, i have this so far, and that's it, where the hell do i start lol. I know its a lot to ask but so frustrating without a clear example for less experienced devs. I can work laravel pretty well but cant figure out this sso crap to save my life

"$authorization = "Authorization: Bearer how the hell do i get this, from where, what process";
$ch = curl_init("https://esi.tech.ccp.is/latest/characters/{character_id}/wallets//?datasource=tranquility");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
$authorization,
));
// curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// curl_setopt($ch, CURLOPT_POSTFIELDS,$authorization);
// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
// curl_setopt($ch, CURLOPT_POST,false);
$result = curl_exec($ch);
//dd($result);
curl_close($ch);
return $result;"




hopefully someone will whip up a CLEAR laravel package :)



Laravel isn't a framework I've used. And I'm not planning on learning it Blink

However, you get the authorization header in exactly the same way as you do with CREST. You just request ESI scopes, rather than CREST ones. Nothing has changed, with regards to the SSO.



Some links which _may_ be useful:
http://stackoverflow.com/questions/29441954/laravel-oauth2-client-authorizing-and-redirecting-with-guzzle


(Things can be a touch confusing, because there are packages to make laravel a oauth server, as well as a client. You just need it to be a client)



Short explanation of OAUTH 2:

The user clicks on login. This is normally a link directly to the login server, in this case, at CCP. This link contains your client ID, where to send the user back to (CCP have set this so it _must_ match what you set in the developers site), the list of scopes that you want (space seperated), and a state id. (The state isn't needed. but is handy if you want to make sure a session exists. Or want to store where to send the user back to, or something along those lines)

Once the user has authenticated, and approved scopes, they're sent back to your site, using the url which you passed (for CCP's, this must be what's in their database) along with a token.

The site must then take that token, and send it to CCP along with their clientid and secret ( base 64 encoded).

CCP then send (as a response to the site. This happens entirely server side, between the 2 servers) an access token, and a refresh token. (if no scopes were requested, it's just the access token) There's also a character owner hash (this is non standard) which lets you know if a character is moved between accounts. If it changes for a character, it's changed account.

You now have your access token, and your refresh token.



You can see the communication between the sites on https://github.com/fuzzysteve/fleetTracker/blob/master/auth.php

This is the same regardless of if you want to use CREST or ESI.


In my example, the login is handled by a redirect, rather than a direct link. This is just so I can set up a few session variables first. https://github.com/fuzzysteve/fleetTracker/blob/master/login.php


The access token is only valid for 20 minutes. Once that expires, the token is useless.

If you have a refresh token, you can use this to get a new access token at will. That's what the refresh_token() function does in the following file.

https://github.com/fuzzysteve/fleetTracker/blob/master/auth_functions.php#L9

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#35 - 2017-01-15 19:27:31 UTC  |  Edited by: Steve Ronuken
Jone Sad wrote:
Steve Ronuken wrote:
...


Man you linking all the time ESI latest... But SIMPLE QUESTION, that any developer look in this "manual" - WHAT IS THE BASE URL? Where is manual? LOL Only description of simple queries. STOP linking that uncomplete site... It's annoying.

Link it when it will be totally ready. Stop rly...

And you linking your code... =\
BTW fix first your site. Half of data\code you presented doesn't work or old (calculations).



There is no base URL. This isn't CREST which you can walk.

If you're asking 'what is the URL to make requests', you've obviously never actually used the examples on site. Which give you it.

An example:

Go to the ESI site. (That's https://esi.tech.ccp.is/latest/ if you've forgotten)

Pick an API to look at. Lets pick the assets one. So hit show/hide, then click on "Get character assets"

That little exclamation mark in a red circle lets you know you need to have esi-read-assets.v1 as your scope.

So hit the authorize link at the top, select that scope, then scroll down and click authorize.

Go through that auth flow. and it'll return you to the esi site.

Fill in a character ID (your own, as your token is only allowed to read your assets) then click 'try it out'


You'll see something like

curl -i --compressed -X GET --header 'Accept: application/json' --header 'Authorization: Bearer y-CKI1oXOlYF5jjYc1o8-EEQL4OWZeGc_axRU1YdeL32s0MWNzWgT-Jmi1XwULuYLcaqCNpHoDS_T1rwIGTTbw2' 'https://esi.tech.ccp.is/latest/characters/90926985/assets/?datasource=tranquility'


followed by a listing of your assets.


Now onto the rest of what you said:


Which bits of my site are you complaining about? Things on github, or on my actual site?

And as for linking the site when it's complete, I suspect you'll never be happy. Welcome to the real world.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Jone Sad
Doomheim
#36 - 2017-01-15 19:33:05 UTC
Steve Ronuken wrote:
Jone Sad wrote:
Steve Ronuken wrote:
...


Man you linking all the time ESI latest... But SIMPLE QUESTION, that any developer look in this "manual" - WHAT IS THE BASE URL? Where is manual? LOL Only description of simple queries. STOP linking that uncomplete site... It's annoying.

Link it when it will be totally ready. Stop rly...

And you linking your code... =\
BTW fix first your site. Half of data\code you presented doesn't work or old (calculations).



There is no base URL. This isn't CREST which you can walk.

If you're asking 'what is the URL to make requests', you've obviously never actually used the examples on site. Which give you it.

An example:

Go to the ESI site. (That's https://esi.tech.ccp.is/latest/ if you've forgotten)

Pick an API to look at. Lets pick the assets one. So hit show/hide, then click on "Get character assets"

That little exclamation mark in a red circle lets you know you need to have esi-read-assets.v1 as your scope.

So hit the authorize link at the top, select that scope, then scroll down and click authorize.

Go through that auth flow. and it'll return you to the esi site.

Fill in a character ID (your own, as your token is only allowed to read your assets) then click 'try it out'


You'll see something like

curl -i --compressed -X GET --header 'Accept: application/json' --header 'Authorization: Bearer y-CKI1oXOlYF5jjYc1o8-EEQL4OWZeGc_axRU1YdeL32s0MWNzWgT-Jmi1XwULuYLcaqCNpHoDS_T1rwIGTTbw2' 'https://esi.tech.ccp.is/latest/characters/90926985/assets/?datasource=tranquility'


followed by a listing of your assets.





Okay. But where it's written mate? Only by this post I learn that api-url is relative. And what about others? They should search this post to understand that? That's I'm talking about! "API described somewhere in a forum... Search and you will find... Maybe..." - is a bad manual. =\
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#37 - 2017-01-15 19:37:22 UTC  |  Edited by: Steve Ronuken
Jone Sad wrote:
Steve Ronuken wrote:
Jone Sad wrote:
Steve Ronuken wrote:
...


Man you linking all the time ESI latest... But SIMPLE QUESTION, that any developer look in this "manual" - WHAT IS THE BASE URL? Where is manual? LOL Only description of simple queries. STOP linking that uncomplete site... It's annoying.

Link it when it will be totally ready. Stop rly...

And you linking your code... =\
BTW fix first your site. Half of data\code you presented doesn't work or old (calculations).



There is no base URL. This isn't CREST which you can walk.

If you're asking 'what is the URL to make requests', you've obviously never actually used the examples on site. Which give you it.

An example:

Go to the ESI site. (That's https://esi.tech.ccp.is/latest/ if you've forgotten)

Pick an API to look at. Lets pick the assets one. So hit show/hide, then click on "Get character assets"

That little exclamation mark in a red circle lets you know you need to have esi-read-assets.v1 as your scope.

So hit the authorize link at the top, select that scope, then scroll down and click authorize.

Go through that auth flow. and it'll return you to the esi site.

Fill in a character ID (your own, as your token is only allowed to read your assets) then click 'try it out'


You'll see something like

curl -i --compressed -X GET --header 'Accept: application/json' --header 'Authorization: Bearer y-CKI1oXOlYF5jjYc1o8-EEQL4OWZeGc_axRU1YdeL32s0MWNzWgT-Jmi1XwULuYLcaqCNpHoDS_T1rwIGTTbw2' 'https://esi.tech.ccp.is/latest/characters/90926985/assets/?datasource=tranquility'


followed by a listing of your assets.





Okay. But where it's written mate? Only by this post I learn that api-url is relative. And what about others? They should search this post to understand that? That's I'm talking about! "API described somewhere in a forum... Search and you will find... Maybe..." - is a bad manual. =\


Edit: I've taken out an insult that I shouldn't have put in.

To expand:

Swagger is a specification for APIs. http://swagger.io/ for details

The swagger file, which can be used to automagically generate code, is available at the top of the page. That's the json link.

The link for the 'latest' version of the API is at the top of the page, "URL"

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Farmer Johnson's Daughter
United Federation Of Space Dealers
Already Replaced.
#38 - 2017-01-15 19:53:08 UTC
Steve Ronuken wrote:



Laravel isn't a framework I've used. And I'm not planning on learning it Blink

However, you get the authorization header in exactly the same way as you do with CREST. You just request ESI scopes, rather than CREST ones. Nothing has changed, with regards to the SSO.



Some links which _may_ be useful:
http://stackoverflow.com/questions/29441954/laravel-oauth2-client-authorizing-and-redirecting-with-guzzle


(Things can be a touch confusing, because there are packages to make laravel a oauth server, as well as a client. You just need it to be a client)



Short explanation of OAUTH 2:

The user clicks on login. This is normally a link directly to the login server, in this case, at CCP. This link contains your client ID, where to send the user back to (CCP have set this so it _must_ match what you set in the developers site), the list of scopes that you want (space seperated), and a state id. (The state isn't needed. but is handy if you want to make sure a session exists. Or want to store where to send the user back to, or something along those lines)

Once the user has authenticated, and approved scopes, they're sent back to your site, using the url which you passed (for CCP's, this must be what's in their database) along with a token.

The site must then take that token, and send it to CCP along with their clientid and secret ( base 64 encoded).

CCP then send (as a response to the site. This happens entirely server side, between the 2 servers) an access token, and a refresh token. (if no scopes were requested, it's just the access token) There's also a character owner hash (this is non standard) which lets you know if a character is moved between accounts. If it changes for a character, it's changed account.

You now have your access token, and your refresh token.



You can see the communication between the sites on https://github.com/fuzzysteve/fleetTracker/blob/master/auth.php

This is the same regardless of if you want to use CREST or ESI.


In my example, the login is handled by a redirect, rather than a direct link. This is just so I can set up a few session variables first. https://github.com/fuzzysteve/fleetTracker/blob/master/login.php


The access token is only valid for 20 minutes. Once that expires, the token is useless.

If you have a refresh token, you can use this to get a new access token at will. That's what the refresh_token() function does in the following file.

https://github.com/fuzzysteve/fleetTracker/blob/master/auth_functions.php#L9



Thanks Steve, appreciate all the help. I'll see what i can come up with :)
Jone Sad
Doomheim
#39 - 2017-01-15 19:54:19 UTC
Steve Ronuken wrote:
Jone Sad wrote:
Steve Ronuken wrote:
Jone Sad wrote:
Steve Ronuken wrote:
...


Man you linking all the time ESI latest... But SIMPLE QUESTION, that any developer look in this "manual" - WHAT IS THE BASE URL? Where is manual? LOL Only description of simple queries. STOP linking that uncomplete site... It's annoying.

Link it when it will be totally ready. Stop rly...

And you linking your code... =\
BTW fix first your site. Half of data\code you presented doesn't work or old (calculations).



There is no base URL. This isn't CREST which you can walk.

If you're asking 'what is the URL to make requests', you've obviously never actually used the examples on site. Which give you it.

An example:

Go to the ESI site. (That's https://esi.tech.ccp.is/latest/ if you've forgotten)

Pick an API to look at. Lets pick the assets one. So hit show/hide, then click on "Get character assets"

That little exclamation mark in a red circle lets you know you need to have esi-read-assets.v1 as your scope.

So hit the authorize link at the top, select that scope, then scroll down and click authorize.

Go through that auth flow. and it'll return you to the esi site.

Fill in a character ID (your own, as your token is only allowed to read your assets) then click 'try it out'


You'll see something like

curl -i --compressed -X GET --header 'Accept: application/json' --header 'Authorization: Bearer y-CKI1oXOlYF5jjYc1o8-EEQL4OWZeGc_axRU1YdeL32s0MWNzWgT-Jmi1XwULuYLcaqCNpHoDS_T1rwIGTTbw2' 'https://esi.tech.ccp.is/latest/characters/90926985/assets/?datasource=tranquility'


followed by a listing of your assets.





Okay. But where it's written mate? Only by this post I learn that api-url is relative. And what about others? They should search this post to understand that? That's I'm talking about! "API described somewhere in a forum... Search and you will find... Maybe..." - is a bad manual. =\


Edit: I've taken out an insult that I shouldn't have put in.

To expand:

Swagger is a specification for APIs. http://swagger.io/ for details

The swagger file, which can be used to automagically generate code, is available at the top of the page. That's the json link.

The link for the 'latest' version of the API is at the top of the page, "URL"



Ding,ding, ding!!! New technology! So on your opinion, any developer should know about this unknown framework? Rly? If someone write on site that it's world know - IT DOES NOT.... Ok? And this is FIRST link esi manual should start, okay? Okay...
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#40 - 2017-01-15 20:18:55 UTC
Previous page123Next page