eveapi

package module
v0.0.0-...-62bdd91 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2017 License: MIT Imports: 19 Imported by: 0

README

Decommissioned. Use this instead: https://github.com/antihax/goesi

Documentation

Overview

Package eveapi impliments a rate limited CREST and XML api client for EVE's public and private APIs.

Caching

Caching is not implimented by the client and thus it is required to utilize a caching http client. It is highly recommended to utilize a client capable of caching the entire cluster of API clients.

An example using gregjones/httpcache and memcache:

import (
	"github.com/bradfitz/gomemcache/memcache"
	"github.com/gregjones/httpcache"
	httpmemcache "github.com/gregjones/httpcache/memcache"
)

func main() {
	// Connect to the memcache server
	cache := memcache.New(MemcachedAddresses...)

	// Create a memcached http client for the CCP APIs.
	transport := httpcache.NewTransport(httpmemcache.NewWithClient(cache))
	transport.Transport = &http.Transport{Proxy: http.ProxyFromEnvironment}
	client = &http.Client{Transport: transport}

	// Get our EVE API.
	eve := eveapi.NewEVEAPIClient(client)
}

Rate Limiting

The rate limits are per client. If more than one anonymous client per public IP address is running, it will be required of the developer to impliment their own rate limits on the affected cluster.

Anonymous Client and Public Endpoints

All public endpoints are available through a simple anonymous client. It is recommended to use this for all public calls due to the higher rate limits.

Anonymous clients are created simply by supplying a caching HTTP Client.

eve := eveapi.NewEVEAPIClient(client)

Private Clients

Private clients are generated through an SSO Authenticator and Tokens (both Access and Refresh).

They require the application clientID, secretKey, and redirect URL. These must match exactly to what was provided to CCP on the Manage Applications page.

scopes := []string{eveapi.ScopeCharacterContactsRead,
	eveapi.ScopeCharacterContactsWrite}

tokenAuthenticator = eveapi.NewSSOAuthenticator(httpClient, clientID, secretKey, redirectURL, scopes)

privateClient := tokenAuthenticator.GetClientFromToken(client, token)

One authenticator can spawn as many clients as needed at once, each with their own tokens.

SSO

Obtaining tokens for client requires two HTTP handlers. One to generate and redirect to the SSO URL, and one to receive the response.

It is manditory to create a random state and compare this state on return to prevent token injection attacks on the application.

In the example custom httpHandlers below, SSOAuthenticator, is a created by NewSSOAuthenticator, with scopes.

func eveSSO(c *appContext.AppContext, w http.ResponseWriter, r *http.Request,
	s *sessions.Session) (int, error) {

	// Generate a random state string
	b := make([]byte, 16)
	rand.Read(b)
	state := base64.URLEncoding.EncodeToString(b)

	// Save the state on the session
	s.Values["state"] = state
	err := s.Save(r, w)
	if err != nil {
		return http.StatusInternalServerError, err
	}

	// Generate the SSO URL with the state string
	url := c.SSOAuthenticator.AuthorizeURL(state, true)

	// Send the user to the URL
	http.Redirect(w, r, url, 302)
	return http.StatusMovedPermanently, nil
}

func eveSSOAnswer(c *appContext.AppContext, w http.ResponseWriter, r *http.Request,
	s *sessions.Session) (int, error) {

	// get our code and state
	code := r.FormValue("code")
	state := r.FormValue("state")

	// Verify the state matches our randomly generated string from earlier.
	if s.Values["state"] != state {
		return http.StatusInternalServerError, errors.New("Invalid State.")
	}

	// Exchange the code for an Access and Refresh token.
	token, err := c.SSOAuthenticator.TokenExchange(code)
	if err != nil {
		return http.StatusInternalServerError, err
	}

	// Obtain a token source (automaticlly pulls refresh as needed)
	tokSrc, err := c.SSOAuthenticator.TokenSource(tok)
	if err != nil {
		return http.StatusInternalServerError, err
	}

	// Assign an auth context to the calls
	auth := context.WithValue(context.TODO(), esi.ContextOAuth2, tokSrc.Token)

	// Verify the client (returns clientID)
	v, err := c.EVE.Verify(auth)
	if err != nil {
		return http.StatusInternalServerError, err
	}

	if err != nil {
		return http.StatusInternalServerError, err
	}

	// Save the verification structure on the session for quick access.
	s.Values["character"] = v
	err = s.Save(r, w)
	if err != nil {
		return http.StatusInternalServerError, err
	}

	// Redirect to the account page.
	http.Redirect(w, r, "/account", 302)
	return http.StatusMovedPermanently, nil
}

Index

Constants

View Source
const (
	BASE_API_VERSION = "application/vnd.ccp.eve.Api-v5"
	BASE_MEDIA_TYPE  = "application/json"
	USER_AGENT       = "https://github.com/antihax/eveapi"
)
View Source
const (
	ScopeCharacterAccountRead            = "characterAccountRead"
	ScopeCharacterAssetsRead             = "characterAssetsRead"
	ScopeCharacterBookmarksRead          = "characterBookmarksRead"
	ScopeCharacterCalendarRead           = "characterCalendarRead"
	ScopeCharacterChatChannelsRead       = "characterChatChannelsRead"
	ScopeCharacterClonesRead             = "characterClonesRead"
	ScopeCharacterContactsRead           = "characterContactsRead"
	ScopeCharacterContactsWrite          = "characterContactsWrite"
	ScopeCharacterContractsRead          = "characterContractsRead"
	ScopeCharacterFactionalWarfareRead   = "characterFactionalWarfareRead"
	ScopeCharacterFittingsRead           = "characterFittingsRead"
	ScopeCharacterFittingsWrite          = "characterFittingsWrite"
	ScopeCharacterIndustryJobsRead       = "characterIndustryJobsRead"
	ScopeCharacterKillsRead              = "characterKillsRead"
	ScopeCharacterLocationRead           = "characterLocationRead"
	ScopeCharacterLoyaltyPointsRead      = "characterLoyaltyPointsRead"
	ScopeCharacterMailRead               = "characterMailRead"
	ScopeCharacterMarketOrdersRead       = "characterMarketOrdersRead"
	ScopeCharacterMedalsRead             = "characterMedalsRead"
	ScopeCharacterNavigationWrite        = "characterNavigationWrite"
	ScopeCharacterNotificationsRead      = "characterNotificationsRead"
	ScopeCharacterOpportunitiesRead      = "characterOpportunitiesRead"
	ScopeCharacterResearchRead           = "characterResearchRead"
	ScopeCharacterSkillsRead             = "characterSkillsRead"
	ScopeCharacterStatsRead              = "characterStatsRead"
	ScopeCharacterWalletRead             = "characterWalletRead"
	ScopeCorporationAssetsRead           = "corporationAssetsRead"
	ScopeCorporationBookmarksRead        = "corporationBookmarksRead"
	ScopeCorporationContactsRead         = "corporationContactsRead"
	ScopeCorporationContractsRead        = "corporationContractsRead"
	ScopeCorporationFactionalWarfareRead = "corporationFactionalWarfareRead"
	ScopeCorporationIndustryJobsRead     = "corporationIndustryJobsRead"
	ScopeCorporationKillsRead            = "corporationKillsRead"
	ScopeCorporationMarketOrdersRead     = "corporationMarketOrdersRead"
	ScopeCorporationMedalsRead           = "corporationMedalsRead"
	ScopeCorporationMembersRead          = "corporationMembersRead"
	ScopeCorporationShareholdersRead     = "corporationShareholdersRead"
	ScopeCorporationStructuresRead       = "corporationStructuresRead"
	ScopeCorporationWalletRead           = "corporationWalletRead"
	ScopeFleetRead                       = "fleetRead"
	ScopeFleetWrite                      = "fleetWrite"
	ScopeRemoteClientUI                  = "remoteClientUI"
	ScopeStructureVulnUpdate             = "structureVulnUpdate"
)

Variables

View Source
var ContextOAuth2 contextOAuth2Key

Functions

func GenerateKillMailHash

func GenerateKillMailHash(victimID int64, attackerID int64, shipTypeID int64, killTime time.Time) string

Generate the killmail hash using source information.

func TokenToJSON

func TokenToJSON(token *CRESTToken) (string, error)

TokenToJSON helper function to convert a token to a storable format.

Types

type AllianceV1

type AllianceV1 struct {
	*EVEAPIClient

	StartDate           EVETime
	CorporationsCount   int64
	Description         string
	ExecutorCorporation entityReference
	CreatorCorporation  entityReference
	URL                 string
	ID                  int64
	Name                string
	ShortName           string
	Deleted             bool
	CreatorCharacter    characterReference
	Corporations        []entityReference
	// contains filtered or unexported fields
}

type AlliancesCollectionV2

type AlliancesCollectionV2 struct {
	*EVEAPIClient

	Items []struct {
		ShortName string
		HRef      string
		ID        int64
		Name      string
	}
	// contains filtered or unexported fields
}

func (*AlliancesCollectionV2) NextPage

type CRESTToken

type CRESTToken oauth2.Token

Redirect type to hide oauth2 API

func TokenFromJSON

func TokenFromJSON(jsonStr string) (*CRESTToken, error)

TokenFromJSON helper function to convert stored JSON to a token.

type CRESTTokenSource

type CRESTTokenSource oauth2.TokenSource

type CharacterInfoXML

type CharacterInfoXML struct {
	CharacterID   int64  `xml:"result>characterID"`
	CharacterName string `xml:"result>characterName"`

	BloodlineID   int64  `xml:"result>bloodlineID"`
	BloodlineName string `xml:"result>bloodline"`

	AncestryID   int64  `xml:"result>ancestryID"`
	AncestryName string `xml:"result>ancestry"`

	CorporationID   int64  `xml:"result>corporationID"`
	CorporationName string `xml:"result>corporation"`

	AllianceID   int64  `xml:"result>allianceID"`
	AllianceName string `xml:"result>alliance"`

	Race string `xml:"result>race"`

	SecurityStatus float64 `xml:"result>securityStatus"`

	EmploymentHistory []struct {
		RecordID        int64      `xml:"recordID,attr"`
		CorporationID   int64      `xml:"corporationID,attr"`
		CorporationName string     `xml:"corporationName,attr"`
		StartDate       EVEXMLTime `xml:"startDate,attr"`
	} `xml:"result>rowset>row"`
	// contains filtered or unexported fields
}

CharacterInfo returned data from XML API

type CharacterV4

type CharacterV4 struct {
	*EVEAPIClient

	Race        idHref
	BloodLine   idHref
	Name        string
	Description string
	Gender      int64
	Corporation entityReference

	Fittings      simpleHref
	Contacts      simpleHref
	Opportunities simpleHref
	Location      simpleHref
	LoyaltyPoints simpleHref

	UI struct {
		SetWaypoints      simpleHref
		ShowContract      simpleHref
		ShowOwnerDetails  simpleHref
		ShowMarketDetails simpleHref
		ShowNewMailWindow simpleHref
	}

	Portrait imageList
	// contains filtered or unexported fields
}

type ConquerableStationsXML

type ConquerableStationsXML struct {
	Stations []struct {
		StationID     int64  `xml:"stationID,attr"`
		StationName   string `xml:"stationName,attr"`
		StationTypeID int64  `xml:"stationTypeID,attr"`
		SolarSystemID int64  `xml:"solarSystemID,attr"`
		CorporationID int64  `xml:"corporationID,attr"`
	} `xml:"result>rowset>row"`
	// contains filtered or unexported fields
}

CharacterInfo returned data from XML API

type CorporationSheetXML

type CorporationSheetXML struct {
	CorporationID   int64  `xml:"result>corporationID"`
	CorporationName string `xml:"result>corporationName"`
	Ticker          string `xml:"result>ricker"`
	CEOID           int64  `xml:"result>ceoID"`
	CEOName         string `xml:"result>ceoName"`
	StationID       int64  `xml:"result>stationID"`
	StationName     string `xml:"result>stationName"`
	Description     string `xml:"result>description"`
	AllianceID      int64  `xml:"result>allianceID"`
	AllianceName    string `xml:"result>allianceName"`
	FactionID       int64  `xml:"result>factionID"`
	URL             string `xml:"result>url"`
	MemberCount     int64  `xml:"result>memberCount"`
	Shares          int64  `xml:"result>shares"`
		GraphicID int64 `xml:"grapicID,attr"`
		Shape1    int64 `xml:"shape1,attr"`
		Shape2    int64 `xml:"shape2,attr"`
		Shape3    int64 `xml:"shape3,attr"`
		Color1    int64 `xml:"color1,attr"`
		Color2    int64 `xml:"color2,attr"`
		Color3    int64 `xml:"color3,attr"`
	} `xml:"result>logo"`
	// contains filtered or unexported fields
}

CharacterInfo returned data from XML API

type EVEAPIClient

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

EVEAPIClient for Public CREST and Public XML API queries.

func NewEVEAPIClient

func NewEVEAPIClient(client *http.Client) *EVEAPIClient

EVEAPIClient generates a new anonymous client. Caller must provide a caching http.Client that obeys all cacheUntil timers One Anonymous client per IP address or rate limits will be exceeded resulting in a ban.

func (*EVEAPIClient) Alliance

func (c *EVEAPIClient) Alliance(href string) (*AllianceV1, error)

func (*EVEAPIClient) AllianceByID

func (c *EVEAPIClient) AllianceByID(id int64) (*AllianceV1, error)

func (*EVEAPIClient) AlliancesV2

func (c *EVEAPIClient) AlliancesV2(page int) (*AlliancesCollectionV2, error)

func (*EVEAPIClient) CharacterInfoXML

func (c *EVEAPIClient) CharacterInfoXML(characterID int64) (*CharacterInfoXML, error)

GetCharacterInfo queries the XML API for a given characterID.

func (*EVEAPIClient) CharacterV4

func (c *EVEAPIClient) CharacterV4(href string) (*CharacterV4, error)

func (*EVEAPIClient) CharacterV4ByID

func (c *EVEAPIClient) CharacterV4ByID(id int64) (*CharacterV4, error)

func (*EVEAPIClient) CharacterWalletJournalXML

func (c *EVEAPIClient) CharacterWalletJournalXML(auth oauth2.TokenSource, characterID int64, fromID int64) (*WalletJournalXML, error)

GetCharacterInfo queries the XML API for a given characterID.

func (*EVEAPIClient) CharacterWalletTransactionXML

func (c *EVEAPIClient) CharacterWalletTransactionXML(auth oauth2.TokenSource, characterID int64, fromID int64) (*WalletTransactionXML, error)

GetCharacterInfo queries the XML API for a given characterID.

func (*EVEAPIClient) ConquerableStationsListXML

func (c *EVEAPIClient) ConquerableStationsListXML() (*ConquerableStationsXML, error)

GetCharacterInfo queries the XML API for a given characterID.

func (*EVEAPIClient) CorporationPublicSheetXML

func (c *EVEAPIClient) CorporationPublicSheetXML(corporationID int64) (*CorporationSheetXML, error)

GetCharacterInfo queries the XML API for a given characterID.

func (*EVEAPIClient) GetCRESTURI

func (c *EVEAPIClient) GetCRESTURI() string

func (*EVEAPIClient) GetImageURI

func (c *EVEAPIClient) GetImageURI() string

func (*EVEAPIClient) GetLoginURI

func (c *EVEAPIClient) GetLoginURI() string

func (*EVEAPIClient) GetManagementURI

func (c *EVEAPIClient) GetManagementURI() string

func (*EVEAPIClient) GetXMLURI

func (c *EVEAPIClient) GetXMLURI() string

func (*EVEAPIClient) LoyaltyPointStoreV1

func (c *EVEAPIClient) LoyaltyPointStoreV1(url string) (*LoyaltyStoreOffersCollectionV1, error)

func (*EVEAPIClient) LoyaltyPointStoreV1ByID

func (c *EVEAPIClient) LoyaltyPointStoreV1ByID(corporationID int64) (*LoyaltyStoreOffersCollectionV1, error)

func (*EVEAPIClient) MarketOrdersSlimV1

func (c *EVEAPIClient) MarketOrdersSlimV1(url string) (*MarketOrderCollectionSlimV1, error)

func (*EVEAPIClient) MarketOrdersSlimV1ByID

func (c *EVEAPIClient) MarketOrdersSlimV1ByID(regionID int64, page int) (*MarketOrderCollectionSlimV1, error)

func (*EVEAPIClient) MarketTypeHistory

func (c *EVEAPIClient) MarketTypeHistory(url string) (*MarketTypeHistoryCollectionV1, error)

func (*EVEAPIClient) MarketTypeHistoryV1ByID

func (c *EVEAPIClient) MarketTypeHistoryV1ByID(regionID int64, typeID int64) (*MarketTypeHistoryCollectionV1, error)

func (*EVEAPIClient) NPCCorporationsV1

func (c *EVEAPIClient) NPCCorporationsV1(page int64) (*NPCCorporationsCollectionV1, error)

func (*EVEAPIClient) RefTypesXML

func (c *EVEAPIClient) RefTypesXML() (*RefTypeXML, error)

GetCharacterInfo queries the XML API for a given characterID.

func (*EVEAPIClient) SetUA

func (c *EVEAPIClient) SetUA(userAgent string)

SetUI set the user agent string of the CREST and XML client. It is recommended to change this so that CCP can identify your app.

func (*EVEAPIClient) UseCustomURL

func (c *EVEAPIClient) UseCustomURL(custom EveURI)

UseCustomURL allows the base URLs to be changed should the need arise for a third party proxy to be used.

func (*EVEAPIClient) UseTestServer

func (c *EVEAPIClient) UseTestServer(testServer bool)

UseTestServer forces this client to use the test server URLs.

func (*EVEAPIClient) Verify

func (c *EVEAPIClient) Verify(auth oauth2.TokenSource) (*VerifyResponse, error)

Verify the client and collect user information.

func (*EVEAPIClient) WarByID

func (c *EVEAPIClient) WarByID(id int) (*WarV1, error)

func (*EVEAPIClient) WarV1

func (c *EVEAPIClient) WarV1(href string) (*WarV1, error)

func (*EVEAPIClient) WarsV1

func (c *EVEAPIClient) WarsV1(page int) (*WarsCollectionV1, error)

type EVEKillmailTime

type EVEKillmailTime struct {
	time.Time
}

func (*EVEKillmailTime) UnmarshalJSON

func (c *EVEKillmailTime) UnmarshalJSON(b []byte) (err error)

func (*EVEKillmailTime) UnmarshalXML

func (c *EVEKillmailTime) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

func (*EVEKillmailTime) UnmarshalXMLAttr

func (c *EVEKillmailTime) UnmarshalXMLAttr(a xml.Attr) (err error)

type EVETime

type EVETime struct {
	time.Time
}

func (*EVETime) UnmarshalJSON

func (c *EVETime) UnmarshalJSON(b []byte) (err error)

func (*EVETime) UnmarshalXML

func (c *EVETime) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

func (*EVETime) UnmarshalXMLAttr

func (c *EVETime) UnmarshalXMLAttr(a xml.Attr) (err error)

type EVEXMLTime

type EVEXMLTime struct {
	time.Time
}

func (*EVEXMLTime) UnmarshalJSON

func (c *EVEXMLTime) UnmarshalJSON(b []byte) (err error)

func (*EVEXMLTime) UnmarshalXML

func (c *EVEXMLTime) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

func (*EVEXMLTime) UnmarshalXMLAttr

func (c *EVEXMLTime) UnmarshalXMLAttr(a xml.Attr) (err error)

type ErrorMessage

type ErrorMessage struct {
	Message string
}

ErrorMessage format if a CREST query fails.

type EveURI

type EveURI struct {
	AppManagement string
	CREST         string
	Images        string
	Login         string
	XML           string
}

type LoyaltyStoreOffersCollectionV1

type LoyaltyStoreOffersCollectionV1 struct {
	*EVEAPIClient

	Items []struct {
		ID            int64
		AkCost        int64
		IskCost       int64
		LpCost        int64
		Quantity      int64
		Item          itemReference
		RequiredItems []struct {
			Item     itemReference
			Quantity int64
		}
	}
	// contains filtered or unexported fields
}

func (*LoyaltyStoreOffersCollectionV1) NextPage

func (*LoyaltyStoreOffersCollectionV1) PreviousPage

type MarketOrderCollectionSlimV1

type MarketOrderCollectionSlimV1 struct {
	*EVEAPIClient

	Items []struct {
		Buy           bool
		Issued        EVETime
		Price         float64
		VolumeEntered int64
		MinVolume     int64
		Volume        int64
		Range         string
		Duration      int64
		ID            int64
		Type          int64
		StationID     int64
	}

	RegionID int64 // We wil back fill this for convienence.
	// contains filtered or unexported fields
}

func (*MarketOrderCollectionSlimV1) NextPage

func (*MarketOrderCollectionSlimV1) PreviousPage

type MarketTypeHistoryCollectionV1

type MarketTypeHistoryCollectionV1 struct {
	*EVEAPIClient

	Items []struct {
		OrderCount int64
		LowPrice   float64
		HighPrice  float64
		AvgPrice   float64
		Volume     int64
		Date       string
	}

	RegionID int64 // We wil back fill this for convienence.
	TypeID   int64 // We wil back fill this for convienence.
	// contains filtered or unexported fields
}

func (*MarketTypeHistoryCollectionV1) NextPage

func (*MarketTypeHistoryCollectionV1) PreviousPage

type NPCCorporationsCollectionV1

type NPCCorporationsCollectionV1 struct {
	*EVEAPIClient

	Items []struct {
		Description  string
		Headquarters itemReference
		LoyaltyStore struct {
			Href string
		}
		Ticker string
		// contains filtered or unexported fields
	}
	// contains filtered or unexported fields
}

func (*NPCCorporationsCollectionV1) NextPage

func (*NPCCorporationsCollectionV1) PreviousPage

type RefTypeXML

type RefTypeXML struct {
	RefTypes []struct {
		RefTypeName string `xml:"refTypeName,attr"`
		RefTypeID   int64  `xml:"refTypeID,attr"`
	} `xml:"result>rowset>row"`
	// contains filtered or unexported fields
}

type SSOAuthenticator

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

[TODO] lose this mutex and allow scopes to change without conflict.

func NewSSOAuthenticator

func NewSSOAuthenticator(client *http.Client, clientID string, clientSecret string, redirectURL string, scopes []string) *SSOAuthenticator

NewSSOAuthenticator create a new CREST SSO Authenticator. Requires your application clientID, clientSecret, and redirectURL. RedirectURL must match exactly to what you registered with CCP.

func (*SSOAuthenticator) AuthorizeURL

func (c *SSOAuthenticator) AuthorizeURL(state string, onlineAccess bool, scopes []string) string

AuthorizeURL returns a url for an end user to authenticate with EVE SSO and return success to the redirectURL. It is important to create a significatly unique state for this request and verify the state matches when returned to the redirectURL.

func (*SSOAuthenticator) TokenExchange

func (c *SSOAuthenticator) TokenExchange(code string) (*CRESTToken, error)

TokenExchange exchanges the code returned to the redirectURL with the CREST server to an access token. A caching client must be passed. This client MUST cache per CCP guidelines or face banning.

func (*SSOAuthenticator) TokenSource

func (c *SSOAuthenticator) TokenSource(token *CRESTToken) (CRESTTokenSource, error)

TokenSource creates a refreshable token that can be passed to ESI functions

type VerifyResponse

type VerifyResponse struct {
	CharacterID        int64
	CharacterName      string
	ExpiresOn          string
	Scopes             string
	TokenType          string
	CharacterOwnerHash string
}

type WalletJournalXML

type WalletJournalXML struct {
	Entries []struct {
		RefID         int64      `xml:"refID,attr"`
		RefTypeID     int64      `xml:"refTypeID,attr"`
		OwnerName1    string     `xml:"ownerName1,attr"`
		OwnerID1      int64      `xml:"ownerID1,attr"`
		OwnerName2    string     `xml:"ownerName2,attr"`
		OwnerID2      int64      `xml:"ownerID2,attr"`
		ArgName1      string     `xml:"argName1,attr"`
		ArgID1        int64      `xml:"argID1,attr"`
		Amount        float64    `xml:"amount,attr"`
		Balance       float64    `xml:"balance,attr"`
		Reason        string     `xml:"reason,attr"`
		TaxReceiverID int64      `xml:"taxReceiverID,attr"`
		TaxAmount     float64    `xml:"taxAmount,attr"`
		Date          EVEXMLTime `xml:"date,attr"`
	} `xml:"result>rowset>row"`
	// contains filtered or unexported fields
}

type WalletTransactionXML

type WalletTransactionXML struct {
	Entries []struct {
		TransactionDateTime  EVEXMLTime `xml:"transactionDateTime,attr"`
		TransactionID        int64      `xml:"transactionID,attr"`
		Quantity             int64      `xml:"quantity,attr"`
		TypeName             string     `xml:"typeName,attr"`
		TypeID               int64      `xml:"typeID,attr"`
		Price                float64    `xml:"price,attr"`
		ClientID             int64      `xml:"clientID,attr"`
		ClientTypeID         int64      `xml:"clientTypeID,attr"`
		ClientName           string     `xml:"clientName,attr"`
		CharacterID          int64      `xml:"characterID,attr"`
		CharacterName        string     `xml:"characterName,attr"`
		StationID            int64      `xml:"stationID,attr"`
		StationName          string     `xml:"stationName,attr"`
		TransactionType      string     `xml:"transactionType,attr"`
		TransactionFor       string     `xml:"transactionFor,attr"`
		JournalTransactionID int64      `xml:"journalTransactionID,attr"`
	} `xml:"result>rowset>row"`
	// contains filtered or unexported fields
}

type WarKillmailsV1

type WarKillmailsV1 struct {
	*EVEAPIClient

	Items []struct {
		HRef string
		ID   int
	}
	// contains filtered or unexported fields
}

type WarV1

type WarV1 struct {
	*EVEAPIClient

	TimeFinished  EVETime
	OpenForAllies bool
	TimeStarted   EVETime
	AllyCount     int
	TimeDeclared  EVETime

	Allies []struct {
		HRef string
		ID   int64
		Icon struct {
			HRef string
		}
		Name string
	}
	Aggressor struct {
		ShipsKilled int

		Name string
		HRef string

		Icon struct {
			HRef string
		}
		ID        int64
		IskKilled float64
	}
	Mutual bool

	Killmails string

	Defender struct {
		ShipsKilled int

		Name string
		HRef string

		Icon struct {
			HRef string
		}
		ID        int64
		IskKilled float64
	}
	ID int64
	// contains filtered or unexported fields
}

func (*WarV1) KillmailsV1

func (c *WarV1) KillmailsV1() (*WarKillmailsV1, error)

GetKillmails provides a list of killmails associated to this war.

type WarsCollectionV1

type WarsCollectionV1 struct {
	*EVEAPIClient

	Items []struct {
		HRef string
		ID   int
	}
	// contains filtered or unexported fields
}

func (*WarsCollectionV1) NextPage

func (c *WarsCollectionV1) NextPage() (*WarsCollectionV1, error)

type XMLAPIKey

type XMLAPIKey struct {
	VCode string
	KeyID int64
}

XMLAPIKey holds an API key for the XML API.

func (*XMLAPIKey) IsValidVCode

func (c *XMLAPIKey) IsValidVCode() bool

IsValidVCode validates a vCode for the XML API meets basic requirements

Jump to

Keyboard shortcuts

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