Giter VIP home page Giter VIP logo

eveapi's Introduction

#eveapi GoDoc

EVE Online API Client

eveapi is a library that provides access to the EVE Online XML API.

This needs more work, ALPHA STATUS. Barely anything is done, API subject to change.

Todo

  • Caching
  • Everything else
  • More things

Usage

Below is an example which shows some of the calls available currently.

package main

import (
    "fmt"
    "log"

    "github.com/flexd/eveapi"
)

func main() {
    key := eveapi.Key{"somekey", "somevcode"}
    charID := "93014296"
    voidCharID := "93947594"
    //api := &eveapi.API{
    //Server:    eveapi.Tranquility,
    //APIKey:    key,
    //UserAgent: "Hello",
    //Debug:     false,
    //}
    api := eveapi.Simple(key)
    serverStatus, err := api.ServerStatus()
    if err != nil {
        log.Fatalln(err)
        return
    }
    fmt.Println("Online:", serverStatus.Open, "Players:", serverStatus.OnlinePlayers)
    characters, err := api.Names2ID("Void Thought,Loryanna,Cypherous,ThisGuyDoesnOtexist")
    if err != nil {
        log.Fatalln(err)
        return
    }
    fmt.Println("Characters:", characters)
    fmt.Println("First char:", characters[0])
    accounts, err := api.CharAccountBalances(charID)
    if err != nil {
        log.Fatalln(err)
        return
    }
    fmt.Println("Current time:", accounts.CurrentTime, "Cached until:", accounts.CachedUntil)
    for _, c := range accounts.Accounts {
        fmt.Println("AccountID:", c.ID, "Key:", c.Key, "Balance:", c.Balance, "ISK")
    }
    skillqueue, err := api.SkillQueue(voidCharID)
    if err != nil {
        log.Fatalln(err)
        return
    }
    fmt.Println(skillqueue.SkillQueue[0])
}

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.