edsm

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EndpointEDSM = "https://www.edsm.net/"

	EndpointStatus = EndpointEDSM + "api-status-v1/elite-server"

	EndpointAPI = EndpointEDSM + "api-v1/"

	EndpointSystem        = EndpointAPI + "system"
	EndpointSystems       = EndpointAPI + "systems"
	EndpointDistances     = EndpointAPI + "distances"
	EndpointSphereSystems = EndpointAPI + "sphere-systems"

	EndpointSubmitDistances = EndpointAPI + "submit-distances"
)

Known endpoints for EDSM

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	Debug bool
}

APIClient EDSM api client.

func NewAPIClient

func NewAPIClient(debug bool) APIClient

NewAPIClient created an instance of APIClient debug: tells APIClient if it should be running in debug mode.

func (*APIClient) GetSphereSystems

func (client *APIClient) GetSphereSystems(systemName string, radius float64) (systems []System, err error)

GetSphereSystems gets all the systems within a specified radius of the system provided. systemName: the name of the system to use as original. radius: float64 radius of the search.

func (*APIClient) GetSystem

func (client *APIClient) GetSystem(systemName string) (system System, err error)

GetSystem gets the the specified system information. systemName: the name of the system to fetch

type Coordinates

type Coordinates struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
	Z float64 `json:"z"`
}

Coordinates Simple representation of a coord object as detailed by edsm

type Plugin

type Plugin struct {
	bot.Plugin
	// contains filtered or unexported fields
}

Plugin EDSM plugin instance for qilbot.

func NewPlugin

func NewPlugin(qilbot *bot.Qilbot) (plugin *Plugin)

NewPlugin creates a new instance of EDSMPlugin.

type System

type System struct {
	ID     string       `json:"id"`
	Name   string       `json:"name"`
	Coords *Coordinates `json:"coords"`
}

System Simple representation of a system object as detailed by edsm

Jump to

Keyboard shortcuts

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