api

package
v0.0.0-...-fd823a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HOST       = "https://api.eveonline.com"
	TREE       = "/eve/SkillTree.xml.aspx"
	CHARACTERS = "/account/Characters.xml.aspx"
	QUEUE      = "/char/SkillQueue.xml.aspx"
	KILLS      = "/char/KillLog.xml.aspx"
)

Variables

This section is empty.

Functions

func Parse

func Parse(raw []byte, model Model) error

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func New

func New(vcode string, keyid string) API

func (API) Characters

func (api API) Characters() ([]Character, error)

func (API) KillLog

func (api API) KillLog(character *Character) (kills Kills, err error)

func (*API) Queue

func (api *API) Queue(character *Character) (queue SkillQueue, err error)

func (*API) Request

func (api *API) Request(urlPrefix string, values url.Values, model Model) (err error)

func (*API) SkillTree

func (api *API) SkillTree() (tree Tree, err error)

type APIError

type APIError struct {
	Code string `xml:"code,attr"`
	Msg  string `xml:",chardata"`
}

type APIFace

type APIFace interface {
	Characters() ([]Character, error)
	KillLog(*Character) (Kills, error)
}

type Character

type Character struct {
	Name            string `xml:"name,attr"`
	CharacterID     string `xml:"characterID,attr"`
	CorporationName string `xml:"corporationName,attr"`
}

func (Character) FormKey

func (c Character) FormKey() bson.M

type Characters

type Characters struct {
	EVEAPI
	Character []Character `xml:"result>rowset>row"`
}

type EVEAPI

type EVEAPI struct {
	XMLName xml.Name `xml:"eveapi"`
	Time    string   `xml:"currentTime"`
	Error   APIError `xml:"error"`
}

func (EVEAPI) GetError

func (c EVEAPI) GetError() APIError

type Group

type Group struct {
	Name  string       `xml:"groupName,attr"`
	Skill []GroupSkill `xml:"rowset>row"`
}

type GroupSkill

type GroupSkill struct {
	Name string `xml:"typeName,attr"`
}

type Kill

type Kill struct {
	KillID string `xml:"killID,attr"`
	Victim Victim `xml:"victim"`
}

func (Kill) FormKey

func (c Kill) FormKey() bson.M

type Kills

type Kills struct {
	EVEAPI
	ModelStore
	Kills []Kill `xml:"result>rowset>row"`
}

func (Kills) Items

func (k Kills) Items() []WithKey

type Model

type Model interface {
	GetError() APIError
}

type ModelStore

type ModelStore struct {
	Kills []WithKey
}

type Skill

type Skill struct {
	TypeID int `xml:"typeID,attr"`
}

type SkillQueue

type SkillQueue struct {
	EVEAPI
	CharacterID string
	Skill       []Skill `xml:"result>rowset>row"`
}

func (SkillQueue) FormKey

func (c SkillQueue) FormKey() bson.M

type Tree

type Tree struct {
	EVEAPI
	Group []Group `xml:"result>rowset>row"`
}

type Victim

type Victim struct {
	Name            string `xml:"characterName,attr"`
	CharacterID     string `xml:"characterID,attr"`
	CorporationID   string `xml:"corporationID,attr"`
	CorporationName string `xml:"corporationName,attr"`
}

type WithItems

type WithItems interface {
	Items() []WithKey
}

type WithKey

type WithKey interface {
	FormKey() bson.M
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL