Documentation
¶
Index ¶
- Constants
- type AbilityCastDTO
- type AbilityDTO
- type ActDTO
- type AdditionalPropDTO
- type AssetDTO
- type CoachDTO
- type ContentDTO
- type ContentEndpoint
- type DamageDTO
- type EconomyDTO
- type FinishingDamageDTO
- type HistoryDTO
- type KillDTO
- type LeaderboardDTO
- type Locale
- type LocalizedActDTO
- type LocalizedAssetDTO
- type LocalizedContentDTO
- type LocalizedNamesDTO
- type LocationDTO
- type MatchDTO
- type MatchEndpoint
- type MatchInfoDTO
- type MatchListDTO
- type MatchPlayerDTO
- type PlayerLocationDTO
- type PlayerStatsDTO
- type PlayersDTO
- type Queue
- type RankedEndpoint
- type RecentMatchesDTO
- type RoundResultDTO
- type Shard
- type StatsDTO
- type StatusEndpoint
- type TeamDTO
- type TierDetailsDTO
- type VALClient
Constants ¶
const ( ContentURL = "/val/content/v1/contents" MatchByIDURL = "/val/match/v1/matches/%s" MatchListURL = "/val/match/v1/matchlists/by-puuid/%s" MatchRecentURL = "/val/match/v1/recent-matches/by-queue/%s" RankedURL = "/val/ranked/v1/leaderboards/by-act/%s" StatusURL = "/val/status/v1/platform-data" )
Valorant endpoint URLs.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbilityCastDTO ¶ added in v0.8.1
type AbilityDTO ¶ added in v0.8.1
type AdditionalPropDTO ¶
type AssetDTO ¶ added in v0.8.7
type AssetDTO struct {
Name string `json:"name"`
ID string `json:"id"`
AssetName string `json:"assetName"`
AssetPath string `json:"assetPath,omitempty"`
LocalizedNames LocalizedNamesDTO `json:"localizedNames"`
}
type ContentDTO ¶
type ContentDTO struct {
Version string `json:"version"`
Characters []AssetDTO `json:"characters"`
Maps []AssetDTO `json:"maps"`
Chromas []AssetDTO `json:"chromas"`
Skins []AssetDTO `json:"skins"`
SkinLevels []AssetDTO `json:"skinLevels"`
Equips []AssetDTO `json:"equips"`
GameModes []AssetDTO `json:"gameModes"`
Sprays []AssetDTO `json:"sprays"`
SprayLevels []AssetDTO `json:"sprayLevels"`
Charms []AssetDTO `json:"charms"`
CharmLevels []AssetDTO `json:"charmLevels"`
PlayerCards []AssetDTO `json:"playerCards"`
PlayerTitles []AssetDTO `json:"playerTitles"`
Acts []ActDTO `json:"acts"`
Ceremonies []AssetDTO `json:"ceremonies"`
}
type ContentEndpoint ¶
type ContentEndpoint struct {
// contains filtered or unexported fields
}
func (*ContentEndpoint) AllLocales ¶
func (e *ContentEndpoint) AllLocales(shard Shard) (*ContentDTO, error)
Get content with all available locales.
func (*ContentEndpoint) ByLocale ¶
func (e *ContentEndpoint) ByLocale(shard Shard, locale Locale) (*LocalizedContentDTO, error)
Get content filtered by locale.
Locale defaults to en-US.
type EconomyDTO ¶ added in v0.8.1
type FinishingDamageDTO ¶ added in v0.8.1
type HistoryDTO ¶ added in v0.8.1
type KillDTO ¶ added in v0.8.1
type KillDTO struct {
TimeSinceGameStartMillis int `json:"timeSinceGameStartMillis"`
TimeSinceRoundStartMillis int `json:"timeSinceRoundStartMillis"`
Killer string `json:"killer"`
Victim string `json:"victim"`
VictimLocation LocationDTO `json:"victimLocation"`
Assistants []string `json:"assistants"`
PlayerLocations []PlayerLocationDTO `json:"playerLocations"`
FinishingDamage FinishingDamageDTO `json:"finishingDamage"`
}
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 Shard `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" )
type LocalizedActDTO ¶ added in v0.8.7
type LocalizedAssetDTO ¶ added in v0.8.7
type LocalizedContentDTO ¶
type LocalizedContentDTO struct {
Version string `json:"version"`
Characters []LocalizedAssetDTO `json:"characters"`
Maps []LocalizedAssetDTO `json:"maps"`
Chromas []LocalizedAssetDTO `json:"chromas"`
Skins []LocalizedAssetDTO `json:"skins"`
SkinLevels []LocalizedAssetDTO `json:"skinLevels"`
Equips []LocalizedAssetDTO `json:"equips"`
GameModes []LocalizedAssetDTO `json:"gameModes"`
Sprays []LocalizedAssetDTO `json:"sprays"`
SprayLevels []LocalizedAssetDTO `json:"sprayLevels"`
Charms []LocalizedAssetDTO `json:"charms"`
CharmLevels []LocalizedAssetDTO `json:"charmLevels"`
PlayerCards []LocalizedAssetDTO `json:"playerCards"`
PlayerTitles []LocalizedAssetDTO `json:"playerTitles"`
Ceremonies []LocalizedAssetDTO `json:"ceremonies"`
Acts []LocalizedActDTO `json:"acts"`
}
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 LocationDTO ¶ added in v0.8.1
type MatchDTO ¶ added in v0.8.1
type MatchDTO struct {
MatchInfo MatchInfoDTO `json:"matchInfo"`
Players []MatchPlayerDTO `json:"players"`
Coaches []CoachDTO `json:"coaches"`
Teams []TeamDTO `json:"teams"`
RoundResults []RoundResultDTO `json:"roundResults"`
}
type MatchEndpoint ¶ added in v0.8.1
type MatchEndpoint struct {
// contains filtered or unexported fields
}
func (*MatchEndpoint) ByID ¶ added in v0.8.1
func (e *MatchEndpoint) ByID(shard Shard, matchID string) (*MatchDTO, error)
Get match by ID.
func (*MatchEndpoint) List ¶ added in v0.8.1
func (e *MatchEndpoint) List(shard Shard, puuid string) (*MatchListDTO, error)
Get matchlist for games played by PUUID.
func (*MatchEndpoint) Recent ¶ added in v0.8.1
func (e *MatchEndpoint) Recent(shard Shard, queue Queue) (*RecentMatchesDTO, error)
Get recent matches.
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.
type MatchInfoDTO ¶ added in v0.8.1
type MatchInfoDTO struct {
MatchID string `json:"matchId"`
MapID string `json:"mapId"`
GameLengthMillis int `json:"gameLengthMillis"`
GameStartMillis int `json:"gameStartMillis"`
ProvisioningFlowID string `json:"provisioningFlowId"`
IsCompleted bool `json:"isCompleted"`
CustomGameName string `json:"customGameName"`
QueueID Queue `json:"queueId"`
GameMode string `json:"gameMode"`
IsRanked bool `json:"isRanked"`
SeasonID string `json:"seasonId"`
}
type MatchListDTO ¶ added in v0.8.1
type MatchListDTO struct {
PUUID string `json:"puuid"`
History []HistoryDTO `json:"history"`
}
type MatchPlayerDTO ¶ added in v0.8.1
type MatchPlayerDTO 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 StatsDTO `json:"stats"`
CompetitiveTier int `json:"competitiveTier"`
PlayerCard string `json:"playerCard"`
PlayerTitle string `json:"playerTitle"`
}
type PlayerLocationDTO ¶ added in v0.8.1
type PlayerLocationDTO struct {
PUUID string `json:"puuid"`
ViewRadians int `json:"viewRadians"`
Location LocationDTO `json:"location"`
}
type PlayerStatsDTO ¶ added in v0.8.1
type PlayerStatsDTO struct {
PUUID string `json:"puuid"`
Kills []KillDTO `json:"kills"`
Damage []DamageDTO `json:"damage"`
Score int `json:"score"`
Economy EconomyDTO `json:"economy"`
Ability AbilityDTO `json:"ability"`
}
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 (e *RankedEndpoint) LeaderboardsByActID(shard Shard, 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 RecentMatchesDTO ¶ added in v0.8.1
type RoundResultDTO ¶ added in v0.8.1
type RoundResultDTO struct {
RoundNum int `json:"roundNum"`
RoundResult string `json:"roundResult"`
RoundCeremony string `json:"roundCeremony"`
WinningTeam string `json:"winningTeam"`
BombPlanter string `json:"bombPlanter"`
BombDefuser string `json:"bombDefuser"`
PlantRoundTime int `json:"plantRoundTime"`
PlantPlayerLocations []PlayerLocationDTO `json:"plantPlayerLocations"`
PlantLocation LocationDTO `json:"plantLocation"`
PlantSite string `json:"plantSite"`
DefuseRoundTime int `json:"defuseRoundTime"`
DefusePlayerLocations []PlayerLocationDTO `json:"defusePlayerLocations"`
DefuseLocation LocationDTO `json:"defuseLocation"`
PlayerStats []PlayerStatsDTO `json:"playerStats"`
RoundResultCode string `json:"roundResultCode"`
}
type StatusEndpoint ¶
type StatusEndpoint struct {
// contains filtered or unexported fields
}
func (*StatusEndpoint) PlatformStatus ¶
func (e *StatusEndpoint) PlatformStatus(shard Shard) (*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
Match *MatchEndpoint
Ranked *RankedEndpoint
Status *StatusEndpoint
// contains filtered or unexported fields
}
func NewVALClient ¶
func NewVALClient(client *internal.InternalClient) *VALClient
Returns a new VALClient using the InternalClient provided.