vainglory

package module
v0.0.0-...-d8860e6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

vainglory-go-client

A proof of concept go client for the Vainglory Developer API. Still in progress!

Make sure that Go is installed in your current Path.

For help installing go: https://golang.org/doc/install

For a simple example on how to use the client go to: examples

Contributing

If you have any features you want to be added, feel free to comment in the issues section under the New Features tab.

Find a bug? Create a new issue or make a pull request! Just be sure to specify what the bug is and what changes you have made.

Special Thanks

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(apikey string, q *QueryRequest) *client

NewClient function exported

Types

type Match

type Match struct {
	ID           string                 `json:"id" jsonapi:"primary,match" validate:"required"`
	CreatedAt    time.Time              `json:"createdAt" jsonapi:"attr,createdAt,iso8601" validate:"required"`
	Duration     int64                  `json:"duration" jsonapi:"attr,duration"`
	Rosters      []*Roster              `json:"rosters" jsonapi:"relation,rosters" validate:"required"`
	Stats        map[string]interface{} `json:"stats" jsonapi:"attr,stats" validate:"required"`
	GameMode     string                 `json:"gameMode" jsonapi:"attr,gameMode"`
	PatchVersion string                 `json:"patchVersion" jsonapi:"attr,patchVersion"`
	TitleID      string                 `json:"titleId" jsonapi:"attr,titleId" validate:"required"`
	ShardID      string                 `json:"shardId" jsonapi:"attr,shardId" validate:"required"`
}

Match structure

type Participant

type Participant struct {
	ID     string                 `json:"id" jsonapi:"primary,participant"`
	Player *Player                `json:"player" jsonapi:"relation,player"`
	Stats  map[string]interface{} `json:"stats" jsonapi:"attr,stats"`
	Actor  string                 `json:"actor" jsonapi:"attr,actor"`
}

Participant structure

type Player

type Player struct {
	ID        string                 `json:"id" jsonapi:"primary,player" validate:"required"`
	Name      string                 `json:"name" jsonapi:"attr,name" validate:"required"`
	Stats     map[string]interface{} `json:"stats" jsonapi:"attr,stats"`
	TitleID   string                 `json:"titleId" jsonapi:"attr,titleId" validate:"required"`
	ShardID   string                 `json:"shardId" jsonapi:"attr,shardId" validate:"required"`
	CreatedAt time.Time              `json:"createdAt" jsonapi:"attr,createdAt,iso8601" validate:"required"`
}

Player structure

type QueryRequest

type QueryRequest struct {
	ShardID         string
	Offset          string
	Limit           string
	MatchID         string
	SortField       string
	PlayerNames     string
	TeamNames       string
	CreatedAtStart  string
	CreatedAtEnd    string
	ContentEncoding string
}

QueryRequest exported

type Roster

type Roster struct {
	ID           string                 `json:"id" jsonapi:"primary,roster"`
	Team         *Team                  `json:"group" jsonapi:"relation,group"`
	Participants []*Participant         `json:"participants" jsonapi:"relation,participants"`
	Stats        map[string]interface{} `json:"stats" jsonapi:"attr,stats"`
	Winner       string                 `json:"won"`
}

Roster structure

type Team

type Team struct {
	ID        string                 `json:"id" jsonapi:"primary,team" validate:"required"`
	Name      string                 `json:"name" jsonapi:"attr,name" validate:"required"`
	Stats     map[string]interface{} `json:"stats" jsonapi:"attr,stats"`
	TitleID   string                 `json:"titleId" jsonapi:"attr,titleId" validate:"required"`
	ShardID   string                 `json:"shardId" jsonapi:"attr,shardId" validate:"required"`
	CreatedAt time.Time              `json:"createdAt" jsonapi:"attr,createdAt,iso8601" validate:"required"`
}

Team structure

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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