val

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentURL = "/val/content/v1/contents"

	RankedURL = "/val/ranked/v1/leaderboards/by-act/%s"

	StatusURL = "/val/status/v1/platform-data"
)

Riot endpoints

Variables

This section is empty.

Functions

This section is empty.

Types

type ActsDTO

type ActsDTO struct {
	ID             string            `json:"id"`
	ParentID       string            `json:"parentId"`
	Type           string            `json:"type"`
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	IsActive       bool              `json:"isActive"`
}

type AdditionalPropDTO

type AdditionalPropDTO struct {
	RankedRatingThreshold int `json:"rankedRatingThreshold"`
	StartingPage          int `json:"startingPage"`
	StartingIndex         int `json:"startingIndex"`
}

type CeremoniesDTO

type CeremoniesDTO struct {
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID             string            `json:"id"`
	AssetName      string            `json:"assetName"`
}

type CharactersDTO

type CharactersDTO struct {
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID             string            `json:"id"`
	AssetName      string            `json:"assetName"`
}

type CharmLevelsDTO

type CharmLevelsDTO struct {
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID             string            `json:"id"`
	AssetName      string            `json:"assetName"`
}

type CharmsDTO

type CharmsDTO struct {
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID             string            `json:"id"`
	AssetName      string            `json:"assetName"`
}

type ChromasDTO

type ChromasDTO struct {
	Name              string            `json:"name"`
	LocalizedNamesDTO LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID                string            `json:"id"`
	AssetName         string            `json:"assetName"`
}

type ContentDTO

type ContentDTO struct {
	Version      string            `json:"version"`
	Characters   []CharactersDTO   `json:"characters"`
	Maps         []MapsDTO         `json:"maps"`
	Chromas      []ChromasDTO      `json:"chromas"`
	Skins        []SkinsDTO        `json:"skins"`
	SkinLevels   []SkinLevelsDTO   `json:"skinLevels"`
	Equips       []EquipsDTO       `json:"equips"`
	GameModes    []GameModesDTO    `json:"gameModes"`
	Sprays       []SpraysDTO       `json:"sprays"`
	SprayLevels  []SprayLevelsDTO  `json:"sprayLevels"`
	Charms       []CharmsDTO       `json:"charms"`
	CharmLevels  []CharmLevelsDTO  `json:"charmLevels"`
	PlayerCards  []PlayerCardsDTO  `json:"playerCards"`
	PlayerTitles []PlayerTitlesDTO `json:"playerTitles"`
	Acts         []ActsDTO         `json:"acts"`
	Ceremonies   []CeremoniesDTO   `json:"ceremonies"`
}

type ContentEndpoint

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

func (*ContentEndpoint) AllLocales

func (s *ContentEndpoint) AllLocales(region Region) (*ContentDTO, error)

Get content with all available locales.

func (*ContentEndpoint) ByLocale

func (s *ContentEndpoint) ByLocale(region Region, locale Locale) (*LocalizedContentDTO, error)

Get content filtered by locale.

Locale defaults to en-US.

type EquipsDTO

type EquipsDTO struct {
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID             string            `json:"id"`
	AssetName      string            `json:"assetName"`
}

type GameModesDTO

type GameModesDTO struct {
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID             string            `json:"id"`
	AssetName      string            `json:"assetName"`
	AssetPath      string            `json:"assetPath"`
}

type LeaderboardDTO

type LeaderboardDTO struct {
	// The act id for the given leaderboard. Act ids can be found using the val-content API.
	ActID   string       `json:"actId"`
	Players []PlayersDTO `json:"players"`
	// The total number of players in the leaderboard.
	TotalPlayers          int            `json:"totalPlayers"`
	ImmortalStartingPage  int            `json:"immortalStartingPage"`
	ImmortalStartingIndex int            `json:"immortalStartingIndex"`
	TopTierRRThreshold    int            `json:"topTierRRThreshold"`
	TierDetails           TierDetailsDTO `json:"tierDetails"`
	StartIndex            int            `json:"startIndex"`
	Query                 string         `json:"query"`
	// The shard for the given leaderboard.
	Shard Region `json:"shard"`
}

type Locale

type Locale string
const (
	ArabicAE     Locale = "ar-AE"
	GermanDE     Locale = "de-DE"
	EnglishUS    Locale = "en-US"
	SpanishES    Locale = "es-ES"
	SpanishMX    Locale = "es-MX"
	FrenchFR     Locale = "fr-FR"
	IndonesianID Locale = "id-ID"
	ItalianIT    Locale = "it-IT"
	JapaneseJP   Locale = "ja-JP"
	KoreanKR     Locale = "ko-KR"
	PortuguesePL Locale = "pl-PL"
	PortugueseBR Locale = "pt-BR"
	RussianRU    Locale = "RuRU"
	ThaiTH       Locale = "th-TH"
	TurkishTR    Locale = "tr-TR"
	VietnameseVN Locale = "vi-VN"
	ChineseCN    Locale = "zh-CN"
	ChineseTW    Locale = "zh-TW"
)

Valorant regions

type LocalizedContentDTO

type LocalizedContentDTO struct {
	Version    string `json:"version"`
	Characters []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"characters"`
	Maps []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
		AssetPath string `json:"assetPath,omitempty"`
	} `json:"maps"`
	Chromas []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"chromas"`
	Skins []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"skins"`
	SkinLevels []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"skinLevels"`
	Equips []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"equips"`
	GameModes []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
		AssetPath string `json:"assetPath"`
	} `json:"gameModes"`
	Sprays []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"sprays"`
	SprayLevels []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"sprayLevels"`
	Charms []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"charms"`
	CharmLevels []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"charmLevels"`
	PlayerCards []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"playerCards"`
	PlayerTitles []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"playerTitles"`
	Acts []struct {
		ID       string `json:"id"`
		ParentID string `json:"parentId"`
		Type     string `json:"type"`
		Name     string `json:"name"`
		IsActive bool   `json:"isActive"`
	} `json:"acts"`
	Ceremonies []struct {
		Name      string `json:"name"`
		ID        string `json:"id"`
		AssetName string `json:"assetName"`
	} `json:"ceremonies"`
}

type LocalizedNamesDTO

type LocalizedNamesDTO struct {
	ArAE string `json:"ar-AE"`
	DeDE string `json:"de-DE"`
	EnUS string `json:"en-US"`
	EsES string `json:"es-ES"`
	EsMX string `json:"es-MX"`
	FrFR string `json:"fr-FR"`
	IDID string `json:"id-ID"`
	ItIT string `json:"it-IT"`
	JaJP string `json:"ja-JP"`
	KoKR string `json:"ko-KR"`
	PlPL string `json:"pl-PL"`
	PtBR string `json:"pt-BR"`
	RuRU string `json:"ru-RU"`
	ThTH string `json:"th-TH"`
	TrTR string `json:"tr-TR"`
	ViVN string `json:"vi-VN"`
	ZhCN string `json:"zh-CN"`
	ZhTW string `json:"zh-TW"`
}

type MapsDTO

type MapsDTO struct {
	Name              string            `json:"name"`
	LocalizedNamesDTO LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID                string            `json:"id"`
	AssetName         string            `json:"assetName"`
	AssetPath         string            `json:"assetPath,omitempty"`
}

type PlayerCardsDTO

type PlayerCardsDTO struct {
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID             string            `json:"id"`
	AssetName      string            `json:"assetName"`
}

type PlayerTitlesDTO

type PlayerTitlesDTO struct {
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID             string            `json:"id"`
	AssetName      string            `json:"assetName"`
}

type PlayersDTO

type PlayersDTO struct {
	// This field may be omitted if the player has been anonymized.
	PUUID string `json:"puuid"`
	// This field may be omitted if the player has been anonymized.
	GameName string `json:"gameName"`
	// This field may be omitted if the player has been anonymized.
	TagLine         string `json:"tagLine"`
	LeaderboardRank int    `json:"leaderboardRank"`
	RankedRating    int    `json:"rankedRating"`
	NumberOfWins    int    `json:"numberOfWins"`
	CompetitiveTier int    `json:"competitiveTier"`
}

type RankedEndpoint

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

func (*RankedEndpoint) LeaderboardsByActID

func (r *RankedEndpoint) LeaderboardsByActID(region Region, actID string, size uint8, start int) (*LeaderboardDTO, error)

Get leaderboard for the competitive queue.

Size defaults to 200. Valid values: 1 to 200.

Start defaults to 0.

type Region

type Region string
const (
	AP      Region = "ap"
	NA      Region = "na"
	LATAM   Region = "latam"
	ESPORTS Region = "esports"
	BR      Region = "br"
	EU      Region = "eu"
	KR      Region = "kr"
)

Valorant regions

type SkinLevelsDTO

type SkinLevelsDTO struct {
	Name              string            `json:"name"`
	LocalizedNamesDTO LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID                string            `json:"id"`
	AssetName         string            `json:"assetName"`
}

type SkinsDTO

type SkinsDTO struct {
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID             string            `json:"id"`
	AssetName      string            `json:"assetName"`
}

type SprayLevelsDTO

type SprayLevelsDTO struct {
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID             string            `json:"id"`
	AssetName      string            `json:"assetName"`
}

type SpraysDTO

type SpraysDTO struct {
	Name           string            `json:"name"`
	LocalizedNames LocalizedNamesDTO `json:"localizedNames,omitempty"`
	ID             string            `json:"id"`
	AssetName      string            `json:"assetName"`
}

type StatusEndpoint

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

func (*StatusEndpoint) PlatformStatus

func (s *StatusEndpoint) PlatformStatus(region Region) (*api.PlatformDataDTO, error)

Get VALORANT status for the given platform.

type TierDetailsDTO

type TierDetailsDTO struct {
	Num21 AdditionalPropDTO `json:"21"`
	Num22 AdditionalPropDTO `json:"22"`
	Num23 AdditionalPropDTO `json:"23"`
	Num24 AdditionalPropDTO `json:"24"`
}

type VALClient

type VALClient struct {
	Content *ContentEndpoint
	Ranked  *RankedEndpoint
	Status  *StatusEndpoint
	// contains filtered or unexported fields
}

func NewVALClient

func NewVALClient(client *internal.InternalClient) *VALClient

Returns a new client using the API key provided.

Jump to

Keyboard shortcuts

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