Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
Leon Jacobs edited this page Jan 17, 2017 · 15 revisions

SeAT

welcome to the eseye wiki!

This wiki hopes to document the usages of this library and anything else you might need.

introduction

In case you missed it, CCP recently announced a new API for EVE Online called ESI. Primarily, this API will be based on the increasingly popular Open API Specification. Effectively, it will be a REST based API, serializing using json. If you are not sold yet, well then I don't know.

Eseye aims to be a generic PHP wrapper around ESI, hoping to make the life of an API consumer a lot easier by automatically handling the access_token renewal, caching responses correctly (using multiple, extendable cache providers) and minimizing the amount of errors that can occur.

The library also aims to be relatively generic, meaning that it will not necessarily need an update should a new API endpoint be introduced, or an existing one changed.

authentication

One of the key things that is different in ESI when compared to the old XML based API is how authentication is handled. Previously, you would go and generate an API key pair for use in third party tools. These tools would then use this key pair to make API requests as needed.

In the ESI world, this is slightly different and handled using an implicit OAuth 2.0 specification. This means, you as a developer have to go and register your application with CCP to gain a Client ID and Secret Key. This information is then used to prompt users to login to their EVE Online accounts using SSO. Once logged in, it is possible to request a refresh token (based on the scopes the user accepted) which is finally used to make calls to the new ESI API. This refresh token is valid until the user goes and deletes your applications' access to their account.

in practice

What this really means for an API consumer, is that you need to get that refresh token before you can make any authenticated ESI calls. Admittedly, its not as easy as it used to be with the old XML api, but not an impossible problem to solve for API consumers.

Eseye includes a small helper that will allow you to easily generate a refresh tokens documented here: Getting A Refresh Token.

getting started

Before you get started with making any API calls, it is highly advisable that you head over to the official Swagger documentation site for ESI at https://esi.tech.ccp.is. When you look at an endpoint, take special note of the HTTP METHOD used, the Route as well as the specific parameter Types needed for any call. It is the combination of these values that will allow you to make calls using Eseye.

Once you have a firm understanding of this, head over to the Eseye Simple Tutorial section for an example of how to use the library itself.