ESI SDK is a Ruby API client for the EVE Swagger Interface (ESI), the official API for the EVE Online MMORPG.
Add this line to your application's Gemfile
:
gem 'esi-sdk'
And then execute:
bundle install
Or install it yourself with:
gem install esi-sdk
Create an instance of ESI::Client
with your own User-Agent
:
require 'esi-sdk'
client = ESI::Client.new(user_agent: 'My ESI Bot/1.0; +(https://example.com)')
Call an ESI endpoint:
response = client.get_character(character_id: 2113024536)
{
"alliance_id" => 99003214,
"ancestry_id" => 37,
"birthday" => "2017-07-20T16:28:17Z",
"bloodline_id" => 13,
"corporation_id" => 98169165,
"description" => "",
"gender" => "male",
"name" => "Bokobo Shahni",
"race_id" => 4,
"security_status" => 0.7826388230000001
}
See the documentation for ESI::Client for detailed information on each endpoint.
Caching is handled via the faraday-http-cache middleware. When instantiating an ESI::Client
instance, cache configuration can be passed via the cache
parameter:
client = ESI::Client.new(
user_agent: 'My ESI Bot/1.0; +(https://example.com)',
cache: { store: Rails.cache, logger: Rails.logger, instrumenter: ActiveSupport::Notifications }
)
See the faraday-http-cache documentation for more details on what configuration options are available.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/bokoboshahni/esi-sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
Everyone interacting in the ESI SDK's project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Copyright © 2020 Bokobo Shahni shahni@bokobo.space
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This software is developed in accordance with the CCP hf. Developer License Agreement.
CCP Tools and Game Data as defined by the CCP hf. Developer License Agreement © is 2014 CCP hf. All rights reserved.
"EVE", "EVE Online", "CCP", and all related logos and images are trademarks or registered trademarks of CCP hf.