All Projects → bruce → esi

bruce / esi

Licence: MIT license
Eve Online Swagger Interface (ESI) for Elixir

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to esi

skillq
A web based Skill Monitor for Eve Online.
Stars: ✭ 17 (+13.33%)
Mutual labels:  eveonline
go-evepraisal
the code that powers evepraisal.com
Stars: ✭ 61 (+306.67%)
Mutual labels:  eveonline
Insight
Discord bot providing PvP activity tracking, intel, and utilities for the game EVE Online.
Stars: ✭ 27 (+80%)
Mutual labels:  eveonline
jeveassets
jEveAssets is an out-of-game asset manager for Eve-Online, written in Java
Stars: ✭ 98 (+553.33%)
Mutual labels:  eveonline
BuySYS
*NO LONGER MAINTAINED* Buyback application for EveOnline, can be used by Corporations/Alliances or private entities. Written in PHP 7.4
Stars: ✭ 12 (-20%)
Mutual labels:  eveonline
Opux
Opux is a Discord bot for EVEOnline
Stars: ✭ 13 (-13.33%)
Mutual labels:  eveonline
eve online
EveOnline ESI API
Stars: ✭ 23 (+53.33%)
Mutual labels:  eveonline
Priceall
Easy appraisal checking.
Stars: ✭ 16 (+6.67%)
Mutual labels:  eveonline
evedata
EVE Data Website
Stars: ✭ 25 (+66.67%)
Mutual labels:  eveonline

ESI

An Elixir client for Eve Online's Swagger Interface (ESI).

Installation

Install from Hex.pm:

def deps do
  [{:esi, "~> 0.1"}]
end

Documentation

Documentation is available at https://hexdocs.pm/esi.

Synopsis

This package uses the ESI Swagger Specification as published by CCP Games---plus some custom rules---to generate an Elixir API that (hopefully) feels more hand-written than code-generated.

You can see what version of the ESI Swagger Specification was used by running:

ESI.API.version()
# => "0.7.5"

API functions are available in modules under ESI.API. The module grouping is close to, but not the same as, the ESI site, staying more in-line with the URL used for the specific function.

Note: Module organization may change for the v1.0 release.

Basic Usage

API functions return an ESI.Request.t which can then be processed by passing to ESI.request or ESI.request!:

ESI.API.Insurance.prices()
|> ESI.request
# => {:ok, result}
ESI.API.Insurance.prices()
|> ESI.request!
# => result

Automatic pagination is also supported if you use ESI.stream! instead:

ESI.API.Universe.bloodlines()
|> ESI.stream!
|> Enum.take(3)

Authorization

Currently, pass the :token option for those API functions that use it.

In the future, ESI.request, ESI.request!, and ESI.stream! will support headers passed as arguments and/or loaded from application configuration.

Development

Download ESI's swagger.json to priv/

Then run:

$ rm lib/esi/api.ex lib/esi/api/*.ex
$ mix esi.generate

If you are using Elixir version 1.6.0 or above, format the code that was generated with:

$ mix format

Then:

  • Make sure any new modules/functions look like they're named correctly. If they're not, see the renaming functions in ESI.Generator.Function.
  • Update the README.md with the current ESI Swagger Specification version number in the code example.

Contributing

Issues and PRs welcome via the project repository at https://github.com/bruce/esi.

License

See LICENSE.

Please note this package is not supported or endorsed by Eve Online/CCP Games. It's merely a utility created by an enthusiastic fan.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].