val

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

This package is used to interact with the following VAL endpoints:

  • ContentV1
  • MatchV1
  • RankedV1
  • StatusV1

Note: this package is automatically generated.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbilityCastsV1DTO added in v0.17.0

type AbilityCastsV1DTO struct {
	GrenadeCasts  int32 `json:"grenadeCasts"`
	Ability1Casts int32 `json:"ability1Casts"`
	Ability2Casts int32 `json:"ability2Casts"`
	UltimateCasts int32 `json:"ultimateCasts"`
}

AbilityCastsDTO data object.

type AbilityV1DTO added in v0.17.0

type AbilityV1DTO struct {
	GrenadeEffects  string `json:"grenadeEffects"`
	Ability1Effects string `json:"ability1Effects"`
	Ability2Effects string `json:"ability2Effects"`
	UltimateEffects string `json:"ultimateEffects"`
}

AbilityDTO data object.

type ActV1DTO added in v0.17.0

type ActV1DTO struct {
	Name string `json:"name"`
	// This field is excluded from the response when a locale is set
	LocalizedNames LocalizedNamesV1DTO `json:"localizedNames"`
	ID             string              `json:"id"`
	IsActive       bool                `json:"isActive"`
	ParentID       string              `json:"parentId"`
	Type           string              `json:"type"`
}

ActDTO data object.

type CoachV1DTO added in v0.17.0

type CoachV1DTO struct {
	PUUID  string `json:"puuid"`
	TeamID string `json:"teamId"`
}

CoachDTO data object.

type ContentItemV1DTO added in v0.17.0

type ContentItemV1DTO struct {
	Name string `json:"name"`
	// This field is excluded from the response when a locale is set
	LocalizedNames LocalizedNamesV1DTO `json:"localizedNames"`
	ID             string              `json:"id"`
	AssetName      string              `json:"assetName"`
	// This field is only included for maps and game modes. These values are used in the match response.
	AssetPath string `json:"assetPath"`
}

ContentItemDTO data object.

type ContentV1 added in v0.17.0

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

Riot API Reference

val-content-v1

Note: this struct is automatically generated.

func (*ContentV1) Content added in v0.17.0

func (e *ContentV1) Content(route ValPlatformRoute, locale string) (*ContentV1DTO, error)

Get content optionally filtered by locale

Parameters

  • `route` - Route to query.
  • `locale` (optional, in query)

Riot API Reference

val-content-v1.getContent

Note: this method is automatically generated.

type ContentV1DTO added in v0.17.0

type ContentV1DTO struct {
	Version      string             `json:"version"`
	Characters   []ContentItemV1DTO `json:"characters"`
	Maps         []ContentItemV1DTO `json:"maps"`
	Chromas      []ContentItemV1DTO `json:"chromas"`
	Skins        []ContentItemV1DTO `json:"skins"`
	SkinLevels   []ContentItemV1DTO `json:"skinLevels"`
	Equips       []ContentItemV1DTO `json:"equips"`
	GameModes    []ContentItemV1DTO `json:"gameModes"`
	Sprays       []ContentItemV1DTO `json:"sprays"`
	SprayLevels  []ContentItemV1DTO `json:"sprayLevels"`
	Charms       []ContentItemV1DTO `json:"charms"`
	CharmLevels  []ContentItemV1DTO `json:"charmLevels"`
	PlayerCards  []ContentItemV1DTO `json:"playerCards"`
	PlayerTitles []ContentItemV1DTO `json:"playerTitles"`
	Acts         []ActV1DTO         `json:"acts"`
	Ceremonies   []ContentItemV1DTO `json:"ceremonies"`
	// Unknown type, this is a placeholder subject to change.
	Totems []string `json:"totems"`
}

ContentDTO data object.

type DamageV1DTO added in v0.17.0

type DamageV1DTO struct {
	// PUUID
	Receiver  string `json:"receiver"`
	Damage    int32  `json:"damage"`
	Legshots  int32  `json:"legshots"`
	Bodyshots int32  `json:"bodyshots"`
	Headshots int32  `json:"headshots"`
}

DamageDTO data object.

type EconomyV1DTO added in v0.17.0

type EconomyV1DTO struct {
	LoadoutValue int32  `json:"loadoutValue"`
	Weapon       string `json:"weapon"`
	Armor        string `json:"armor"`
	Remaining    int32  `json:"remaining"`
	Spent        int32  `json:"spent"`
}

EconomyDTO data object.

type FinishingDamageV1DTO added in v0.17.0

type FinishingDamageV1DTO struct {
	DamageType          string `json:"damageType"`
	DamageItem          string `json:"damageItem"`
	IsSecondaryFireMode bool   `json:"isSecondaryFireMode"`
}

FinishingDamageDTO data object.

type KillV1DTO added in v0.17.0

type KillV1DTO struct {
	TimeSinceGameStartMillis  int32 `json:"timeSinceGameStartMillis"`
	TimeSinceRoundStartMillis int32 `json:"timeSinceRoundStartMillis"`
	// PUUID
	Killer string `json:"killer"`
	// PUUID
	Victim         string        `json:"victim"`
	VictimLocation LocationV1DTO `json:"victimLocation"`
	// List of PUUIDs
	Assistants      []string               `json:"assistants"`
	PlayerLocations []PlayerLocationsV1DTO `json:"playerLocations"`
	FinishingDamage FinishingDamageV1DTO   `json:"finishingDamage"`
}

KillDTO data object.

type LeaderboardV1DTO added in v0.17.0

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

LeaderboardDTO data object.

type LocalizedNamesV1DTO added in v0.17.0

type LocalizedNamesV1DTO struct {
	ArAe string `json:"ar-AE"`
	DeDe string `json:"de-DE"`
	EnGb string `json:"en-GB"`
	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"`
}

LocalizedNamesDTO data object.

type LocationV1DTO added in v0.17.0

type LocationV1DTO struct {
	X int32 `json:"x"`
	Y int32 `json:"y"`
}

LocationDTO data object.

type MatchInfoV1DTO added in v0.17.0

type MatchInfoV1DTO struct {
	MatchID            string `json:"matchId"`
	MapID              string `json:"mapId"`
	GameLengthMillis   int32  `json:"gameLengthMillis"`
	GameStartMillis    int64  `json:"gameStartMillis"`
	ProvisioningFlowID string `json:"provisioningFlowId"`
	IsCompleted        bool   `json:"isCompleted"`
	CustomGameName     string `json:"customGameName"`
	QueueID            string `json:"queueId"`
	GameMode           string `json:"gameMode"`
	IsRanked           bool   `json:"isRanked"`
	SeasonID           string `json:"seasonId"`
}

MatchInfoDTO data object.

type MatchPlayerV1DTO added in v0.17.0

type MatchPlayerV1DTO 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 int64  `json:"leaderboardRank"`
	RankedRating    int64  `json:"rankedRating"`
	NumberOfWins    int64  `json:"numberOfWins"`
	CompetitiveTier int64  `json:"competitiveTier"`
}

PlayerDTO data object.

type MatchV1 added in v0.17.0

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

Riot API Reference

val-match-v1

Note: this struct is automatically generated.

func (*MatchV1) ByID added in v0.17.0

func (e *MatchV1) ByID(route ValPlatformRoute, matchId string) (*MatchV1DTO, error)

Get match by id

Parameters

  • `route` - Route to query.
  • `matchId` (required, in path)

Riot API Reference

val-match-v1.getMatch

Note: this method is automatically generated.

func (*MatchV1) ListByPUUID added in v0.17.0

func (e *MatchV1) ListByPUUID(route ValPlatformRoute, puuid string) (*MatchlistV1DTO, error)

Get matchlist for games played by puuid

Parameters

  • `route` - Route to query.
  • `puuid` (required, in path)

Riot API Reference

val-match-v1.getMatchlist

Note: this method is automatically generated.

func (*MatchV1) Recent added in v0.17.0

func (e *MatchV1) Recent(route ValPlatformRoute, queue string) (*RecentMatchesV1DTO, error)

Get recent matches

Implementation Notes

Returns a list of match ids that have completed in the last 10 minutes for live regions and 12 hours for the esports routing value. NA/LATAM/BR share a match history deployment. As such, recent matches will return a combined list of matches from those three regions. Requests are load balanced so you may see some inconsistencies as matches are added/removed from the list.

Parameters

  • `route` - Route to query.
  • `queue` (required, in path)

Riot API Reference

val-match-v1.getRecent

Note: this method is automatically generated.

type MatchV1DTO added in v0.17.0

type MatchV1DTO struct {
	MatchInfo    MatchInfoV1DTO     `json:"matchInfo"`
	Players      []PlayerV1DTO      `json:"players"`
	Coaches      []CoachV1DTO       `json:"coaches"`
	Teams        []TeamV1DTO        `json:"teams"`
	RoundResults []RoundResultV1DTO `json:"roundResults"`
}

MatchDTO data object.

type MatchlistEntryV1DTO added in v0.17.0

type MatchlistEntryV1DTO struct {
	MatchID             string `json:"matchId"`
	GameStartTimeMillis int64  `json:"gameStartTimeMillis"`
	QueueID             string `json:"queueId"`
}

MatchlistEntryDTO data object.

type MatchlistV1DTO added in v0.17.0

type MatchlistV1DTO struct {
	PUUID   string                `json:"puuid"`
	History []MatchlistEntryV1DTO `json:"history"`
}

MatchlistDTO data object.

type PlatformDataV1DTO added in v0.17.0

type PlatformDataV1DTO struct {
	ID           string        `json:"id"`
	Name         string        `json:"name"`
	Locales      []string      `json:"locales"`
	Maintenances []StatusV1DTO `json:"maintenances"`
	Incidents    []StatusV1DTO `json:"incidents"`
}

PlatformDataDTO data object.

type PlayerLocationsV1DTO added in v0.17.0

type PlayerLocationsV1DTO struct {
	PUUID       string        `json:"puuid"`
	ViewRadians float32       `json:"viewRadians"`
	Location    LocationV1DTO `json:"location"`
}

PlayerLocationsDTO data object.

type PlayerRoundStatsV1DTO added in v0.17.0

type PlayerRoundStatsV1DTO struct {
	PUUID   string        `json:"puuid"`
	Kills   []KillV1DTO   `json:"kills"`
	Damage  []DamageV1DTO `json:"damage"`
	Score   int32         `json:"score"`
	Economy EconomyV1DTO  `json:"economy"`
	Ability AbilityV1DTO  `json:"ability"`
}

PlayerRoundStatsDTO data object.

type PlayerStatsV1DTO added in v0.17.0

type PlayerStatsV1DTO struct {
	Score          int32             `json:"score"`
	RoundsPlayed   int32             `json:"roundsPlayed"`
	Kills          int32             `json:"kills"`
	Deaths         int32             `json:"deaths"`
	Assists        int32             `json:"assists"`
	PlaytimeMillis int32             `json:"playtimeMillis"`
	AbilityCasts   AbilityCastsV1DTO `json:"abilityCasts"`
}

PlayerStatsDTO data object.

type PlayerV1DTO added in v0.17.0

type PlayerV1DTO struct {
	PUUID           string           `json:"puuid"`
	GameName        string           `json:"gameName"`
	TagLine         string           `json:"tagLine"`
	TeamID          string           `json:"teamId"`
	PartyID         string           `json:"partyId"`
	CharacterID     string           `json:"characterId"`
	Stats           PlayerStatsV1DTO `json:"stats"`
	CompetitiveTier int32            `json:"competitiveTier"`
	PlayerCard      string           `json:"playerCard"`
	PlayerTitle     string           `json:"playerTitle"`
}

PlayerDTO data object.

type RankedV1 added in v0.17.0

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

Riot API Reference

val-ranked-v1

Note: this struct is automatically generated.

func (*RankedV1) Leaderboard added in v0.17.0

func (e *RankedV1) Leaderboard(route ValPlatformRoute, actId string, size int32, startIndex int32) (*LeaderboardV1DTO, error)

Get leaderboard for the competitive queue

Parameters

  • `route` - Route to query.
  • `actId` (required, in path) - Act ids can be found using the val-content API.
  • `size` (optional, in query) - Defaults to 200. Valid values: 1 to 200.
  • `startIndex` (optional, in query) - Defaults to 0.

Riot API Reference

val-ranked-v1.getLeaderboard

Note: this method is automatically generated.

type RecentMatchesV1DTO added in v0.17.0

type RecentMatchesV1DTO struct {
	CurrentTime int64 `json:"currentTime"`
	// A list of recent match ids.
	MatchIDs []string `json:"matchIds"`
}

RecentMatchesDTO data object.

type RoundResultV1DTO added in v0.17.0

type RoundResultV1DTO struct {
	RoundNum      int32  `json:"roundNum"`
	RoundResult   string `json:"roundResult"`
	RoundCeremony string `json:"roundCeremony"`
	WinningTeam   string `json:"winningTeam"`
	// PUUID of player
	BombPlanter string `json:"bombPlanter"`
	// PUUID of player
	BombDefuser           string                  `json:"bombDefuser"`
	PlantRoundTime        int32                   `json:"plantRoundTime"`
	PlantPlayerLocations  []PlayerLocationsV1DTO  `json:"plantPlayerLocations"`
	PlantLocation         LocationV1DTO           `json:"plantLocation"`
	PlantSite             string                  `json:"plantSite"`
	DefuseRoundTime       int32                   `json:"defuseRoundTime"`
	DefusePlayerLocations []PlayerLocationsV1DTO  `json:"defusePlayerLocations"`
	DefuseLocation        LocationV1DTO           `json:"defuseLocation"`
	PlayerStats           []PlayerRoundStatsV1DTO `json:"playerStats"`
	RoundResultCode       string                  `json:"roundResultCode"`
}

RoundResultDTO data object.

type StatusContentV1DTO added in v0.17.0

type StatusContentV1DTO struct {
	Locale  string `json:"locale"`
	Content string `json:"content"`
}

ContentDTO data object.

type StatusV1 added in v0.17.0

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

Riot API Reference

val-status-v1

Note: this struct is automatically generated.

func (*StatusV1) Platform added in v0.17.0

func (e *StatusV1) Platform(route ValPlatformRoute) (*PlatformDataV1DTO, error)

Get VALORANT status for the given platform.

Parameters

  • `route` - Route to query.

Riot API Reference

val-status-v1.getPlatformData

Note: this method is automatically generated.

type StatusV1DTO added in v0.17.0

type StatusV1DTO struct {
	ID int32 `json:"id"`
	// (Legal values:  scheduled,  in_progress,  complete)
	MaintenanceStatus string `json:"maintenance_status"`
	// (Legal values:  info,  warning,  critical)
	IncidentSeverity string         `json:"incident_severity"`
	Titles           []ContentV1DTO `json:"titles"`
	Updates          []UpdateV1DTO  `json:"updates"`
	CreatedAt        string         `json:"created_at"`
	ArchiveAt        string         `json:"archive_at"`
	UpdatedAt        string         `json:"updated_at"`
	// (Legal values: windows, macos, android, ios, ps4, xbone, switch)
	Platforms []string `json:"platforms"`
}

StatusDTO data object.

type TeamV1DTO added in v0.17.0

type TeamV1DTO struct {
	// This is an arbitrary string. Red and Blue in bomb modes. The puuid of the player in deathmatch.
	TeamID       string `json:"teamId"`
	Won          bool   `json:"won"`
	RoundsPlayed int32  `json:"roundsPlayed"`
	RoundsWon    int32  `json:"roundsWon"`
	// Team points scored. Number of kills in deathmatch.
	NumPoints int32 `json:"numPoints"`
}

TeamDTO data object.

type TierDetailV1DTO added in v0.17.0

type TierDetailV1DTO struct {
	RankedRatingThreshold int64 `json:"rankedRatingThreshold"`
	StartingPage          int64 `json:"startingPage"`
	StartingIndex         int64 `json:"startingIndex"`
}

TierDetailDTO data object.

type UpdateV1DTO added in v0.17.0

type UpdateV1DTO struct {
	ID      int32  `json:"id"`
	Author  string `json:"author"`
	Publish bool   `json:"publish"`
	// (Legal values: riotclient, riotstatus, game)
	PublishLocations []string       `json:"publish_locations"`
	Translations     []ContentV1DTO `json:"translations"`
	CreatedAt        string         `json:"created_at"`
	UpdatedAt        string         `json:"updated_at"`
}

UpdateDTO data object.

type VALClient

type VALClient struct {
	ContentV1 *ContentV1
	MatchV1   *MatchV1
	RankedV1  *RankedV1
	StatusV1  *StatusV1
	// contains filtered or unexported fields
}

Note: this struct is automatically generated.

func NewVALClient

func NewVALClient(client *internal.InternalClient) *VALClient

Creates a new VALClient using the InternalClient provided.

type ValPlatformRoute added in v0.17.0

type ValPlatformRoute string

Platform routes for Valorant.

const (
	// Asia-Pacific.
	AP ValPlatformRoute = "ap"
	// Brazil.
	BR ValPlatformRoute = "br"
	// Europe.
	EU ValPlatformRoute = "eu"
	// Korea.
	KR ValPlatformRoute = "kr"
	// Latin America.
	LATAM ValPlatformRoute = "latam"
	// North America.
	NA ValPlatformRoute = "na"
	// Special esports platform.
	ESPORTS ValPlatformRoute = "esports"
)

Jump to

Keyboard shortcuts

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