GithubHelp home page GithubHelp logo

lisa / reve Goto Github PK

View Code? Open in Web Editor NEW
40.0 8.0 21.0 413 KB

Reve is a Ruby-based library for use with interfacing with the Eve Online API.

Home Page: http://github.com/lisa/reve

License: MIT License

Ruby 100.00%

reve's Introduction

Reve

Build Status

Reve is a library for the Eve Online API written in Ruby.

Status of the Library

On May 8th, 2018 CCP Games retired the API for which this library was created. There may still be open pull requests and issues for this project due to a focus of the maintaner's time elsewhere (apologies for that, truly), but it is time to finally retire this project for good. There are no plans to migrate this codebase to the new API. Thank you to everyone that has used and contributed to the library over the years. - @lisa, original library creator and maintainer.

Examples

The following are examples using the library.

Convert player names to character IDs

require 'reve'
require 'pp'

api = Reve::API.new

ids = api.character_id( { :names => [ "CCP Garthagk" ] } )
puts 'Names to IDs output:'
pp names

# Prints:
names to IDs output
[#<Reve::Classes::Character:0x4d98e55c
  @corporation_id=0,
  @corporation_name=nil,
  @id=797400947,
  @name="CCP Garthagk">]

Contributing

Reve is in "maintenance mode." The author, Lisa Seelye, is mostly hands-off and gladly accepts pull requests.

Roadmap

In no specific order, this is a foreward looking list of items to be done for the project.

  • Complete Implemented API Calls List
  • Merge #17
  • Implement missing API calls
  • Reorganize code within the project

Implemented API Calls

Account

Name Method Name
Account Status account_status
API Key Not Implemented
List of Characters characters

Character

Name Method Name
Account Balance personal_wallet_balance
Asset List personal_assets_list
Blueprints Not Implemented
Calendar Event Attendees Not Implemented
Character Sheet character_sheet
Contact List personal_contacts
Contact Notifications Not Implemented
Contracts contracts
Contract Items Not Implemented
Contract Bids Not Implemented
Factional Warfare Stats personal_faction_war_stats
Industry Jobs personal_industry_jobs
Industry Jobs History Not Implemented
Kill Mails personal_kills (deprecated)
Locations Not Implemented
Mail Bodies personal_mail_message_bodies
Mailing Lists personal_mailing_lists
Mail Messages (Headers) personal_mail_messages
Market Orders personal_market_orders
Medals character_medals
Notifications personal_notifications
Notification Texts Not Implemented
Planetary Colonies Not Implemented
Planetary Pins Not Implemented
Planetary Routes Not Implemented
Planetary Links Not Implemented
Research research
Skill in Training skill_in_training
Skill Queue skill_queue
Standings (NPC) Not Implemented
Upcoming Calendar Events upcoming_calendar_events
Wallet Journal personal_wallet_journal
Wallet Transactions personal_wallet_transactions

Corporation

Name Method Name
Account Balances corporate_wallet_balance
Asset List corporate_assets_list
Blueprints Not Implemented
Contact List corporate_contacts
Container Log Not Implemented
Contracts Not Implemented
Contract Items Not Implemented
Contract Bids Not Implemented
Corporation Sheet corporation_sheet
Customs Offices Not Implemented
Facilities Not Implemented
Factional Warfare Stats corporate_faction_war_stats
Industry Jobs corporate_industry_jobs
Industry Jobs History Not Implemented
Kill Mails corporate_kills (deprecated)
Locations Not Implemented
Market Orders corporate_market_orders
Medals corporate_medals
Member Medals corporate_member_medals
Member Security corporate_member_security
Member Security Log Not Implemented
Member Tracking Not Implemented
Outpost List Not Implemented
Outpost Service Detail Not Implemented
Shareholders Not Implemented
Standings (NPC) Not Implemented
Starbase Details (POS) starbase_details
Starbase list (POS) starbases
Titles Not Implemented
Wallet Journal corporate_wallet_journal
Wallet Transactions corporate_wallet_transactions

Eve

Name Method Name
Alliance List alliances
Certificate Tree certificate_tree (deprecated)
Character Affilication Not Implemented
Character ID (name to id) names_to_ids
Character Info character_info
Character Name (id to name) ids_to_names
Conquerable Station List conquerable_stations
Error list errors
Factional Warfare Station faction_war_stats
Factional Warfare Top 100 Stats faction_war_top_stats
RefTypes ref_types
Skill Tree skill_tree
Type Name Not Implemented

Map

Name Method Name
Factional Warfare Systems (Occupancy map) faction_war_system_stats
Jumps map_jumps
Kills map_kills
Sovereignty sovereignty

Server

Name Method Name
Server Status server_status

API

Name Method Name
Call List (access mask ref) Not Implemented

reve's People

Contributors

bestes avatar cnk avatar dsander avatar fmorales avatar jonlives avatar kuroneko avatar lisa avatar torkallon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reve's Issues

Split up classes

Hi,

Someone called ech0came into the #rubyonrails channel on Freenode and asked a question that was regarding your library. In trying to help them debug their issue I came across theclasses.rb` file in your library and was... shocked. For three reasons.

One, and this my favourite thing: You've documented things. You have spent some of your time documenting things! Most people don't do this and it grinds my gears. Thank you thank you thank you for doing this. Awesome work!

Secondly: There is so much code. You had to have spent a lot of time writing and testing all of this. That's another thing: TESTS. There are _actual _real* tests* for this. Amazing.

Thirdy, and more seriously...

Throwing all the classes in the one file is a developmental nightmare in Ruby, for a number of reasons. The first of course being that finding anything in that file becomes hard. Like, I tried finding the Character class (it's here btw) to help our friend, thinking it would be somewhere else.

That somewhere else would be lib/reve/character.rb, and that file would define just the Reve::Character class. A grand total of 15 lines of code.

By doing this, any developer working on this project, or anybody wanting to know how exactly this thing works would be able to go into their Editor of Choice (read: Vim, obviously) and then find the lib/reve/character.rb file to find out how exactly this Reve::Character class works.

Added bonus! Things like this class accessor would go into this class. Like this:

module Reve
  class Character
     def self.url
       "http://api.eve-online.com/account/Characters.xml.aspx"
     end
  end
end

You could go one step further. See that first part of the link? http://api.eve-online.com/. You could move that into the Reve module and reference that everywhere you need to, rather than having it in a million (ok, that's hyperbole, but you get the point!) different places.

Finally, this would also allow you to do things like this in your library, which I think is the coolest part:

lib/reve.rb

module Reve
  autoload :Character, "reve/character"
  ...
end

While this seems innocuous, what it actually allows you to do is really cool. People only need to require 'reve' in their libraries / applications. When they attempt to reference Reve::Character for the first time, it will autoload the file specified, basically doing this:

require 'reve/character'

Next time, it's there and loaded and so it won't be re-required. The benefit of this is that it will only load the classes when needed to, meaning that Reve won't need to load 1000+ lines of code to begin with and will only load the things it needs to load when it needs to load them.

So.

What you can do is this:

  1. Investigate how you can split the classes into separate files. lib/[gem]/[class].rb is the format that all the cool kids are doing. I think we should stay with the cool kids, primarily because they're cool.
  2. Move anything to do with a class into the class itself. Things like this where you're retrieving a list of characters would be better off inside the Character class. That way, people could do Character.all or something like that.
  3. Split your tests out as well. Currently it's all in one huge file. This just leads to better organisation. To add a new feature to the Character class for example, I would have two buffers open in Vim: one for the Character class itself and one for the test. Then I would do my changes. As it is right now, it's very painful to do this.

I believe in your abilities enough to fix this. From what I've seen, you've not written horrible code, it's just unorganised and that's really easily fixed.

Please don't take this as a criticism of your code, it's not. It's just some friendly advice from another Ruby programmer who obsesses probably a bit too much over the organisation of everything. I'm just trying to help.

Congratulations if you've read this far, and good luck!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.