Documentation
¶
Overview ¶
This package is used to interact with all VAL endpoints.
- ContentV1
- MatchV1
- RankedV1
- StatusV1
Note: this package is automatically generated.
Index ¶
- type AbilityCastsV1DTO
- type AbilityV1DTO
- type ActV1DTO
- type Client
- type CoachV1DTO
- type ContentItemV1DTO
- type ContentV1
- type ContentV1DTO
- type DamageV1DTO
- type EconomyV1DTO
- type FinishingDamageV1DTO
- type KillV1DTO
- type LeaderboardPlayerV1DTO
- type LeaderboardV1DTO
- type LocalizedNamesV1DTO
- type LocationV1DTO
- type MatchInfoV1DTO
- type MatchV1
- func (e *MatchV1) ByID(ctx context.Context, route PlatformRoute, matchId string) (*MatchV1DTO, error)
- func (e *MatchV1) ListByPUUID(ctx context.Context, route PlatformRoute, puuid string) (*MatchlistV1DTO, error)
- func (e *MatchV1) Recent(ctx context.Context, route PlatformRoute, queue string) (*RecentMatchesV1DTO, error)
- type MatchV1DTO
- type MatchlistEntryV1DTO
- type MatchlistV1DTO
- type PlatformDataV1DTO
- type PlatformRoute
- type PlayerLocationsV1DTO
- type PlayerRoundStatsV1DTO
- type PlayerStatsV1DTO
- type PlayerV1DTO
- type RankedV1
- type RecentMatchesV1DTO
- type RoundResultV1DTO
- type StatusContentV1DTO
- type StatusV1
- type StatusV1DTO
- type TeamV1DTO
- type TierDetailV1DTO
- type UpdateV1DTO
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 {
Ability1Casts int32 `json:"ability1Casts,omitempty"`
Ability2Casts int32 `json:"ability2Casts,omitempty"`
GrenadeCasts int32 `json:"grenadeCasts,omitempty"`
UltimateCasts int32 `json:"ultimateCasts,omitempty"`
}
AbilityCastsDto data object.
type AbilityV1DTO ¶ added in v0.17.0
type AbilityV1DTO struct {
Ability1Effects string `json:"ability1Effects,omitempty"`
Ability2Effects string `json:"ability2Effects,omitempty"`
GrenadeEffects string `json:"grenadeEffects,omitempty"`
UltimateEffects string `json:"ultimateEffects,omitempty"`
}
AbilityDto data object.
type ActV1DTO ¶ added in v0.17.0
type ActV1DTO struct {
// This field is excluded from the response when a locale is set
LocalizedNames LocalizedNamesV1DTO `json:"localizedNames,omitempty"`
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ParentID string `json:"parentId,omitempty"`
Type string `json:"type,omitempty"`
IsActive bool `json:"isActive,omitempty"`
}
ActDto data object.
type Client ¶ added in v0.19.0
func NewVALClient ¶
Creates a new VAL Client using the internal.Client provided.
type CoachV1DTO ¶ added in v0.17.0
type CoachV1DTO struct {
PUUID string `json:"puuid,omitempty"`
TeamID string `json:"teamId,omitempty"`
}
CoachDto data object.
type ContentItemV1DTO ¶ added in v0.17.0
type ContentItemV1DTO struct {
AssetName string `json:"assetName,omitempty"`
// This field is only included for maps and game modes. These values are used in the match response.
AssetPath string `json:"assetPath,omitempty"`
ID string `json:"id,omitempty"`
// This field is excluded from the response when a locale is set
LocalizedNames LocalizedNamesV1DTO `json:"localizedNames,omitempty"`
Name string `json:"name,omitempty"`
}
ContentItemDto data object.
type ContentV1 ¶ added in v0.17.0
type ContentV1 struct {
// contains filtered or unexported fields
}
Riot API Reference ¶
type ContentV1DTO ¶ added in v0.17.0
type ContentV1DTO struct {
Version string `json:"version,omitempty"`
Acts []ActV1DTO `json:"acts,omitempty"`
Ceremonies []ContentItemV1DTO `json:"ceremonies,omitempty"`
Characters []ContentItemV1DTO `json:"characters,omitempty"`
CharmLevels []ContentItemV1DTO `json:"charmLevels,omitempty"`
Charms []ContentItemV1DTO `json:"charms,omitempty"`
Chromas []ContentItemV1DTO `json:"chromas,omitempty"`
Equips []ContentItemV1DTO `json:"equips,omitempty"`
GameModes []ContentItemV1DTO `json:"gameModes,omitempty"`
Maps []ContentItemV1DTO `json:"maps,omitempty"`
PlayerCards []ContentItemV1DTO `json:"playerCards,omitempty"`
PlayerTitles []ContentItemV1DTO `json:"playerTitles,omitempty"`
SkinLevels []ContentItemV1DTO `json:"skinLevels,omitempty"`
Skins []ContentItemV1DTO `json:"skins,omitempty"`
SprayLevels []ContentItemV1DTO `json:"sprayLevels,omitempty"`
Sprays []ContentItemV1DTO `json:"sprays,omitempty"`
// Unknown type, this is a placeholder subject to change.
Totems []string `json:"totems,omitempty"`
}
ContentDto data object.
type DamageV1DTO ¶ added in v0.17.0
type DamageV1DTO struct {
// PUUID
Receiver string `json:"receiver,omitempty"`
Bodyshots int32 `json:"bodyshots,omitempty"`
Damage int32 `json:"damage,omitempty"`
Headshots int32 `json:"headshots,omitempty"`
Legshots int32 `json:"legshots,omitempty"`
}
DamageDto data object.
type EconomyV1DTO ¶ added in v0.17.0
type EconomyV1DTO struct {
Armor string `json:"armor,omitempty"`
Weapon string `json:"weapon,omitempty"`
LoadoutValue int32 `json:"loadoutValue,omitempty"`
Remaining int32 `json:"remaining,omitempty"`
Spent int32 `json:"spent,omitempty"`
}
EconomyDto data object.
type FinishingDamageV1DTO ¶ added in v0.17.0
type FinishingDamageV1DTO struct {
DamageItem string `json:"damageItem,omitempty"`
DamageType string `json:"damageType,omitempty"`
IsSecondaryFireMode bool `json:"isSecondaryFireMode,omitempty"`
}
FinishingDamageDto data object.
type KillV1DTO ¶ added in v0.17.0
type KillV1DTO struct {
// PUUID
Killer string `json:"killer,omitempty"`
// PUUID
Victim string `json:"victim,omitempty"`
FinishingDamage FinishingDamageV1DTO `json:"finishingDamage,omitempty"`
// List of PUUIDs
Assistants []string `json:"assistants,omitempty"`
PlayerLocations []PlayerLocationsV1DTO `json:"playerLocations,omitempty"`
VictimLocation LocationV1DTO `json:"victimLocation,omitempty"`
TimeSinceGameStartMillis int32 `json:"timeSinceGameStartMillis,omitempty"`
TimeSinceRoundStartMillis int32 `json:"timeSinceRoundStartMillis,omitempty"`
}
KillDto data object.
type LeaderboardPlayerV1DTO ¶ added in v1.0.0
type LeaderboardPlayerV1DTO struct {
// This field may be omitted if the player has been anonymized.
GameName string `json:"gameName,omitempty"`
// This field may be omitted if the player has been anonymized.
PUUID string `json:"puuid,omitempty"`
// This field may be omitted if the player has been anonymized.
TagLine string `json:"tagLine,omitempty"`
CompetitiveTier int64 `json:"competitiveTier,omitempty"`
LeaderboardRank int64 `json:"leaderboardRank,omitempty"`
NumberOfWins int64 `json:"numberOfWins,omitempty"`
RankedRating int64 `json:"rankedRating,omitempty"`
}
PlayerDto data object.
type LeaderboardV1DTO ¶ added in v0.17.0
type LeaderboardV1DTO struct {
TierDetails map[int64]TierDetailV1DTO `json:"tierDetails,omitempty"`
// The act id for the given leaderboard. Act ids can be found using the val-content API.
ActID string `json:"actId,omitempty"`
Query string `json:"query,omitempty"`
// The shard for the given leaderboard.
Shard string `json:"shard,omitempty"`
Players []LeaderboardPlayerV1DTO `json:"players,omitempty"`
ImmortalStartingIndex int64 `json:"immortalStartingIndex,omitempty"`
ImmortalStartingPage int64 `json:"immortalStartingPage,omitempty"`
StartIndex int64 `json:"startIndex,omitempty"`
TopTierRrthreshold int64 `json:"topTierRRThreshold,omitempty"`
// The total number of players in the leaderboard.
TotalPlayers int64 `json:"totalPlayers,omitempty"`
}
LeaderboardDto data object.
type LocalizedNamesV1DTO ¶ added in v0.17.0
type LocalizedNamesV1DTO struct {
ArAe string `json:"ar-AE,omitempty"`
DeDe string `json:"de-DE,omitempty"`
EnGb string `json:"en-GB,omitempty"`
EnUs string `json:"en-US,omitempty"`
EsEs string `json:"es-ES,omitempty"`
EsMx string `json:"es-MX,omitempty"`
FrFr string `json:"fr-FR,omitempty"`
IdID string `json:"id-ID,omitempty"`
ItIt string `json:"it-IT,omitempty"`
JaJp string `json:"ja-JP,omitempty"`
KoKr string `json:"ko-KR,omitempty"`
PlPl string `json:"pl-PL,omitempty"`
PtBr string `json:"pt-BR,omitempty"`
RuRu string `json:"ru-RU,omitempty"`
ThTh string `json:"th-TH,omitempty"`
TrTr string `json:"tr-TR,omitempty"`
ViVn string `json:"vi-VN,omitempty"`
ZhCn string `json:"zh-CN,omitempty"`
ZhTw string `json:"zh-TW,omitempty"`
}
LocalizedNamesDto data object.
type LocationV1DTO ¶ added in v0.17.0
LocationDto data object.
type MatchInfoV1DTO ¶ added in v0.17.0
type MatchInfoV1DTO struct {
CustomGameName string `json:"customGameName,omitempty"`
GameMode string `json:"gameMode,omitempty"`
MapID string `json:"mapId,omitempty"`
MatchID string `json:"matchId,omitempty"`
ProvisioningFlowID string `json:"provisioningFlowId,omitempty"`
QueueID string `json:"queueId,omitempty"`
SeasonID string `json:"seasonId,omitempty"`
GameStartMillis int64 `json:"gameStartMillis,omitempty"`
GameLengthMillis int32 `json:"gameLengthMillis,omitempty"`
IsCompleted bool `json:"isCompleted,omitempty"`
IsRanked bool `json:"isRanked,omitempty"`
}
MatchInfoDto data object.
type MatchV1 ¶ added in v0.17.0
type MatchV1 struct {
// contains filtered or unexported fields
}
Riot API Reference ¶
func (*MatchV1) ByID ¶ added in v0.17.0
func (e *MatchV1) ByID(ctx context.Context, route PlatformRoute, matchId string) (*MatchV1DTO, error)
Get match by id
Parameters ¶
- route : Route to query.
- matchId
Riot API Reference ¶
func (*MatchV1) ListByPUUID ¶ added in v0.17.0
func (e *MatchV1) ListByPUUID(ctx context.Context, route PlatformRoute, puuid string) (*MatchlistV1DTO, error)
Get matchlist for games played by puuid
Parameters ¶
- route : Route to query.
- puuid
Riot API Reference ¶
func (*MatchV1) Recent ¶ added in v0.17.0
func (e *MatchV1) Recent(ctx context.Context, route PlatformRoute, 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
Riot API Reference ¶
type MatchV1DTO ¶ added in v0.17.0
type MatchV1DTO struct {
Coaches []CoachV1DTO `json:"coaches,omitempty"`
Players []PlayerV1DTO `json:"players,omitempty"`
RoundResults []RoundResultV1DTO `json:"roundResults,omitempty"`
Teams []TeamV1DTO `json:"teams,omitempty"`
MatchInfo MatchInfoV1DTO `json:"matchInfo,omitempty"`
}
MatchDto data object.
type MatchlistEntryV1DTO ¶ added in v0.17.0
type MatchlistEntryV1DTO struct {
MatchID string `json:"matchId,omitempty"`
QueueID string `json:"queueId,omitempty"`
GameStartTimeMillis int64 `json:"gameStartTimeMillis,omitempty"`
}
MatchlistEntryDto data object.
type MatchlistV1DTO ¶ added in v0.17.0
type MatchlistV1DTO struct {
PUUID string `json:"puuid,omitempty"`
History []MatchlistEntryV1DTO `json:"history,omitempty"`
}
MatchlistDto data object.
type PlatformDataV1DTO ¶ added in v0.17.0
type PlatformDataV1DTO struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Incidents []StatusV1DTO `json:"incidents,omitempty"`
Locales []string `json:"locales,omitempty"`
Maintenances []StatusV1DTO `json:"maintenances,omitempty"`
}
PlatformDataDto data object.
type PlatformRoute ¶ added in v0.18.0
type PlatformRoute string
Platform routes for Valorant.
const ( // Asia-Pacific. AP PlatformRoute = "ap" // Brazil. BR PlatformRoute = "br" // Special esports platform. ESPORTS PlatformRoute = "esports" // Europe. EU PlatformRoute = "eu" // Korea. KR PlatformRoute = "kr" // Latin America. LATAM PlatformRoute = "latam" // North America. NA PlatformRoute = "na" )
func (PlatformRoute) String ¶ added in v1.0.0
func (route PlatformRoute) String() string
type PlayerLocationsV1DTO ¶ added in v0.17.0
type PlayerLocationsV1DTO struct {
PUUID string `json:"puuid,omitempty"`
Location LocationV1DTO `json:"location,omitempty"`
ViewRadians float32 `json:"viewRadians,omitempty"`
}
PlayerLocationsDto data object.
type PlayerRoundStatsV1DTO ¶ added in v0.17.0
type PlayerRoundStatsV1DTO struct {
Ability AbilityV1DTO `json:"ability,omitempty"`
PUUID string `json:"puuid,omitempty"`
Damage []DamageV1DTO `json:"damage,omitempty"`
Kills []KillV1DTO `json:"kills,omitempty"`
Economy EconomyV1DTO `json:"economy,omitempty"`
Score int32 `json:"score,omitempty"`
}
PlayerRoundStatsDto data object.
type PlayerStatsV1DTO ¶ added in v0.17.0
type PlayerStatsV1DTO struct {
AbilityCasts AbilityCastsV1DTO `json:"abilityCasts,omitempty"`
Assists int32 `json:"assists,omitempty"`
Deaths int32 `json:"deaths,omitempty"`
Kills int32 `json:"kills,omitempty"`
PlaytimeMillis int32 `json:"playtimeMillis,omitempty"`
RoundsPlayed int32 `json:"roundsPlayed,omitempty"`
Score int32 `json:"score,omitempty"`
}
PlayerStatsDto data object.
type PlayerV1DTO ¶ added in v0.17.0
type PlayerV1DTO struct {
CharacterID string `json:"characterId,omitempty"`
GameName string `json:"gameName,omitempty"`
PUUID string `json:"puuid,omitempty"`
PartyID string `json:"partyId,omitempty"`
PlayerCard string `json:"playerCard,omitempty"`
PlayerTitle string `json:"playerTitle,omitempty"`
TagLine string `json:"tagLine,omitempty"`
TeamID string `json:"teamId,omitempty"`
Stats PlayerStatsV1DTO `json:"stats,omitempty"`
CompetitiveTier int32 `json:"competitiveTier,omitempty"`
}
PlayerDto data object.
type RankedV1 ¶ added in v0.17.0
type RankedV1 struct {
// contains filtered or unexported fields
}
Riot API Reference ¶
func (*RankedV1) Leaderboard ¶ added in v0.17.0
func (e *RankedV1) Leaderboard(ctx context.Context, route PlatformRoute, actId string, size int32, startIndex int32) (*LeaderboardV1DTO, error)
Get leaderboard for the competitive queue
Parameters ¶
- route : Route to query.
- actId : Act ids can be found using the val-content API.
- size (optional) : Defaults to 200. Valid values: 1 to 200.
- startIndex (optional) : Defaults to 0.
Riot API Reference ¶
type RecentMatchesV1DTO ¶ added in v0.17.0
type RecentMatchesV1DTO struct {
// A list of recent match ids.
MatchIDs []string `json:"matchIds,omitempty"`
CurrentTime int64 `json:"currentTime,omitempty"`
}
RecentMatchesDto data object.
type RoundResultV1DTO ¶ added in v0.17.0
type RoundResultV1DTO struct {
// PUUID of player
BombDefuser string `json:"bombDefuser,omitempty"`
// PUUID of player
BombPlanter string `json:"bombPlanter,omitempty"`
PlantSite string `json:"plantSite,omitempty"`
RoundCeremony string `json:"roundCeremony,omitempty"`
RoundResult string `json:"roundResult,omitempty"`
RoundResultCode string `json:"roundResultCode,omitempty"`
WinningTeam string `json:"winningTeam,omitempty"`
DefusePlayerLocations []PlayerLocationsV1DTO `json:"defusePlayerLocations,omitempty"`
PlantPlayerLocations []PlayerLocationsV1DTO `json:"plantPlayerLocations,omitempty"`
PlayerStats []PlayerRoundStatsV1DTO `json:"playerStats,omitempty"`
DefuseLocation LocationV1DTO `json:"defuseLocation,omitempty"`
PlantLocation LocationV1DTO `json:"plantLocation,omitempty"`
DefuseRoundTime int32 `json:"defuseRoundTime,omitempty"`
PlantRoundTime int32 `json:"plantRoundTime,omitempty"`
RoundNum int32 `json:"roundNum,omitempty"`
}
RoundResultDto data object.
type StatusContentV1DTO ¶ added in v0.17.0
type StatusContentV1DTO struct {
Content string `json:"content,omitempty"`
Locale string `json:"locale,omitempty"`
}
ContentDto data object.
type StatusV1 ¶ added in v0.17.0
type StatusV1 struct {
// contains filtered or unexported fields
}
Riot API Reference ¶
func (*StatusV1) Platform ¶ added in v0.17.0
func (e *StatusV1) Platform(ctx context.Context, route PlatformRoute) (*PlatformDataV1DTO, error)
Get VALORANT status for the given platform.
Parameters ¶
- route : Route to query.
Riot API Reference ¶
type StatusV1DTO ¶ added in v0.17.0
type StatusV1DTO struct {
ArchiveAt string `json:"archive_at,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
// (Legal values: info, warning, critical)
IncidentSeverity string `json:"incident_severity,omitempty"`
// (Legal values: scheduled, in_progress, complete)
MaintenanceStatus string `json:"maintenance_status,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
// (Legal values: windows, macos, android, ios, ps4, xbone, switch)
Platforms []string `json:"platforms,omitempty"`
Titles []StatusContentV1DTO `json:"titles,omitempty"`
Updates []UpdateV1DTO `json:"updates,omitempty"`
ID int32 `json:"id,omitempty"`
}
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,omitempty"`
// Team points scored. Number of kills in deathmatch.
NumPoints int32 `json:"numPoints,omitempty"`
RoundsPlayed int32 `json:"roundsPlayed,omitempty"`
RoundsWon int32 `json:"roundsWon,omitempty"`
Won bool `json:"won,omitempty"`
}
TeamDto data object.
type TierDetailV1DTO ¶ added in v0.17.0
type TierDetailV1DTO struct {
RankedRatingThreshold int64 `json:"rankedRatingThreshold,omitempty"`
StartingIndex int64 `json:"startingIndex,omitempty"`
StartingPage int64 `json:"startingPage,omitempty"`
}
TierDetailDto data object.
type UpdateV1DTO ¶ added in v0.17.0
type UpdateV1DTO struct {
Author string `json:"author,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
// (Legal values: riotclient, riotstatus, game)
PublishLocations []string `json:"publish_locations,omitempty"`
Translations []StatusContentV1DTO `json:"translations,omitempty"`
ID int32 `json:"id,omitempty"`
Publish bool `json:"publish,omitempty"`
}
UpdateDto data object.