Talking to Eve

Talking to Eve

I have been playing Eve Online on and off since 2007. One of the features I liked most was the ability to interact with the world of Eve Online through their API. In the beginning, working with their API was painful for me, as documentation was lacking. More recently they switched over to a more modern API, the Eve Swagger Interface (ESI). Using ESI an application or web site can interact with Eve Online in various ways.

ESI allowed me to build Ageira Trade, a web site where characters can buy and sell in-game resources from and to me. The web site uses ESI to fetch in-game contracts and compare them against quotes submitted through the web site. The matching process happens automatically, which allows me to see which contracts are valid and accept them without having to manually check each one. I will write a blog post about Ageira Trade in the near future.

Node.js

A while ago I developed a small node,js module for working with Eve Online Single-Sign On (SSO). By using SSO developers can authenticate Eve Online characters and communicate with the API on their behalf. Eve uses scopes to implement this; scopes are requested by the developer, the user can decide whether or not to grant the requested scopes.

My first module, which handles SSO exclusively, is eve-sso. Using eve-sso developers can easily use SSO to authenticate characters and request scopes. I am using this module myself in production over at Ageira Trade. The module takes away the hassles of dealing with redirect URLs and grant requests. It supports access tokens and refresh tokens.

I built eve-esi on top of eve-sso. The module is a more complete module which includes account and character management, and aims to make working with ESI less painful. However, at the time of writing, the module can use an overhaul, which I intend to do in the near future. I made a wrong assumption when first building it, resulting in each character having a separate account without being able to link characters together. I intent to rectify this in the next major release.

Browser

Recently I started doing front-end development again, as you can read here. I needed a way to access the Eve Swagger Interface (ESI) from the browser. Luckily, I only needed to access endpoints which do not require authentication. This greatly simplified the task of writing a small module for this purpose.

The result is esi-browser, a simple browser module which caches results in LocalStorage and respects ESI’s Expires and ETag headers. I am using it as part of Agera Trade. The small module allows developers to easily access, for example, info about in-game items. This negates the need to load the information on the server instead.

Next steps

My Ageira Trade project is nearly complete; some functionality in the administration panel is still painfully absent, but the customer-facing portion, as well as the back-end, work like a charm.

Be sure to check out the modules if you’re interested in developing against ESI. The source code for these modules, as well as Ageira Trade, is available on GitHub under the MIT license. Happy coding!


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.