satellite

package
v0.0.0-...-5c5cdd7 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: BSL-1.0 Imports: 8 Imported by: 0

README

satelite

Satelite is a bare-bones client implementation for Daybreak Game Company Census API with additional features supported in PlanetSide 2.

For regular use, the parent moonside package provides a developer-friendly SDK.

Documentation

Index

Constants

View Source
const (
	BaseURL          = "https://census.daybreakgames.com"
	DefaultServiceID = "s:example"
)

Variables

This section is empty.

Functions

func GameData

func GameData[T any](httpDoer internal.HTTPDoer, requestURL url.URL) ([]T, error)

func GameDataURL

func GameDataURL(baseURL url.URL, serviceID string, verb Verb, gameNamespace Namespace, collection, queryString string) (url.URL, error)

func GameImageURL

func GameImageURL(baseURL url.URL, gameNamespace Namespace, imageType, imageID string) (url.URL, error)

Types

type Collection

type Collection struct {
	Name        string   `json:"name"`
	ResolveList []string `json:"resolve_list"`
}

Collection is a dynamic, game-dependent object that can be queried through Census API.

Source: https://census.daybreakgames.com/#collection It is implemented inside Satellite, because it's a game-agnostic structure.

type Namespace

type Namespace string

Namespace identifies the game from which data will be queried.

Source: https://census.daybreakgames.com/#namespace

const (
	// NamespaceEveryQuest2 is namespace for EverQuest II.
	NamespaceEveryQuest2 Namespace = "eq2"
	// NamespacePlanetSide2PCV1 is V1 namespace for PlanetSide 2 (PC version).
	//
	// DEPRECATED: Use NamespacePlanetSide2PCV2 or NamespacePlanetSide2PC instead.
	NamespacePlanetSide2PCV1 Namespace = "ps2:v1"
	// NamespacePlanetSide2PCV2 is V2 namespace for PlanetSide 2 (PC version).
	NamespacePlanetSide2PCV2 Namespace = "ps2:v2"
	// NamespacePlanetSide2PCV1 is namespace for PlanetSide 2 (PC version).
	NamespacePlanetSide2PC Namespace = NamespacePlanetSide2PCV2

	// NamespacePlanetSide2PS4US is namespace for US PlanetSide 2 (Playstation 4).
	NamespacePlanetSide2PS4US Namespace = "ps2ps4us:v2"
	// NamespacePlanetSide2PS4EU is namespace for EU PlanetSide 2 (Playstation 4).
	NamespacePlanetSide2PS4EU Namespace = "ps2ps4eu:v2"

	// NamespaceDCUniverseOnline is namespace for DC Univese Online (PC and Playstation 3).
	NamespaceDCUniverseOnline Namespace = "dcuo:v1"
)

type Pathfinder

type Pathfinder struct {
	BaseURL       url.URL
	ServiceID     string
	GameNamespace Namespace
}

Pathfinder groups API interfaces for a game namespace.

The goal of this structure is to make writing function calls faster.

func DefaultPathfinder

func DefaultPathfinder() *Pathfinder

func (*Pathfinder) GameDataURL

func (s *Pathfinder) GameDataURL(verb Verb, collection, queryString string) (url.URL, error)

func (*Pathfinder) GameImageURL

func (s *Pathfinder) GameImageURL(imageType, imageID string) (url.URL, error)

type Verb

type Verb string

Verb informs the REST interface about the of request that is being made.

Source: http://census.daybreakgames.com/#verb

const (
	// VerbGet retrieves the game data that matches the request criteria.
	VerbGet Verb = "get"
	// VerbCount retrieve the number of game data objects that match the request criteria.
	VerbCount Verb = "count"
)

Directories

Path Synopsis
Package internal is used to reduce package surface.
Package internal is used to reduce package surface.

Jump to

Keyboard shortcuts

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