rlapi

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: MIT Imports: 17 Imported by: 0

README

rlapi

GitHub Release Go Reference GitHub License

ITEM SHOP DEMO

rlapi is a reverse engineered collection of Rocket League's internal APIs with a Go SDK. It provides a full end-to-end flow, from authentication to accessing the item shop, player stats, inventory, match history, replays, and more. This repository also contains resources for reverse engineering and analyzing Rocket League network traffic, serving as a foundation for further exploration. Not all endpoints are fully documented—do not ask about specific ones, as I probably don't know.

Contributions

All contributions are welcome! If you discover new endpoints, extend the Go SDK, or add additional functionality, please submit a PR.

Getting Started

Refer to the godoc for detailed documentation on the Go SDK.

Comprehensive examples are available in the examples directory.

Usage
go get github.com/dank/rlapi
Authentication

Rocket League authentication always goes through Epic Online Services (EOS), either via the Epic Games Store (EGS) or by exchanging a Steam session ticket for an EOS token.

This library provides full end-to-end authentication via EGS. Steam login and ticket generation are out of scope, but a method is provided to exchange a Steam session ticket for an EOS token, and users can leverage external libraries such as steam-user or Steamworks to obtain the ticket.

Intercepting Requests

Traditional proxy tools like Fiddler don't work with Rocket League due to certificate pinning.

To intercept traffic, we use Frida dynamic instrumentation to hook curl functions at runtime, disabling SSL verification and redirecting API traffic to a local MITM server.

MITM Server

The MITM proxy forwards both HTTP and WebSocket traffic to the official servers while intercepting and logging requests and responses. Authentication responses are rewritten so the WebSocket URL points to the local server.

[!NOTE] Refer to the respective READMEs in tools/frida/ and tools/mitm/ directories for more details and usage instructions.

Reconstructing Requests

Authentication

Rocket League initially establishes a connection with the HTTP API before transitioning to a WebSocket connection. The client sends an EOS access token via HTTP and receives session credentials, the WebSocket endpoint URL, and any tokens required for further communication. The client then connects to the WebSocket using these tokens, allowing all subsequent API calls to occur over a persistent WebSocket connection.

Signing

All API requests and responses must include a PsySig header containing a Base64-encoded HMAC-SHA256 signature. The signing keys were reverse engineered from the game binary and are XOR'd with a 4-byte pattern. To decrypt:

# Raw IDA dump
data = [0x36, 0xEA, 0x37, 0x0C, ...]  # 36 bytes total

key_bytes = [data[i] ^ data[(i % 4) + 32] for i in range(32)]
  • Request Key: c338bd36fb8c42b1a431d30add939fc7
    • Format: HMAC-SHA256(key, "-" + <request body>)
  • Response Key: 3b932153785842ac927744b292e40e52
    • Format: HMAC-SHA256(key, PsyTime + "-" + <response body>)
Request Protocol
WebSocket Schema

WebSocket messages require a custom HTTP-like schema with headers and JSON body:

PsyService: Matchmaking/StartMatchmaking v2
PsyRequestID: PsyNetMessage_X_1
PsyToken: authentication-token
PsySessionID: session-identifier
PsySig: request-signature
PsyBuildID: 151471783
User-Agent: RL Win/250811.43331.492665 gzip
PsyEnvironment: Prod

{"playlist_id": 10, "region": "USE"}

The message format is: headers (each ending with \r\n) followed by \r\n\r\n separator, then JSON body.

Required Headers

(Values may be outdated)

Name HTTP WS Value
PsyService WS event name
PsyRequestID PsyNetMessage_X_0 Incrementing idempotency key (also for request/response matching
PsyToken WS auth token
PsySessionID WS session identifier
PsySig Base64-encoded HMAC signature of the body
PsyBuildID 151471783 Varies by build
PsyEnvironment Prod Varies by build
FeatureSet PrimeUpdate55_1 Varies by build
User-Agent RL Win/250811.43331.492665 gzip Varies by build
User-Agent RL Win/250811.43331.492665 gzip (x86_64-pc-win32) curl-7.67.0 Schannel Varies by build
Content-Type application/x-www-form-urlencoded JSON body but form type

HTTP Endpoints

The HTTP API is used only for authentication and to bootstrap the WebSocket connection. Unlike before, there is no way to "downgrade" the WebSocket connection to HTTP (AFAIK).

The base URL for HTTP requests is: https://api.rlpp.psynet.gg/rpc/.

POST Auth/AuthPlayer/v2

[!NOTE] When the API refers to a "Player ID", it typically expects the following format:

<platform>|<platform-specific account ID>|0

For example, on Steam: Steam|76561197960287930|0. The final 0 is always included, though its purpose is unknown.

Request
PsyRequestID: PsyNetMessage_X_0 
PsyBuildID: 151471783
PsyEnvironment: Prod
User-Agent: User-Agent: RL Win/250811.43331.492665 gzip (x86_64-pc-win32) curl-7.67.0 Schannel
PsySig: <HMAC signature>
Content-Type: application/x-www-form-urlencoded
        
{
  "Platform": "<platform>",
  "PlayerName": "<player name>",
  "PlayerID": "<platform account ID>",
  "Language": "INT",
  "AuthTicket": "<EOS access token>",
  "BuildRegion": "",
  "FeatureSet": "PrimeUpdate55_1", // varies by build
  "Device": "PC",
  "LocalFirstPlayerID": "<player ID>",
  "bSkipAuth": false,
  "bSetAsPrimaryAccount": true,
  "EpicAuthTicket": "<EOS auth ticket>",
  "EpicAccountID": "<Epic account ID>"
}
Response
{
  "Result": {
    "IsLastChanceAuthBan": false,
    "VerifiedPlayerName": "<player name>",
    "UseWebSocket": true, // forcing this to false doesn't do anything
    "PerConURL": "wss://...", // unused / legacy?
    "PerConURLv2": "wss://...", // url for ws connection
    "PsyToken": "<auth token>", // used by subsequent ws requests
    "SessionID": "<session id>", // used by subsequent ws requests
    "CountryRestrictions": []
  }
}

WebSocket Events

[!NOTE] For complete request/response schema definitions, refer to the godoc documentation instead.

The following is an incomplete list of WebSocket events, some events may be undocumented or partially understood.

The WebSocket endpoint URL is returned by the authentication endpoint, it is currently: wss://ws.rlpp.psynet.gg/ws/gc2.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptClubInviteRequest

type AcceptClubInviteRequest struct {
	ClubID ClubID `json:"ClubID"`
}

type AcceptClubInviteResponse

type AcceptClubInviteResponse struct {
	Success     bool        `json:"Success"`
	ClubDetails ClubDetails `json:"ClubDetails"`
}

type ActivePlaylists

type ActivePlaylists struct {
	CasualPlaylists []Playlist `json:"CasualPlaylists"`
	RankedPlaylists []Playlist `json:"RankedPlaylists"`
	XPLevelUnlocked int        `json:"XPLevelUnlocked"`
}

ActivePlaylists represents all active playlists

type AuthPlayerRequest

type AuthPlayerRequest struct {
	Platform            string `json:"Platform"`
	PlayerName          string `json:"PlayerName"`
	PlayerID            string `json:"PlayerID"`
	Language            string `json:"Language"`
	AuthTicket          string `json:"AuthTicket"`
	BuildRegion         string `json:"BuildRegion"`
	FeatureSet          string `json:"FeatureSet"`
	Device              string `json:"Device"`
	LocalFirstPlayerID  string `json:"LocalFirstPlayerID"`
	SkipAuth            bool   `json:"bSkipAuth"`
	SetAsPrimaryAccount bool   `json:"bSetAsPrimaryAccount"`
	EpicAuthTicket      string `json:"EpicAuthTicket"`
	EpicAccountID       string `json:"EpicAccountID"`
}

type AuthPlayerResponse

type AuthPlayerResponse struct {
	IsLastChanceAuthBan bool     `json:"IsLastChanceAuthBan"`
	SessionID           string   `json:"SessionID"`
	VerifiedPlayerName  string   `json:"VerifiedPlayerName"`
	UseWebSocket        bool     `json:"UseWebSocket"`
	PerConURL           string   `json:"PerConURL"`
	PerConURLv2         string   `json:"PerConURLv2"`
	PsyToken            string   `json:"PsyToken"`
	CountryRestrictions []string `json:"CountryRestrictions"`
}

type BrowseTrainingDataRequest

type BrowseTrainingDataRequest struct {
	FeaturedOnly bool `json:"bFeaturedOnly"`
}

type BrowseTrainingDataResponse

type BrowseTrainingDataResponse struct {
	TrainingData []TrainingPack `json:"TrainingData"`
}

type CanShowAvatarRequest

type CanShowAvatarRequest struct {
	PlayerIDs []PlayerID `json:"PlayerIDs"`
}

type CanShowAvatarResponse

type CanShowAvatarResponse struct {
	AllowedPlayerIDs []PlayerID `json:"AllowedPlayerIDs"`
	HiddenPlayerIDs  []PlayerID `json:"HiddenPlayerIDs"`
}

type Challenge

type Challenge struct {
	ID                 ChallengeID            `json:"ID"`
	Title              string                 `json:"Title"`
	Description        string                 `json:"Description"`
	Sort               int                    `json:"Sort"`
	GroupID            int                    `json:"GroupID"`
	XPUnlockLevel      int                    `json:"XPUnlockLevel"`
	IsRepeatable       bool                   `json:"bIsRepeatable"`
	RepeatLimit        int                    `json:"RepeatLimit"`
	IconURL            string                 `json:"IconURL"`
	BackgroundURL      *string                `json:"BackgroundURL"`
	BackgroundColor    int                    `json:"BackgroundColor"`
	Requirements       []ChallengeRequirement `json:"Requirements"`
	Rewards            ChallengeRewards       `json:"Rewards"`
	AutoClaimRewards   bool                   `json:"bAutoClaimRewards"`
	IsPremium          bool                   `json:"bIsPremium"`
	UnlockChallengeIDs []ChallengeID          `json:"UnlockChallengeIDs"`
}

Challenge represents an in-game challenge (eg, season challenges, weekly challenges, etc.)

type ChallengeID

type ChallengeID int

type ChallengeProgress

type ChallengeProgress struct {
	ID                  ChallengeID           `json:"ID"`
	CompleteCount       int                   `json:"CompleteCount"`
	IsHidden            bool                  `json:"bIsHidden"`
	NotifyCompleted     bool                  `json:"bNotifyCompleted"`
	NotifyAvailable     bool                  `json:"bNotifyAvailable"`
	NotifyNewInfo       bool                  `json:"bNotifyNewInfo"`
	RewardsAvailable    bool                  `json:"bRewardsAvailable"`
	IsComplete          bool                  `json:"bComplete"`
	RequirementProgress []RequirementProgress `json:"RequirementProgress"`
	ProgressResetTime   int64                 `json:"ProgressResetTimeUTC"`
}

ChallengeProgress represents a player's progress towards a challenge.

type ChallengeRequirement

type ChallengeRequirement struct {
	RequiredCount int `json:"RequiredCount"`
}

type ChallengeRewardProduct

type ChallengeRewardProduct struct {
	ID                 string             `json:"ID"`
	ChallengeID        ChallengeID        `json:"ChallengeID"`
	ProductID          int                `json:"ProductID"`
	InstanceID         *string            `json:"InstanceID"`
	OriginalInstanceID *string            `json:"OriginalInstanceID"`
	Attributes         []ProductAttribute `json:"Attributes"`
	SeriesID           int                `json:"SeriesID"`
	TradeHold          *string            `json:"TradeHold"`
	AddedTimestamp     *int64             `json:"AddedTimestamp"`
	UpdatedTimestamp   *int64             `json:"UpdatedTimestamp"`
	DeletedTimestamp   *int64             `json:"DeletedTimestamp"`
}

ChallengeRewardProduct represents a product reward from a challenge

type ChallengeRewards

type ChallengeRewards struct {
	XP       int                      `json:"XP"`
	Currency []interface{}            `json:"Currency"`
	Products []ChallengeRewardProduct `json:"Products"`
	Pips     int                      `json:"Pips"`
}

ChallengeRewards represents rewards for completing a challenge

type ChangePartyOwnerRequest

type ChangePartyOwnerRequest struct {
	NewOwnerID PlayerID `json:"NewOwnerID"`
	PartyID    PartyID  `json:"PartyID"`
}

type ClaimEntitlementsRequest

type ClaimEntitlementsRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
	AuthCode string   `json:"AuthCode"`
}

type ClaimEntitlementsResponse

type ClaimEntitlementsResponse struct {
	Products []interface{} `json:"Products"`
}

type ClubBadge

type ClubBadge struct {
	Stat  string `json:"Stat"`
	Badge int    `json:"Badge"`
}

ClubBadge represents a badge earned by a club

type ClubCareerStats

type ClubCareerStats struct {
	TimePlayed          int `json:"TimePlayed"`
	Goal                int `json:"Goal"`
	AerialGoal          int `json:"AerialGoal"`
	LongGoal            int `json:"LongGoal"`
	BackwardsGoal       int `json:"BackwardsGoal"`
	OvertimeGoal        int `json:"OvertimeGoal"`
	TurtleGoal          int `json:"TurtleGoal"`
	Assist              int `json:"Assist"`
	Playmaker           int `json:"Playmaker"`
	Save                int `json:"Save"`
	EpicSave            int `json:"EpicSave"`
	Savior              int `json:"Savior"`
	Shot                int `json:"Shot"`
	Center              int `json:"Center"`
	Clear               int `json:"Clear"`
	AerialHit           int `json:"AerialHit"`
	BicycleHit          int `json:"BicycleHit"`
	JuggleHit           int `json:"JuggleHit"`
	Demolish            int `json:"Demolish"`
	Demolition          int `json:"Demolition"`
	FirstTouch          int `json:"FirstTouch"`
	PoolShot            int `json:"PoolShot"`
	LowFive             int `json:"LowFive"`
	HighFive            int `json:"HighFive"`
	BreakoutDamage      int `json:"BreakoutDamage"`
	BreakoutDamageLarge int `json:"BreakoutDamageLarge"`
	HoopsSwishGoal      int `json:"HoopsSwishGoal"`
	MatchPlayed         int `json:"MatchPlayed"`
	Win                 int `json:"Win"`
}

ClubCareerStats represents career statistics for a club member

type ClubDetails

type ClubDetails struct {
	ClubID              ClubID        `json:"ClubID"`
	ClubName            string        `json:"ClubName"`
	ClubTag             string        `json:"ClubTag"`
	PrimaryColor        int           `json:"PrimaryColor"`
	AccentColor         int           `json:"AccentColor"`
	EquippedTitle       string        `json:"EquippedTitle"`
	OwnerPlayerID       PlayerID      `json:"OwnerPlayerID"`
	Members             []ClubMember  `json:"Members"`
	Badges              []ClubBadge   `json:"Badges"`
	Flags               []interface{} `json:"Flags"`
	Verified            bool          `json:"bVerified"`
	CreatedTime         int           `json:"CreatedTime"`
	LastUpdatedTime     int           `json:"LastUpdatedTime"`
	NameLastUpdatedTime int           `json:"NameLastUpdatedTime"`
	DeletedTime         int           `json:"DeletedTime"`
}

ClubDetails represents detailed information about a club

type ClubID

type ClubID int

type ClubInvite

type ClubInvite struct {
	ClubID        ClubID `json:"ClubID"`
	ClubName      string `json:"ClubName"`
	ClubTag       string `json:"ClubTag"`
	InvitedByID   string `json:"PlayerID"`
	InvitedByName string `json:"PlayerName"`
	EpicPlayerID  string `json:"EpicPlayerID"`
}

ClubInvite represents an invitation to join a club

type ClubMember

type ClubMember struct {
	PlayerID       PlayerID `json:"PlayerID"`
	PlayerName     string   `json:"PlayerName"`
	EpicPlayerID   PlayerID `json:"EpicPlayerID"`
	EpicPlayerName string   `json:"EpicPlayerName"`
	RoleID         int      `json:"RoleID"`
	CreatedTime    int      `json:"CreatedTime"`
	DeletedTime    int      `json:"DeletedTime"`
	PsyonixID      *string  `json:"PsyonixID"`
}

ClubMember represents a member of a club

type ClubSeasonalStat

type ClubSeasonalStat struct {
	Stat       string `json:"Stat"`
	Milestones []int  `json:"Milestones"`
	Value      int    `json:"Value"`
	Badge      int    `json:"Badge"`
}

ClubSeasonalStat represents a seasonal statistic with milestones

type ClubSeasonalTitle

type ClubSeasonalTitle struct {
	Badge int    `json:"Badge"`
	Title string `json:"Title"`
}

ClubSeasonalTitle represents a seasonal title

type ClubStatsData

type ClubStatsData struct {
	CareerStats            ClubCareerStats     `json:"CareerStats"`
	SeasonalStats          []ClubSeasonalStat  `json:"SeasonalStats"`
	PreviousSeasonalBadges []interface{}       `json:"PreviousSeasonalBadges"`
	SeasonalTitles         []ClubSeasonalTitle `json:"SeasonalTitles"`
}

ClubStatsData represents the complete statistics data for a club member

type CollectRewardRequest

type CollectRewardRequest struct {
	PlayerID    PlayerID    `json:"PlayerID"`
	ChallengeID ChallengeID `json:"ID"`
}

type ContainerDrop

type ContainerDrop struct {
	ProductID int       `json:"ProductID"`
	SeriesID  int       `json:"SeriesID"`
	Drops     []Product `json:"Drops"`
}

type CreateClubRequest

type CreateClubRequest struct {
	ClubName     string `json:"ClubName"`
	ClubTag      string `json:"ClubTag"`
	PrimaryColor int    `json:"PrimaryColor"`
	AccentColor  int    `json:"AccentColor"`
}

type CreateClubResponse

type CreateClubResponse struct {
	ClubDetails ClubDetails `json:"ClubDetails"`
}

type CreatePartyRequest

type CreatePartyRequest struct {
	ForcePartyonix bool `json:"bForcePartyonix"`
}

type CreatorCode

type CreatorCode struct {
	Code        string `json:"Code"`
	CreatorName string `json:"CreatorName"`
	IsActive    bool   `json:"IsActive"`
}

CreatorCode represents a creator code information

type CrossEntitlementStatus

type CrossEntitlementStatus struct {
	CrossEntitledProductIDs []int `json:"CrossEntitledProductIDs"`
	LockedProductIDs        []int `json:"LockedProductIDs"`
}

CrossEntitlementStatus represents cross-platform entitlement status

type CurrencyDrop

type CurrencyDrop struct {
	ID         int `json:"ID"`
	CurrencyID int `json:"CurrencyID"`
	Amount     int `json:"Amount"`
}

CurrencyDrop represents a currency reward

type CurrencyPrice

type CurrencyPrice struct {
	ID     int `json:"ID"`
	Amount int `json:"Amount"`
}

CurrencyPrice represents a price in the specified currency

type DeliverableCurrency

type DeliverableCurrency struct {
	ID     int `json:"ID"`
	Amount int `json:"Amount"`
}

DeliverableCurrency represents currency that can be delivered from a shop purchase

type DeliverableProduct

type DeliverableProduct struct {
	Count   int     `json:"Count"`
	Product Product `json:"Product"`
	SortID  *int    `json:"SortID"`
	IsOwned *bool   `json:"IsOwned,omitempty"`
}

DeliverableProduct represents a product that can be delivered from a shop purchase

type EGS

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

EGS provides an authentication layer for Epic Games Store -- largely adapted from https://github.com/derrod/legendary

func NewEGS

func NewEGS() *EGS

NewEGS creates a new Epic Games Store client

func (*EGS) AuthenticateWithCode

func (e *EGS) AuthenticateWithCode(authCode string) (*TokenResponse, error)

AuthenticateWithCode authenticates with EGS using an authorization code

func (*EGS) AuthenticateWithRefreshToken

func (e *EGS) AuthenticateWithRefreshToken(refreshToken string) (*TokenResponse, error)

AuthenticateWithRefreshToken authenticates with EGS using a refresh token

func (*EGS) ExchangeEOSToken

func (e *EGS) ExchangeEOSToken(exchangeCode string) (*EOSTokenResponse, error)

ExchangeEOSToken exchanges an exchange code for an EOS authentication token

func (*EGS) ExchangeEOSTokenFromSteam

func (e *EGS) ExchangeEOSTokenFromSteam(steamTicket string) (*EOSTokenResponse, error)

ExchangeEOSTokenFromSteam exchanges a Steam session ticket for an EOS authentication token

func (*EGS) GetAuthURL

func (e *EGS) GetAuthURL() string

GetAuthURL returns the EGS login URL for manual browser authentication

func (*EGS) GetExchangeCode

func (e *EGS) GetExchangeCode(accessToken string) (string, error)

GetExchangeCode converts an EGS access token into an exchange code for EOS

func (*EGS) RefreshEOSToken

func (e *EGS) RefreshEOSToken(refreshToken string) (*EOSTokenResponse, error)

RefreshEOSToken refreshes an EOS authentication token using a refresh token

func (*EGS) RevokeEOSToken

func (e *EGS) RevokeEOSToken(accessToken string) error

RevokeEOSToken revokes an EOS authentication token

type EOSTokenResponse

type EOSTokenResponse struct {
	AccessToken       string   `json:"access_token"`
	RefreshToken      string   `json:"refresh_token"`
	IDToken           string   `json:"id_token"`
	ExpiresIn         int      `json:"expires_in"`
	ExpiresAt         string   `json:"expires_at"`
	RefreshExpiresIn  int      `json:"refresh_expires_in"`
	RefreshExpiresAt  string   `json:"refresh_expires_at"`
	TokenType         string   `json:"token_type"`
	Scope             string   `json:"scope"`
	ClientID          string   `json:"client_id"`
	ApplicationID     string   `json:"application_id"`
	AccountID         string   `json:"account_id"`
	SelectedAccountID string   `json:"selected_account_id"`
	MergedAccounts    []string `json:"merged_accounts"`
	ACR               string   `json:"acr"`
	AuthTime          string   `json:"auth_time"`
}

type Event

type Event struct {
	Type    EventType
	Content string
}

Event represents connection events or raw messages from the server

type EventType

type EventType int
const (
	EventTypeDisconnected EventType = iota
	EventTypeMessage
)

type FTECheckpointCompleteRequest

type FTECheckpointCompleteRequest struct {
	PlayerID       PlayerID `json:"PlayerID"`
	GroupName      string   `json:"GroupName"`
	CheckpointName string   `json:"CheckpointName"`
}

type FTEGroupCompleteRequest

type FTEGroupCompleteRequest struct {
	PlayerID  PlayerID `json:"PlayerID"`
	GroupName string   `json:"GroupName"`
}

type FilterContentRequest

type FilterContentRequest struct {
	Content []string `json:"Content"`
	Policy  string   `json:"Policy"`
}

type FilterContentResponse

type FilterContentResponse struct {
	FilteredContent []string `json:"FilteredContent"`
}

type GetActiveChallengesRequest

type GetActiveChallengesRequest struct {
	Challenges []interface{} `json:"Challenges"`
	Folders    []interface{} `json:"Folders"`
}

type GetActiveChallengesResponse

type GetActiveChallengesResponse struct {
	Challenges []Challenge `json:"Challenges"`
}

type GetActivePlaylistsResponse

type GetActivePlaylistsResponse struct {
	CasualPlaylists []Playlist `json:"CasualPlaylists"`
	RankedPlaylists []Playlist `json:"RankedPlaylists"`
	XPLevelUnlocked int        `json:"XPLevelUnlocked"`
}

type GetBanStatusRequest

type GetBanStatusRequest struct {
	Players []PlayerID `json:"Players"`
}

type GetBanStatusResponse

type GetBanStatusResponse struct {
	BanMessages []interface{} `json:"BanMessages"`
}

type GetCatalogRequest

type GetCatalogRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
	Category string   `json:"Category"`
}

type GetCatalogResponse

type GetCatalogResponse struct {
	MTXProducts []MTXProduct `json:"MTXProducts"`
}

type GetClubDetailsRequest

type GetClubDetailsRequest struct {
	ClubID ClubID `json:"ClubID"`
}

type GetClubDetailsResponse

type GetClubDetailsResponse struct {
	ClubDetails ClubDetails `json:"ClubDetails"`
}

type GetClubInvitesResponse

type GetClubInvitesResponse struct {
	ClubInvites []ClubInvite `json:"ClubInvites"`
}

type GetClubPrivateMatchesResponse

type GetClubPrivateMatchesResponse struct {
	Servers []Server `json:"Servers"`
}

type GetClubTitleInstancesResponse

type GetClubTitleInstancesResponse struct {
	ClubTitles []string `json:"ClubTitles"`
}

type GetContainerDropTableResponse

type GetContainerDropTableResponse struct {
	ContainerDrops []ContainerDrop `json:"ContainerDrops"`
}

type GetCreatorCodeRequest

type GetCreatorCodeRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
}

type GetCreatorCodeResponse

type GetCreatorCodeResponse struct {
	CreatorCode interface{} `json:"CreatorCode"`
}

type GetCycleDataRequest

type GetCycleDataRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
}

type GetCycleDataResponse

type GetCycleDataResponse struct {
	CycleID              int           `json:"CycleID"`
	CycleEndTime         int64         `json:"CycleEndTime"`
	WeekID               int           `json:"WeekID"`
	WeekEndTime          int64         `json:"WeekEndTime"`
	WeeklyCurrencies     []interface{} `json:"WeeklyCurrencies"`
	Weeks                []interface{} `json:"Weeks"`
	TournamentCurrencyID int           `json:"TournamentCurrencyID"`
}

type GetGameServerPingListRequest

type GetGameServerPingListRequest struct {
	Regions []interface{} `json:"Regions"`
}

type GetGameServerPingListResponse

type GetGameServerPingListResponse struct {
	Servers []Server `json:"Servers"`
}

type GetMatchHistoryRequest

type GetMatchHistoryRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
}

type GetMatchHistoryResponse

type GetMatchHistoryResponse struct {
	Matches []MatchEntry `json:"Matches"`
}

type GetPlayerClubDetailsRequest

type GetPlayerClubDetailsRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
}

type GetPlayerClubDetailsResponse

type GetPlayerClubDetailsResponse struct {
	ClubDetails ClubDetails `json:"ClubDetails"`
}

type GetPlayerInfoRequest

type GetPlayerInfoRequest struct {
	PlayerID        PlayerID    `json:"PlayerID"`
	RocketPassID    int         `json:"RocketPassID"`
	RocketPassInfo  interface{} `json:"RocketPassInfo"`
	RocketPassStore interface{} `json:"RocketPassStore"`
}

type GetPlayerInfoResponse

type GetPlayerInfoResponse struct {
	StartTime       int             `json:"StartTime"`
	EndTime         int             `json:"EndTime"`
	RocketPassInfo  RocketPassInfo  `json:"RocketPassInfo"`
	RocketPassStore RocketPassStore `json:"RocketPassStore"`
}

type GetPlayerPartyInfoResponse

type GetPlayerPartyInfoResponse struct {
	Invites []interface{} `json:"Invites"`
}

type GetPlayerPrestigeRewardsRequest

type GetPlayerPrestigeRewardsRequest struct {
	PlayerID     PlayerID `json:"PlayerID"`
	RocketPassID int      `json:"RocketPassID"`
}

type GetPlayerPrestigeRewardsResponse

type GetPlayerPrestigeRewardsResponse struct {
	PrestigeRewards []PrestigeReward `json:"PrestigeRewards"`
}

type GetPlayerProductsRequest

type GetPlayerProductsRequest struct {
	PlayerID         PlayerID `json:"PlayerID"`
	UpdatedTimestamp string   `json:"UpdatedTimestamp"`
}

type GetPlayerProductsResponse

type GetPlayerProductsResponse struct {
	ProductData []Product `json:"ProductData"`
}

type GetPlayerSkillRequest

type GetPlayerSkillRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
}

type GetPlayerSkillResponse

type GetPlayerSkillResponse struct {
	Skills       []Skill      `json:"Skills"`
	RewardLevels RewardLevels `json:"RewardLevels"`
}

type GetPlayerWalletRequest

type GetPlayerWalletRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
}

type GetPlayerWalletResponse

type GetPlayerWalletResponse struct {
	Currencies []struct {
		ID               int     `json:"ID"`
		Amount           int     `json:"Amount"`
		ExpirationTime   *string `json:"ExpirationTime"`
		UpdatedTimestamp int64   `json:"UpdatedTimestamp"`
		IsTradable       bool    `json:"IsTradable"`
		TradeHold        *string `json:"TradeHold"`
	} `json:"Currencies"`
}

type GetPlayersSkillsRequest

type GetPlayersSkillsRequest struct {
	PlayerIDs []PlayerID `json:"PlayerIDs"`
}

type GetPlayersSkillsResponse

type GetPlayersSkillsResponse struct {
	Players []PlayerWithSkills `json:"Players"`
}

type GetPopulationResponse

type GetPopulationResponse struct {
	Playlists []PlaylistPopulation `json:"Playlists"`
	Timestamp int                  `json:"Timestamp"`
}

type GetProductStatusResponse

type GetProductStatusResponse struct {
	CrossEntitledProductIDs []int         `json:"CrossEntitledProductIDs"`
	LockedProductIDs        []interface{} `json:"LockedProductIDs"`
}

type GetProfileRequest

type GetProfileRequest struct {
	PlayerIDs []PlayerID `json:"PlayerIDs"`
}

type GetProfileResponse

type GetProfileResponse struct {
	PlayerData []PlayerData `json:"PlayerData"`
}

type GetPublicTournamentsRequest

type GetPublicTournamentsRequest struct {
	PlayerID    PlayerID             `json:"PlayerID"`
	Search      TournamentSearchInfo `json:"Search"`
	TeamMembers []PlayerID           `json:"TeamMembers"`
}

type GetPublicTournamentsResponse

type GetPublicTournamentsResponse struct {
	Tournaments []Tournament `json:"Tournaments"`
}

type GetRewardContentRequest

type GetRewardContentRequest struct {
	RocketPassID    int `json:"RocketPassID"`
	TierCap         int `json:"TierCap"`
	FreeMaxLevel    int `json:"FreeMaxLevel"`
	PremiumMaxLevel int `json:"PremiumMaxLevel"`
}

type GetRewardContentResponse

type GetRewardContentResponse struct {
	TierCap         int                `json:"TierCap"`
	FreeMaxLevel    int                `json:"FreeMaxLevel"`
	PremiumMaxLevel int                `json:"PremiumMaxLevel"`
	FreeRewards     []RocketPassReward `json:"FreeRewards"`
	PremiumRewards  []RocketPassReward `json:"PremiumRewards"`
}

type GetScheduleRegionRequest

type GetScheduleRegionRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
}

type GetScheduleRegionResponse

type GetScheduleRegionResponse struct {
	ScheduleRegion string `json:"ScheduleRegion"`
}

type GetScheduleRequest

type GetScheduleRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
	Region   string   `json:"Region"`
}

type GetScheduleResponse

type GetScheduleResponse struct {
	Schedules []TournamentSchedule `json:"Schedules"`
}

type GetShopCatalogueRequest

type GetShopCatalogueRequest struct {
	ShopIDs []ShopID `json:"ShopIDs"`
}

type GetShopCatalogueResponse

type GetShopCatalogueResponse struct {
	Catalogues []ShopCatalogue `json:"Catalogues"`
}

type GetShopNotificationsResponse

type GetShopNotificationsResponse struct {
	ShopNotifications []struct {
		ShopNotificationID  int                  `json:"ShopNotificationID"`
		ShopItemCostID      int                  `json:"ShopItemCostID"`
		StartTime           int64                `json:"StartTime"`
		EndTime             int64                `json:"EndTime"`
		ImageURL            *string              `json:"ImageURL"`
		Title               string               `json:"Title"`
		DeliverableProducts []DeliverableProduct `json:"DeliverableProducts"`
	} `json:"ShopNotifications"`
}

type GetSkillLeaderboardRankForUsersRequest

type GetSkillLeaderboardRankForUsersRequest struct {
	Playlist  PlaylistID `json:"Playlist"`
	PlayerIDs []PlayerID `json:"PlayerIDs"`
}

type GetSkillLeaderboardRankForUsersResponse

type GetSkillLeaderboardRankForUsersResponse struct {
	LeaderboardID string                  `json:"LeaderboardID"`
	Players       []LeaderboardRankPlayer `json:"Players"`
}

type GetSkillLeaderboardRequest

type GetSkillLeaderboardRequest struct {
	Playlist         PlaylistID `json:"Playlist"`
	DisableCrossplay bool       `json:"bDisableCrossplay"`
}

type GetSkillLeaderboardResponse

type GetSkillLeaderboardResponse struct {
	LeaderboardID string                `json:"LeaderboardID"`
	Platforms     []PlatformLeaderboard `json:"Platforms"`
}

type GetSkillLeaderboardValueForUserRequest

type GetSkillLeaderboardValueForUserRequest struct {
	Playlist PlaylistID `json:"Playlist"`
	PlayerID PlayerID   `json:"PlayerID"`
}

type GetSkillLeaderboardValueForUserResponse

type GetSkillLeaderboardValueForUserResponse struct {
	LeaderboardID string  `json:"LeaderboardID"`
	HasSkill      bool    `json:"bHasSkill"`
	MMR           float64 `json:"MMR"`
	Value         int     `json:"Value"`
}

type GetStandardShopsResponse

type GetStandardShopsResponse struct {
	Shops []Shop `json:"Shops"`
}

type GetStatLeaderboardRankForUsersRequest

type GetStatLeaderboardRankForUsersRequest struct {
	Stat      string     `json:"Stat"`
	PlayerIDs []PlayerID `json:"PlayerIDs"`
}

type GetStatLeaderboardRankForUsersResponse

type GetStatLeaderboardRankForUsersResponse struct {
	LeaderboardID string                      `json:"LeaderboardID"`
	Players       []StatLeaderboardRankPlayer `json:"Players"`
}

type GetStatLeaderboardRequest

type GetStatLeaderboardRequest struct {
	Stat             string `json:"Stat"`
	DisableCrossplay bool   `json:"bDisableCrossplay"`
}

type GetStatLeaderboardResponse

type GetStatLeaderboardResponse struct {
	LeaderboardID string                    `json:"LeaderboardID"`
	Platforms     []StatPlatformLeaderboard `json:"Platforms"`
}

type GetStatLeaderboardValueForUserRequest

type GetStatLeaderboardValueForUserRequest struct {
	Stat     string   `json:"Stat"`
	PlayerID PlayerID `json:"PlayerID"`
}

type GetStatLeaderboardValueForUserResponse

type GetStatLeaderboardValueForUserResponse struct {
	LeaderboardID string `json:"LeaderboardID"`
	HasStat       bool   `json:"bHasStat"`
	Value         string `json:"Value"`
	Rank          int    `json:"Rank"`
}

type GetStatsResponse

type GetStatsResponse struct {
	Stats ClubStatsData `json:"Stats"`
}

type GetSubRegionsRequest

type GetSubRegionsRequest struct {
	RequestRegions []interface{} `json:"RequestRegions"`
	Regions        []interface{} `json:"Regions"`
}

type GetSubRegionsResponse

type GetSubRegionsResponse struct {
	Regions []Region `json:"Regions"`
}

type GetTournamentSubscriptionsRequest

type GetTournamentSubscriptionsRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
}

type GetTradeInFiltersResponse

type GetTradeInFiltersResponse struct {
	TradeInFilters []TradeInFilter `json:"TradeInFilters"`
}

type GetTrainingMetadataRequest

type GetTrainingMetadataRequest struct {
	Codes []string `json:"Codes"`
}

type GetTrainingMetadataResponse

type GetTrainingMetadataResponse struct {
	TrainingData []TrainingPack `json:"TrainingData"`
}

type GetXPRequest

type GetXPRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
}

type GetXPResponse

type GetXPResponse struct {
	XPInfoResponse PlayerXPInfo `json:"XPInfoResponse"`
}

type InviteToClubRequest

type InviteToClubRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
}

type JoinMatchRequest

type JoinMatchRequest struct {
	JoinType   string `json:"JoinType"`
	ServerName string `json:"ServerName"`
	Password   string `json:"Password"`
}

type JoinPartyRequest

type JoinPartyRequest struct {
	JoinID  string  `json:"JoinID"`
	PartyID PartyID `json:"PartyID"`
}

type KickPartyMembersRequest

type KickPartyMembersRequest struct {
	Members    []PlayerID `json:"Members"`
	KickReason int        `json:"KickReason"`
	PartyID    PartyID    `json:"PartyID"`
}

type LeaderboardPlayer

type LeaderboardPlayer struct {
	PlayerID   PlayerID `json:"PlayerID"`
	PlayerName string   `json:"PlayerName"`
	MMR        float64  `json:"MMR"`
	Value      int      `json:"Value"`
}

LeaderboardPlayer represents a player entry in a skill leaderboard

type LeaderboardRankPlayer

type LeaderboardRankPlayer struct {
	PlayerID   string `json:"PlayerID"`
	PlayerName string `json:"PlayerName"`
	Value      int    `json:"Value"`
}

type LeaveClubRequest

type LeaveClubRequest struct {
	ClubID ClubID `json:"ClubID"`
}

type LeavePartyRequest

type LeavePartyRequest struct {
	PartyID PartyID `json:"PartyID"`
}

type MTXCartItem

type MTXCartItem struct {
	CatalogID int `json:"CatalogID"`
	Count     int `json:"Count"`
}

type MTXCurrency

type MTXCurrency struct {
	ID         int `json:"ID"`
	CurrencyID int `json:"CurrencyID"`
	Amount     int `json:"Amount"`
}

type MTXProduct

type MTXProduct struct {
	ID                int           `json:"ID"`
	Title             string        `json:"Title"`
	Description       string        `json:"Description"`
	TabTitle          string        `json:"TabTitle"`
	PriceDescription  string        `json:"PriceDescription"`
	ImageURL          string        `json:"ImageURL"`
	PlatformProductID string        `json:"PlatformProductID"`
	IsOwned           bool          `json:"bIsOwned"`
	Items             []Product     `json:"Items"`
	Currencies        []MTXCurrency `json:"Currencies"`
}

type Match

type Match struct {
	MatchGUID                  string        `json:"MatchGUID"`
	RecordStartTimestamp       int64         `json:"RecordStartTimestamp"`
	MapName                    string        `json:"MapName"`
	Playlist                   int           `json:"Playlist"`
	SecondsPlayed              float64       `json:"SecondsPlayed"`
	OvertimeSecondsPlayed      float64       `json:"OvertimeSecondsPlayed"`
	WinningTeam                int           `json:"WinningTeam"`
	Team0Score                 int           `json:"Team0Score"`
	Team1Score                 int           `json:"Team1Score"`
	OverTime                   bool          `json:"bOverTime"`
	NoContest                  bool          `json:"bNoContest"`
	Forfeit                    bool          `json:"bForfeit"`
	CustomMatchCreatorPlayerID string        `json:"CustomMatchCreatorPlayerID,omitempty"`
	ClubVsClub                 bool          `json:"bClubVsClub"`
	Mutators                   []string      `json:"Mutators"`
	Players                    []MatchPlayer `json:"Players"`
}

type MatchEntry

type MatchEntry struct {
	ReplayUrl string `json:"ReplayUrl"`
	Match     Match  `json:"Match"`
}

type MatchPlayer

type MatchPlayer struct {
	PlayerID         string      `json:"PlayerID"`
	PlayerName       string      `json:"PlayerName"`
	ConnectTimestamp int64       `json:"ConnectTimestamp"`
	JoinTimestamp    int64       `json:"JoinTimestamp"`
	LeaveTimestamp   int64       `json:"LeaveTimestamp"`
	PartyLeaderID    string      `json:"PartyLeaderID"`
	InParty          bool        `json:"InParty"`
	Abandoned        bool        `json:"bAbandoned"`
	MVP              bool        `json:"bMvp"`
	LastTeam         int         `json:"LastTeam"`
	TeamColor        string      `json:"TeamColor"`
	SecondsPlayed    float64     `json:"SecondsPlayed"`
	Score            int         `json:"Score"`
	Goals            int         `json:"Goals"`
	Assists          int         `json:"Assists"`
	Saves            int         `json:"Saves"`
	Shots            int         `json:"Shots"`
	Demolishes       int         `json:"Demolishes"`
	OwnGoals         int         `json:"OwnGoals"`
	Skills           MatchSkills `json:"Skills"`
}

type MatchSkills

type MatchSkills struct {
	Mu           float64 `json:"Mu"`
	Sigma        float64 `json:"Sigma"`
	Tier         int     `json:"Tier"`
	Division     int     `json:"Division"`
	PrevMu       float64 `json:"PrevMu"`
	PrevSigma    float64 `json:"PrevSigma"`
	PrevTier     int     `json:"PrevTier"`
	PrevDivision int     `json:"PrevDivision"`
	Valid        bool    `json:"bValid"`
}

type MatchmakingRegion

type MatchmakingRegion struct {
	Name string `json:"Name"`
	Ping int    `json:"Ping"`
}

type MatchmakingSettings

type MatchmakingSettings struct {
	Playlists         []int  `json:"Playlists"`
	Region            string `json:"Region"`
	PartyID           string `json:"PartyID"`
	BDisableCrossplay bool   `json:"bDisableCrossplay"`
}

MatchmakingSettings represents matchmaking configuration.

type PartyID

type PartyID string

type PartyInfo

type PartyInfo struct {
	PartyID         string `json:"PartyID"`
	CreatedAt       int64  `json:"CreatedAt"`
	CreatedByUserID string `json:"CreatedByUserID"`
	JoinID          string `json:"JoinID"`
}

type PartyMember

type PartyMember struct {
	PartyID  string `json:"PartyID"`
	UserID   string `json:"UserID"`
	UserName string `json:"UserName"`
	JoinedAt int64  `json:"JoinedAt"`
	Role     string `json:"Role"`
}

type PartyResponse

type PartyResponse struct {
	Info    PartyInfo     `json:"Info"`
	Members []PartyMember `json:"Members"`
}

type Platform

type Platform string

Platform represents a gaming platform

const (
	PlatformEpic   Platform = "Epic"
	PlatformSteam  Platform = "Steam"
	PlatformPS4    Platform = "PS4"
	PlatformXbox   Platform = "XboxOne"
	PlatformSwitch Platform = "Switch"
)

Platform constants

func ParsePlayerID

func ParsePlayerID(playerID string) (platform Platform, id string, err error)

ParsePlayerID parses a PlayerID string and returns its components

func (Platform) String

func (p Platform) String() string

String returns the string representation of Platform

type PlatformLeaderboard

type PlatformLeaderboard struct {
	Platform string              `json:"Platform"`
	Players  []LeaderboardPlayer `json:"Players"`
}

PlatformLeaderboard represents leaderboard data for a given platform

type PlayerData

type PlayerData struct {
	PlayerID      string `json:"PlayerID"`
	PlayerName    string `json:"PlayerName"`
	PresenceState string `json:"PresenceState"`
	PresenceInfo  string `json:"PresenceInfo"`
}

type PlayerID

type PlayerID string

PlayerID represents a unique player identifier in the format "Platform|ID|0"

func NewPlayerID

func NewPlayerID(platform Platform, id string) PlayerID

NewPlayerID creates a PlayerID for the specified platform and ID

func (PlayerID) String

func (p PlayerID) String() string

String returns the string representation of PlayerID

type PlayerProgressRequest

type PlayerProgressRequest struct {
	PlayerID     PlayerID      `json:"PlayerID"`
	ChallengeIDs []ChallengeID `json:"ChallengeIDs"`
}

type PlayerProgressResponse

type PlayerProgressResponse struct {
	ProgressData []ChallengeProgress `json:"ProgressData"`
}

type PlayerSearchPrivateMatchRequest

type PlayerSearchPrivateMatchRequest struct {
	Region     string     `json:"Region"`
	PlaylistID PlaylistID `json:"PlaylistID"`
}

type PlayerWithSkills

type PlayerWithSkills struct {
	PlayerID PlayerID `json:"PlayerID"`
	Skills   []Skill  `json:"Skills"`
}

type PlayerXPInfo

type PlayerXPInfo struct {
	TotalXP                  int    `json:"TotalXP"`
	XPLevel                  int    `json:"XPLevel"`
	XPTitle                  string `json:"XPTitle"`
	XPProgressInCurrentLevel int    `json:"XPProgressInCurrentLevel"`
	XPRequiredForNextLevel   int    `json:"XPRequiredForNextLevel"`
}

type Playlist

type Playlist struct {
	NodeID    string `json:"NodeID"`
	Playlist  int    `json:"Playlist"`
	Type      int    `json:"Type"`
	StartTime *int   `json:"StartTime"`
	EndTime   *int   `json:"EndTime"`
}

Playlist represents a game playlist

type PlaylistID

type PlaylistID int

type PlaylistPopulation

type PlaylistPopulation struct {
	PlaylistID PlaylistID `json:"PlaylistID"`
	Population int        `json:"Population"`
}

type PrestigeReward

type PrestigeReward struct {
	Level       int           `json:"Level"`
	ProductData []Product     `json:"ProductData"`
	Currency    []interface{} `json:"Currency"`
}

PrestigeReward represents a prestige reward in Rocket Pass

type PrivateMatchSearch

type PrivateMatchSearch struct {
	Name     string `json:"Name"`
	Password string `json:"Password"`
	Region   string `json:"Region"`
}

PrivateMatchSearch represents search parameters for private matches.

type Product

type Product struct {
	ProductID        int                `json:"ProductID"`
	InstanceID       *string            `json:"InstanceID"`
	Attributes       []ProductAttribute `json:"Attributes"`
	SeriesID         int                `json:"SeriesID"`
	AddedTimestamp   *int64             `json:"AddedTimestamp"`
	UpdatedTimestamp *int64             `json:"UpdatedTimestamp"`
}

Product represents a game product/item

type ProductAttribute

type ProductAttribute struct {
	Key   string      `json:"Key"`
	Value interface{} `json:"Value"`
}

ProductAttribute represents an attribute of a product

type PsyNet

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

PsyNet represents the HTTP API client, see PsyNetRPC for the WebSocket client.

func NewPsyNet

func NewPsyNet() *PsyNet

func NewPsyNetWithLogger

func NewPsyNetWithLogger(logger *slog.Logger) *PsyNet

func (*PsyNet) AuthPlayer

func (p *PsyNet) AuthPlayer(authToken string, accountID string, accountName string) (*PsyNetRPC, error)

AuthPlayer authenticates with PsyNet via EGS and returns a WebSocket connection.

func (*PsyNet) AuthPlayerSteam

func (p *PsyNet) AuthPlayerSteam(authToken string, epicAccountID string, steamAccountID string, accountName string) (*PsyNetRPC, error)

AuthPlayerSteam authenticates with PsyNet via Steam session ticket and returns a WebSocket connection.

type PsyNetRPC

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

PsyNetRPC represents an authenticated WebSocket connection.

func (*PsyNetRPC) AcceptClubInvite

func (p *PsyNetRPC) AcceptClubInvite(ctx context.Context, clubID ClubID) (*ClubDetails, error)

AcceptClubInvite accepts an invitation to join a club.

func (*PsyNetRPC) BrowseTrainingData

func (p *PsyNetRPC) BrowseTrainingData(ctx context.Context, featuredOnly bool) ([]TrainingPack, error)

BrowseTrainingData retrieves training packs.

func (*PsyNetRPC) CanShowAvatar

func (p *PsyNetRPC) CanShowAvatar(ctx context.Context, playerIDs []PlayerID) (*CanShowAvatarResponse, error)

CanShowAvatar checks if players' avatars can be shown.

func (*PsyNetRPC) ChangePartyOwner

func (p *PsyNetRPC) ChangePartyOwner(ctx context.Context, newOwnerID PlayerID, partyID PartyID) (*PartyResponse, error)

ChangePartyOwner transfers party ownership to another party member.

func (*PsyNetRPC) ClaimMTXEntitlements

func (p *PsyNetRPC) ClaimMTXEntitlements(ctx context.Context, authCode string) ([]interface{}, error)

func (*PsyNetRPC) Close

func (p *PsyNetRPC) Close() error

func (*PsyNetRPC) CollectChallengeReward

func (p *PsyNetRPC) CollectChallengeReward(ctx context.Context, challengeID ChallengeID) error

CollectChallengeReward collects rewards from a completed challenge.

func (*PsyNetRPC) CreateClub

func (p *PsyNetRPC) CreateClub(ctx context.Context, clubName, clubTag string, primaryColor, accentColor int) (*ClubDetails, error)

CreateClub creates a new club with the specified details.

func (*PsyNetRPC) CreateParty

func (p *PsyNetRPC) CreateParty(ctx context.Context) (*PartyResponse, error)

CreateParty creates a new party.

func (*PsyNetRPC) Events

func (p *PsyNetRPC) Events() <-chan *Event

Events returns a channel that receives raw messages and connection events

func (*PsyNetRPC) FTECheckpointComplete

func (p *PsyNetRPC) FTECheckpointComplete(ctx context.Context, groupName string, checkpointName string) error

FTECheckpointComplete marks a First Time Experience (FTE) checkpoint as complete.

func (*PsyNetRPC) FTEGroupComplete

func (p *PsyNetRPC) FTEGroupComplete(ctx context.Context, groupName string) error

FTEGroupComplete marks a First Time Experience (FTE) group as complete.

func (*PsyNetRPC) FilterContent

func (p *PsyNetRPC) FilterContent(ctx context.Context, content []string, policy string) ([]string, error)

func (*PsyNetRPC) GetActiveChallenges

func (p *PsyNetRPC) GetActiveChallenges(ctx context.Context) ([]Challenge, error)

GetActiveChallenges retrieves the list of currently active challenges.

func (*PsyNetRPC) GetActivePlaylists

func (p *PsyNetRPC) GetActivePlaylists(ctx context.Context) (*GetActivePlaylistsResponse, error)

GetActivePlaylists retrieves all currently active playlists.

func (*PsyNetRPC) GetBanStatus

func (p *PsyNetRPC) GetBanStatus(ctx context.Context, playerIDs []PlayerID) ([]interface{}, error)

GetBanStatus retrieves ban status information for given players.

func (*PsyNetRPC) GetChallengeProgress

func (p *PsyNetRPC) GetChallengeProgress(ctx context.Context, challengeIDs []ChallengeID) ([]ChallengeProgress, error)

GetChallengeProgress retrieves the authenticated player's progression on challenges.

func (*PsyNetRPC) GetClubDetails

func (p *PsyNetRPC) GetClubDetails(ctx context.Context, clubID ClubID) (*ClubDetails, error)

GetClubDetails retrieves detailed information about a given club.

func (*PsyNetRPC) GetClubInvites

func (p *PsyNetRPC) GetClubInvites(ctx context.Context) ([]ClubInvite, error)

GetClubInvites retrieves pending club invitations for the current player.

func (*PsyNetRPC) GetClubPrivateMatches

func (p *PsyNetRPC) GetClubPrivateMatches(ctx context.Context) ([]Server, error)

GetClubPrivateMatches retrieves private matches for a club.

func (*PsyNetRPC) GetClubStats

func (p *PsyNetRPC) GetClubStats(ctx context.Context) (*ClubStatsData, error)

GetClubStats retrieves statistics for the current player's club.

func (*PsyNetRPC) GetClubTitleInstances

func (p *PsyNetRPC) GetClubTitleInstances(ctx context.Context) ([]string, error)

GetClubTitleInstances retrieves title instances for a club.

func (*PsyNetRPC) GetContainerDropTable

func (p *PsyNetRPC) GetContainerDropTable(ctx context.Context) ([]ContainerDrop, error)

GetContainerDropTable retrieves the drop table for containers.

func (*PsyNetRPC) GetCreatorCode

func (p *PsyNetRPC) GetCreatorCode(ctx context.Context) (interface{}, error)

GetCreatorCode retrieves creator code information for the authenticated player.

func (*PsyNetRPC) GetCrossEntitlementProductStatus

func (p *PsyNetRPC) GetCrossEntitlementProductStatus(ctx context.Context) (*GetProductStatusResponse, error)

func (*PsyNetRPC) GetGameServerPingList

func (p *PsyNetRPC) GetGameServerPingList(ctx context.Context) ([]Server, error)

GetGameServerPingList retrieves ping information for game servers.

func (*PsyNetRPC) GetMTXCatalog

func (p *PsyNetRPC) GetMTXCatalog(ctx context.Context, category string) (*GetCatalogResponse, error)

GetMTXCatalog retrieves the DLC catalog (eg, starter packs).

func (*PsyNetRPC) GetMatchHistory

func (p *PsyNetRPC) GetMatchHistory(ctx context.Context) ([]MatchEntry, error)

GetMatchHistory retrieves match history for the authenticated player.

func (*PsyNetRPC) GetPlayerClubDetails

func (p *PsyNetRPC) GetPlayerClubDetails(ctx context.Context, playerID PlayerID) (*ClubDetails, error)

GetPlayerClubDetails retrieves club details for a given player.

func (*PsyNetRPC) GetPlayerPartyInfo

func (p *PsyNetRPC) GetPlayerPartyInfo(ctx context.Context) ([]interface{}, error)

GetPlayerPartyInfo pending party invitations for the authenticated player.

func (*PsyNetRPC) GetPlayerProducts

func (p *PsyNetRPC) GetPlayerProducts(ctx context.Context, updatedTimestamp int) ([]Product, error)

GetPlayerProducts retrieves all products/items owned by the authenticated player.

func (*PsyNetRPC) GetPlayerSkill

func (p *PsyNetRPC) GetPlayerSkill(ctx context.Context, playerID PlayerID) (*GetPlayerSkillResponse, error)

GetPlayerSkill retrieves skill data for a given player.

func (*PsyNetRPC) GetPlayerWallet

func (p *PsyNetRPC) GetPlayerWallet(ctx context.Context) (*GetPlayerWalletResponse, error)

GetPlayerWallet retrieves the authenticated player's wallet information.

func (*PsyNetRPC) GetPlayersSkills

func (p *PsyNetRPC) GetPlayersSkills(ctx context.Context, playerIDs []PlayerID) ([]PlayerWithSkills, error)

GetPlayersSkills retrieves skill data for given players.

func (*PsyNetRPC) GetPopulation

func (p *PsyNetRPC) GetPopulation(ctx context.Context) ([]PlaylistPopulation, error)

GetPopulation retrieves current game population (player count) by playlists.

func (*PsyNetRPC) GetProfiles

func (p *PsyNetRPC) GetProfiles(ctx context.Context, playerIDs []PlayerID) ([]PlayerData, error)

GetProfiles retrieves profile information for given players.

func (*PsyNetRPC) GetPublicTournaments

func (p *PsyNetRPC) GetPublicTournaments(ctx context.Context, searchInfo TournamentSearchInfo, teamMembers []PlayerID) ([]Tournament, error)

GetPublicTournaments retrieves a list of public tournaments for the authenticated player.

func (*PsyNetRPC) GetRocketPassPlayerInfo

func (p *PsyNetRPC) GetRocketPassPlayerInfo(ctx context.Context, rocketPassID int) (*GetPlayerInfoResponse, error)

GetRocketPassPlayerInfo retrieves Rocket Pass information for the authenticated player.

func (*PsyNetRPC) GetRocketPassPrestigeRewards

func (p *PsyNetRPC) GetRocketPassPrestigeRewards(ctx context.Context, rocketPassID int) ([]PrestigeReward, error)

GetRocketPassPrestigeRewards retrieves prestige rewards for the authenticated player's Rocket Pass.

func (*PsyNetRPC) GetRocketPassRewardContent

func (p *PsyNetRPC) GetRocketPassRewardContent(ctx context.Context, rocketPassID, tierCap, freeMaxLevel, premiumMaxLevel int) (*GetRewardContentResponse, error)

GetRocketPassRewardContent retrieves the reward content for the given Rocket Pass.

func (*PsyNetRPC) GetShopCatalogue

func (p *PsyNetRPC) GetShopCatalogue(ctx context.Context, shopIDs []ShopID) (*GetShopCatalogueResponse, error)

GetShopCatalogue retrieves detailed information about items available in specified shops.

func (*PsyNetRPC) GetShopNotifications

func (p *PsyNetRPC) GetShopNotifications(ctx context.Context) (*GetShopNotificationsResponse, error)

GetShopNotifications retrieves current shop notifications.

func (*PsyNetRPC) GetSkillLeaderboard

func (p *PsyNetRPC) GetSkillLeaderboard(ctx context.Context, playlist PlaylistID, disableCrossplay bool) (*GetSkillLeaderboardResponse, error)

GetSkillLeaderboard retrieves the skill leaderboard on all platforms for a given playlist.

func (*PsyNetRPC) GetSkillLeaderboardRankForUsers

func (p *PsyNetRPC) GetSkillLeaderboardRankForUsers(ctx context.Context, playlist PlaylistID, playerIDs []PlayerID) (*GetSkillLeaderboardRankForUsersResponse, error)

GetSkillLeaderboardRankForUsers retrieves rank information for multiple players on the skill leaderboard.

func (*PsyNetRPC) GetSkillLeaderboardValueForUser

func (p *PsyNetRPC) GetSkillLeaderboardValueForUser(ctx context.Context, playlist PlaylistID, playerID PlayerID) (*GetSkillLeaderboardValueForUserResponse, error)

GetSkillLeaderboardValueForUser retrieves a player's position and data on the skill leaderboard for a given playlist.

func (*PsyNetRPC) GetStandardShops

func (p *PsyNetRPC) GetStandardShops(ctx context.Context) (*GetStandardShopsResponse, error)

GetStandardShops retrieves the list of available shops.

func (*PsyNetRPC) GetStatLeaderboard

func (p *PsyNetRPC) GetStatLeaderboard(ctx context.Context, statName string, disableCrossplay bool) (*GetStatLeaderboardResponse, error)

GetStatLeaderboard retrieves the stats leaderboard for a given stat.

func (*PsyNetRPC) GetStatLeaderboardRankForUsers

func (p *PsyNetRPC) GetStatLeaderboardRankForUsers(ctx context.Context, statName string, playerIDs []PlayerID) (*GetStatLeaderboardRankForUsersResponse, error)

func (*PsyNetRPC) GetStatLeaderboardValueForUser

func (p *PsyNetRPC) GetStatLeaderboardValueForUser(ctx context.Context, statName string, playerID PlayerID) (*GetStatLeaderboardValueForUserResponse, error)

GetStatLeaderboardValueForUser retrieves a player's position and data on a stat leaderboard.

func (*PsyNetRPC) GetSubRegions

func (p *PsyNetRPC) GetSubRegions(ctx context.Context) ([]Region, error)

GetSubRegions retrieves available server regions.

func (*PsyNetRPC) GetTournamentCycleData

func (p *PsyNetRPC) GetTournamentCycleData(ctx context.Context) (*GetCycleDataResponse, error)

GetTournamentCycleData retrieves tournament cycle data for the authenticated player.

func (*PsyNetRPC) GetTournamentSchedule

func (p *PsyNetRPC) GetTournamentSchedule(ctx context.Context, region string) ([]TournamentSchedule, error)

GetTournamentSchedule retrieves the tournament schedule for a given region.

func (*PsyNetRPC) GetTournamentScheduleRegion

func (p *PsyNetRPC) GetTournamentScheduleRegion(ctx context.Context) (string, error)

GetTournamentScheduleRegion retrieves the tournament schedule region for the authenticated player.

func (*PsyNetRPC) GetTournamentSubscriptions

func (p *PsyNetRPC) GetTournamentSubscriptions(ctx context.Context) (interface{}, error)

GetTournamentSubscriptions retrieves the authenticated player's tournament subscriptions.

func (*PsyNetRPC) GetTradeInFilters

func (p *PsyNetRPC) GetTradeInFilters(ctx context.Context) ([]TradeInFilter, error)

GetTradeInFilters retrieves trade-in filters.

func (*PsyNetRPC) GetTrainingMetadata

func (p *PsyNetRPC) GetTrainingMetadata(ctx context.Context, codes []string) ([]TrainingPack, error)

GetTrainingMetadata retrieves training pack metadata for the given codes.

func (*PsyNetRPC) GetXP

func (p *PsyNetRPC) GetXP(ctx context.Context) (*PlayerXPInfo, error)

GetXP retrieves XP information for the authenticated player.

func (*PsyNetRPC) InviteToClub

func (p *PsyNetRPC) InviteToClub(ctx context.Context, playerID PlayerID) error

InviteToClub invites a player to join a club. Note: ClubID is inferred from the current player's club context

func (*PsyNetRPC) IsConnected

func (p *PsyNetRPC) IsConnected() bool

func (*PsyNetRPC) JoinMatch

func (p *PsyNetRPC) JoinMatch(ctx context.Context, joinType, serverName, password string) (interface{}, error)

JoinMatch joins a private match.

func (*PsyNetRPC) JoinParty

func (p *PsyNetRPC) JoinParty(ctx context.Context, joinID string, partyID PartyID) (*PartyResponse, error)

JoinParty joins an existing party by join ID or party ID.

func (*PsyNetRPC) KickPartyMembers

func (p *PsyNetRPC) KickPartyMembers(ctx context.Context, members []PlayerID, kickReason int, partyID PartyID) error

KickPartyMembers removes members from the party.

func (*PsyNetRPC) LeaveClub

func (p *PsyNetRPC) LeaveClub(ctx context.Context) error

LeaveClub leaves a club.

func (*PsyNetRPC) LeaveParty

func (p *PsyNetRPC) LeaveParty(ctx context.Context, partyID PartyID) error

LeaveParty leaves a party by ID.

func (*PsyNetRPC) PlayerCancelMatchmaking

func (p *PsyNetRPC) PlayerCancelMatchmaking(ctx context.Context) error

PlayerCancelMatchmaking cancels ongoing matchmaking for the authenticated player.

func (*PsyNetRPC) PlayerSearchPrivateMatch

func (p *PsyNetRPC) PlayerSearchPrivateMatch(ctx context.Context, region string, playlistID PlaylistID) error

PlayerSearchPrivateMatch searches for private matches.

func (*PsyNetRPC) RecordMetrics

func (p *PsyNetRPC) RecordMetrics(ctx context.Context, request *RecordMetricsRequest) error

func (*PsyNetRPC) RegisterTournament

func (p *PsyNetRPC) RegisterTournament(ctx context.Context, tournamentID TournamentID, credentials TournamentCredentials) (*Tournament, error)

RegisterTournament registers the authenticated player for a tournament.

func (*PsyNetRPC) RejectClubInvite

func (p *PsyNetRPC) RejectClubInvite(ctx context.Context, clubID ClubID) error

RejectClubInvite rejects an invitation to join a club.

func (*PsyNetRPC) RelayToServer

func (p *PsyNetRPC) RelayToServer(ctx context.Context, request *RelayToServerRequest) error

func (*PsyNetRPC) ReportPlayer

func (p *PsyNetRPC) ReportPlayer(ctx context.Context, offender PlayerID, reason []int, gameID string) error

ReportPlayer reports a player.

func (*PsyNetRPC) SendPartyChatMessage

func (p *PsyNetRPC) SendPartyChatMessage(ctx context.Context, message string, partyID PartyID) error

SendPartyChatMessage sends a chat message to the party.

func (*PsyNetRPC) SendPartyInvite

func (p *PsyNetRPC) SendPartyInvite(ctx context.Context, inviteeID PlayerID, partyID PartyID) error

SendPartyInvite sends an invitation to join the party.

func (*PsyNetRPC) SendPartyJoinRequest

func (p *PsyNetRPC) SendPartyJoinRequest(ctx context.Context, playerID PlayerID) error

SendPartyJoinRequest sends a request to join another player's party.

func (*PsyNetRPC) SendPartyMessage

func (p *PsyNetRPC) SendPartyMessage(ctx context.Context, message string, partyID PartyID) error

SendPartyMessage sends an encoded message to the party.

func (*PsyNetRPC) StartMTXPurchase

func (p *PsyNetRPC) StartMTXPurchase(ctx context.Context, cartItems []MTXCartItem) error

StartMTXPurchase initiates a DLC purchase via EGS.

func (*PsyNetRPC) StartMatchmaking

func (p *PsyNetRPC) StartMatchmaking(ctx context.Context, playlists []int, region []MatchmakingRegion, disableCrossplay bool, partyID PartyID, partyMembers []PlayerID) (int, error)

StartMatchmaking starts matchmaking for given playlists, returns the estimated queue time.

func (*PsyNetRPC) TradeIn

func (p *PsyNetRPC) TradeIn(ctx context.Context, productInstances []string) ([]Product, error)

TradeIn trades in multiple items for new items.

func (*PsyNetRPC) UnlockContainer

func (p *PsyNetRPC) UnlockContainer(ctx context.Context, instanceIDs []string) ([]Product, error)

UnlockContainer unlocks containers returns the dropped items.

func (*PsyNetRPC) UnsubscribeTournament

func (p *PsyNetRPC) UnsubscribeTournament(ctx context.Context, tournamentID TournamentID, unsubscribeAnyRegisteredTournament bool, teamMembers []PlayerID) error

UnsubscribeTournament unsubscribes the authenticated player from a tournament.

func (*PsyNetRPC) UpdateClub

func (p *PsyNetRPC) UpdateClub(ctx context.Context, request *UpdateClubRequest) (*ClubDetails, error)

UpdateClub updates the details of an existing club.

func (*PsyNetRPC) UpdatePlayerPlaylist

func (p *PsyNetRPC) UpdatePlayerPlaylist(ctx context.Context, playlistID PlaylistID, numLocalPlayers int) error

type PsyRequest

type PsyRequest struct {
	Service   string      `json:"PsyService"`
	Sig       string      `json:"PsySig"`
	RequestID string      `json:"PsyRequestID"`
	Data      interface{} `json:"-"`
}

type PsyResponse

type PsyResponse struct {
	ResponseID string          `json:"PsyResponseID"`
	Result     json.RawMessage `json:"Result"`
	Error      *psyNetError    `json:"Error"`
}

type RecordMetricsRequest

type RecordMetricsRequest struct {
	AppSessionID       string  `json:"AppSessionID"`
	LevelSessionID     string  `json:"LevelSessionID"`
	CurrentTimeSeconds float64 `json:"CurrentTimeSeconds"`
	FirstEventIndex    int     `json:"FirstEventIndex"`
	Events             []struct {
		PlayerID    PlayerID `json:"PlayerID,omitempty"`
		TimeSeconds float64  `json:"TimeSeconds"`
		Version     int      `json:"Version"`
		EventName   string   `json:"EventName"`
		EventData   string   `json:"EventData"`
	} `json:"Events"`
}

type Region

type Region struct {
	Region     string   `json:"Region"`
	Label      string   `json:"Label"`
	SubRegions []string `json:"SubRegions"`
}

type RegisterTournamentRequest

type RegisterTournamentRequest struct {
	PlayerID     PlayerID              `json:"PlayerID"`
	TournamentID TournamentID          `json:"TournamentID"`
	Credentials  TournamentCredentials `json:"Credentials,omitempty"`
}

type RegisterTournamentResponse

type RegisterTournamentResponse struct {
	Tournament Tournament `json:"Tournament"`
}

type RejectClubInviteRequest

type RejectClubInviteRequest struct {
	ClubID ClubID `json:"ClubID"`
}

type RelayToServerRequest

type RelayToServerRequest struct {
	DSConnectToken string `json:"DSConnectToken"`
	ReservationID  string `json:"ReservationID"`
	MessageType    string `json:"MessageType"`
	MessagePayload struct {
		Settings struct {
			MatchType        int    `json:"MatchType"`
			PlaylistID       int    `json:"PlaylistID"`
			BFriendJoin      bool   `json:"bFriendJoin"`
			BMigration       bool   `json:"bMigration"`
			BRankedReconnect bool   `json:"bRankedReconnect"`
			Password         string `json:"Password"`
		} `json:"Settings"`
		MapPrefs []struct {
			PlayerID    string `json:"PlayerID"`
			MapLikes    []int  `json:"MapLikes"`
			MapDislikes []int  `json:"MapDislikes"`
		} `json:"MapPrefs"`
		Players []struct {
			PlayerID      string  `json:"PlayerID"`
			PlayerName    string  `json:"PlayerName"`
			SkillMu       float64 `json:"SkillMu"`
			SkillSigma    float64 `json:"SkillSigma"`
			Tier          int     `json:"Tier"`
			BRemotePlayer bool    `json:"bRemotePlayer"`
			Loadout       []int   `json:"Loadout"`
			MapLikes      []int   `json:"MapLikes"`
			MapDislikes   []int   `json:"MapDislikes"`
			ClubID        int     `json:"ClubID"`
		} `json:"Players"`
		PartyLeaderID     string `json:"PartyLeaderID"`
		ReservationID     string `json:"ReservationID"`
		BDisableCrossPlay bool   `json:"bDisableCrossPlay"`
	} `json:"MessagePayload"`
}

type Report

type Report struct {
	Reporter        PlayerID `json:"Reporter"`
	Offender        PlayerID `json:"Offender"`
	ReasonIDs       []int    `json:"ReasonIDs"`
	ReportTimestamp float64  `json:"ReportTimestamp"`
}

type ReportReason

type ReportReason struct {
	ReasonID    int    `json:"ReasonID"`
	Description string `json:"Description"`
}

ReportReason represents reasons for reporting a player

type ReportRequest

type ReportRequest struct {
	Reports []Report `json:"Reports"`
	GameID  string   `json:"GameID"`
}

type ReportResponse

type ReportResponse struct {
	Success  bool   `json:"Success"`
	ReportID string `json:"ReportID"`
	Message  string `json:"Message"`
}

type RequirementProgress

type RequirementProgress struct {
	ProgressCount  int `json:"ProgressCount"`
	ProgressChange int `json:"ProgressChange"`
}

type RewardLevels

type RewardLevels struct {
	SeasonLevel     int `json:"SeasonLevel"`
	SeasonLevelWins int `json:"SeasonLevelWins"`
}

RewardLevels represents seasonal reward level information

type RocketPassBundle

type RocketPassBundle struct {
	PurchasableID        int     `json:"PurchasableID"`
	CurrencyID           int     `json:"CurrencyID"`
	CurrencyCost         int     `json:"CurrencyCost"`
	OriginalCurrencyCost *int    `json:"OriginalCurrencyCost"`
	Tiers                int     `json:"Tiers"`
	Savings              int     `json:"Savings"`
	ImageURL             *string `json:"ImageUrl"`
}

RocketPassBundle represents a purchasable bundle in the Rocket Pass

type RocketPassInfo

type RocketPassInfo struct {
	TierLevel    int     `json:"TierLevel"`
	OwnsPremium  bool    `json:"bOwnsPremium"`
	XPMultiplier float64 `json:"XPMultiplier"`
	Pips         int     `json:"Pips"`
	PipsPerLevel int     `json:"PipsPerLevel"`
}

RocketPassInfo represents information about a player's Rocket Pass progress

type RocketPassReward

type RocketPassReward struct {
	Tier          int            `json:"Tier"`
	ProductData   []Product      `json:"ProductData"`
	XPRewards     []XPReward     `json:"XPRewards"`
	CurrencyDrops []CurrencyDrop `json:"CurrencyDrops"`
}

RocketPassReward represents rewards available at specified tiers

type RocketPassStore

type RocketPassStore struct {
	Tiers   []RocketPassTier   `json:"Tiers"`
	Bundles []RocketPassBundle `json:"Bundles"`
}

RocketPassStore represents purchasable items in the Rocket Pass store

type RocketPassTier

type RocketPassTier struct {
	PurchasableID        int     `json:"PurchasableID"`
	CurrencyID           int     `json:"CurrencyID"`
	CurrencyCost         int     `json:"CurrencyCost"`
	OriginalCurrencyCost *int    `json:"OriginalCurrencyCost"`
	Tiers                int     `json:"Tiers"`
	Savings              int     `json:"Savings"`
	ImageURL             *string `json:"ImageUrl"`
}

RocketPassTier represents a purchasable tier in the Rocket Pass

type SendPartyChatMessageRequest

type SendPartyChatMessageRequest struct {
	Message string  `json:"Message"`
	PartyID PartyID `json:"PartyID"`
}

type SendPartyChatMessageResponse

type SendPartyChatMessageResponse struct {
	Success   bool   `json:"Success"`
	MessageID string `json:"MessageID"`
}

type SendPartyInviteRequest

type SendPartyInviteRequest struct {
	InviteeID PlayerID `json:"InviteeID"`
	PartyID   PartyID  `json:"PartyID"`
}

type SendPartyJoinRequestRequest

type SendPartyJoinRequestRequest struct {
	PlayerID PlayerID `json:"PlayerID"`
}

type SendPartyMessageRequest

type SendPartyMessageRequest struct {
	Message string  `json:"Message"`
	PartyID PartyID `json:"PartyID"`
}

type SendPartyMessageResponse

type SendPartyMessageResponse struct {
	Success   bool   `json:"Success"`
	MessageID string `json:"MessageID"`
}

type Server

type Server struct {
	Region    string `json:"Region"`
	Host      string `json:"Host"`
	Port      string `json:"Port"`
	SubRegion string `json:"SubRegion"`
}

type Shop

type Shop struct {
	ID        ShopID  `json:"ID"`
	Type      string  `json:"Type"`
	StartDate int64   `json:"StartDate"`
	EndDate   *int64  `json:"EndDate"`
	LogoURL   *string `json:"LogoURL"`
	Name      *string `json:"Name"`
	Title     *string `json:"Title"`
}

Shop represents a shop in the game

type ShopCatalogue

type ShopCatalogue struct {
	ShopID    ShopID     `json:"ShopID"`
	ShopItems []ShopItem `json:"ShopItems"`
}

ShopCatalogue represents the catalogue for a given shop

type ShopID

type ShopID int

type ShopItem

type ShopItem struct {
	ShopItemID             int                   `json:"ShopItemID"`
	StartDate              int64                 `json:"StartDate"`
	EndDate                *int64                `json:"EndDate"`
	MaxQuantityPerPlayer   *int                  `json:"MaxQuantityPerPlayer"`
	ImageURL               *string               `json:"ImageURL"`
	DeliverableProducts    []DeliverableProduct  `json:"DeliverableProducts"`
	DeliverableCurrencies  []DeliverableCurrency `json:"DeliverableCurrencies"`
	Costs                  []ShopItemCost        `json:"Costs"`
	ShopItemLocations      []int                 `json:"ShopItemLocations"`
	Title                  *string               `json:"Title"`
	Description            *string               `json:"Description"`
	FeaturedCollections    []interface{}         `json:"FeaturedCollections"`
	Attributes             []ProductAttribute    `json:"Attributes"`
	Disclaimer             *string               `json:"Disclaimer"`
	PurchasedQuantity      int                   `json:"PurchasedQuantity"`
	Purchasable            bool                  `json:"Purchasable"`
	MaxQuantityPerDay      *int                  `json:"MaxQuantityPerDay"`
	DailyPurchasedQuantity *int                  `json:"DailyPurchasedQuantity"`
}

ShopItem represents an item available for purchase in a shop

type ShopItemCost

type ShopItemCost struct {
	ResetTime      *int64          `json:"ResetTime"`
	ShopItemCostID int             `json:"ShopItemCostID"`
	Discount       *interface{}    `json:"Discount"`
	BulkDiscounts  *interface{}    `json:"BulkDiscounts"`
	StartDate      int64           `json:"StartDate"`
	EndDate        *int64          `json:"EndDate"`
	Price          []CurrencyPrice `json:"Price"`
	SortID         int             `json:"SortID"`
	DisplayTypeID  int             `json:"DisplayTypeID"`
	ShopScaledCost interface{}     `json:"ShopScaledCost"`
}

ShopItemCost represents the cost of a shop item

type Skill

type Skill struct {
	Playlist               int     `json:"Playlist"`
	Mu                     float64 `json:"Mu"`
	Sigma                  float64 `json:"Sigma"`
	Tier                   int     `json:"Tier"`
	Division               int     `json:"Division"`
	MMR                    float64 `json:"MMR"`
	WinStreak              int     `json:"WinStreak"`
	MatchesPlayed          int     `json:"MatchesPlayed"`
	PlacementMatchesPlayed int     `json:"PlacementMatchesPlayed"`
}

Skill represents a player's skill data for the specified playlist

type StartMatchmakingRequest

type StartMatchmakingRequest struct {
	Regions          []MatchmakingRegion `json:"Regions"`
	Playlists        []int               `json:"Playlists"`
	SecondsSearching int                 `json:"SecondsSearching"`
	CurrentServerID  string              `json:"CurrentServerID"`
	DisableCrossplay bool                `json:"bDisableCrossplay"`
	PartyID          PartyID             `json:"PartyID"`
	PartyMembers     []PlayerID          `json:"PartyMembers"`
}

type StartMatchmakingResponse

type StartMatchmakingResponse struct {
	EstimatedQueueTime int `json:"EstimatedQueueTime"`
}

type StartPurchaseRequest

type StartPurchaseRequest struct {
	Language  string        `json:"Language"`
	PlayerID  PlayerID      `json:"PlayerID"`
	CartItems []MTXCartItem `json:"CartItems"`
}

type StatLeaderboardPlayer

type StatLeaderboardPlayer struct {
	PlayerID   PlayerID `json:"PlayerID"`
	PlayerName string   `json:"PlayerName"`
	Value      float64  `json:"Value"`
	Rank       int      `json:"Rank"`
}

StatLeaderboardPlayer represents a player entry in a stat leaderboard

type StatLeaderboardRankPlayer

type StatLeaderboardRankPlayer struct {
	PlayerID   PlayerID `json:"PlayerID"`
	PlayerName string   `json:"PlayerName"`
	Value      float64  `json:"Value"`
	Rank       int      `json:"Rank"`
}

type StatPlatformLeaderboard

type StatPlatformLeaderboard struct {
	Platform string                  `json:"Platform"`
	Players  []StatLeaderboardPlayer `json:"Players"`
}

StatPlatformLeaderboard represents leaderboard data for a given platform

type TokenResponse

type TokenResponse struct {
	AccessToken    string `json:"access_token"`
	RefreshToken   string `json:"refresh_token"`
	ExpiresIn      int    `json:"expires_in"`
	ExpiresAt      string `json:"expires_at"`
	TokenType      string `json:"token_type"`
	ClientID       string `json:"client_id"`
	InternalClient bool   `json:"internal_client"`
	ClientService  string `json:"client_service"`
	AccountID      string `json:"account_id"`
	DisplayName    string `json:"displayName"`
	App            string `json:"app"`
	InAppID        string `json:"in_app_id"`
	DeviceID       string `json:"device_id"`
}

type Tournament

type Tournament struct {
	// Same as TournamentID but this is returned as an int for some reason
	ID                     int      `json:"ID"`
	Title                  string   `json:"Title"`
	CreatorName            string   `json:"CreatorName"`
	CreatorPlayerID        string   `json:"CreatorPlayerID"`
	StartTime              int      `json:"StartTime"`
	GenerateBracketTime    *int     `json:"GenerateBracketTime"`
	MaxBracketSize         int      `json:"MaxBracketSize"`
	RankMin                int      `json:"RankMin"`
	RankMax                int      `json:"RankMax"`
	Region                 string   `json:"Region"`
	Platforms              []string `json:"Platforms"`
	GameTags               string   `json:"GameTags"`
	GameMode               int      `json:"GameMode"`
	GameModes              []int    `json:"GameModes"`
	TeamSize               int      `json:"TeamSize"`
	MapSetName             *string  `json:"MapSetName"`
	DisabledMaps           []string `json:"DisabledMaps"`
	SeriesLength           int      `json:"SeriesLength"`
	FinalSeriesLength      int      `json:"FinalSeriesLength"`
	SeriesRoundLengths     []int    `json:"SeriesRoundLengths"`
	SeedingType            int      `json:"SeedingType"`
	TieBreaker             int      `json:"TieBreaker"`
	Public                 bool     `json:"bPublic"`
	TeamsRegistered        int      `json:"TeamsRegistered"`
	ScheduleID             *int64   `json:"ScheduleID"`
	IsSchedulingTournament bool     `json:"IsSchedulingTournament"`
}

type TournamentCredentials

type TournamentCredentials struct {
	Title    string `json:"Title"`
	Password string `json:"Password"`
}

type TournamentFormat

type TournamentFormat struct {
	Type        string `json:"Type"`
	TeamSize    int    `json:"TeamSize"`
	MaxRounds   int    `json:"MaxRounds"`
	BracketType string `json:"BracketType"`
}

TournamentFormat represents tournament format settings

type TournamentID

type TournamentID string

type TournamentRequirements

type TournamentRequirements struct {
	MinRank        int     `json:"MinRank"`
	MaxRank        int     `json:"MaxRank"`
	MinLevel       int     `json:"MinLevel"`
	RequiredRegion *string `json:"RequiredRegion"`
}

TournamentRequirements represents requirements to join a tournament

type TournamentReward

type TournamentReward struct {
	Rank         int           `json:"Rank"`
	Products     []Product     `json:"Products"`
	Currency     []interface{} `json:"Currency"`
	TournamentXP int           `json:"TournamentXP"`
}

TournamentReward represents a reward for tournament participation

type TournamentSchedule

type TournamentSchedule struct {
	Time        int          `json:"Time"`
	ScheduleID  int          `json:"ScheduleID"`
	UpdateSkill bool         `json:"bUpdateSkill"`
	Tournaments []Tournament `json:"Tournaments"`
}

TournamentSchedule represents tournament schedule information

type TournamentSearchInfo

type TournamentSearchInfo struct {
	Text               string   `json:"Text"`
	RankMin            int      `json:"RankMin"`
	RankMax            int      `json:"RankMax"`
	GameModes          []int    `json:"GameModes"`
	Regions            []string `json:"Regions"`
	TeamSize           int      `json:"TeamSize"`
	BracketSize        int      `json:"BracketSize"`
	EnableCrossplay    bool     `json:"bEnableCrossplay"`
	StartTime          string   `json:"StartTime"`
	EndTime            string   `json:"EndTime"`
	ShowFull           bool     `json:"bShowFull"`
	ShowIneligibleRank bool     `json:"bShowIneligibleRank"`
}

type TournamentSubscription

type TournamentSubscription struct {
	TournamentID TournamentID `json:"TournamentID"`
	PlayerID     PlayerID     `json:"PlayerID"`
	SubscribedAt int          `json:"SubscribedAt"`
	Status       string       `json:"Status"`
}

TournamentSubscription represents a player's tournament subscription

type TradeInFilter

type TradeInFilter struct {
	ID               int      `json:"ID"`
	Label            string   `json:"Label"`
	SeriesIDs        []int    `json:"SeriesIDs"`
	Blueprint        bool     `json:"bBlueprint"`
	TradeInQualities []string `json:"TradeInQualities"`
}

type TradeInRequest

type TradeInRequest struct {
	PlayerID         PlayerID `json:"PlayerID"`
	ProductInstances []string `json:"ProductInstances"`
}

type TradeInResponse

type TradeInResponse struct {
	Drops []Product `json:"Drops"`
}

type TradeInResult

type TradeInResult struct {
	ReceivedItems []Product `json:"ReceivedItems"`
	TradedItems   []string  `json:"TradedItems"`
}

TradeInResult represents the result of trading in items

type TrainingPack

type TrainingPack struct {
	Code            string   `json:"Code"`
	TMName          string   `json:"TM_Name"`
	Type            int      `json:"Type"`
	Difficulty      int      `json:"Difficulty"`
	CreatorName     string   `json:"CreatorName"`
	CreatorPlayerID string   `json:"CreatorPlayerID,omitempty"`
	MapName         string   `json:"MapName"`
	Tags            []string `json:"Tags"`
	NumRounds       int      `json:"NumRounds"`
	TMGuid          string   `json:"TM_Guid"`
	CreatedAt       int64    `json:"CreatedAt"`
	UpdatedAt       int64    `json:"UpdatedAt"`
}

type UnlockContainerRequest

type UnlockContainerRequest struct {
	PlayerID       PlayerID `json:"PlayerID"`
	InstanceIDs    []string `json:"InstanceIDs"`
	KeyInstanceIDs []string `json:"KeyInstanceIDs"`
}

type UnlockContainerResponse

type UnlockContainerResponse struct {
	Drops []Product `json:"Drops"`
}

type UnlockResult

type UnlockResult struct {
	UnlockedItems []Product `json:"UnlockedItems"`
	UsedKeys      []string  `json:"UsedKeys"`
	RemainingKeys []Product `json:"RemainingKeys"`
}

UnlockResult represents the result of unlocking a container

type UnsubscribeTournamentRequest

type UnsubscribeTournamentRequest struct {
	PlayerID                           PlayerID     `json:"PlayerID"`
	TournamentID                       TournamentID `json:"TournamentID"`
	UnsubscribeAnyRegisteredTournament bool         `json:"bUnsubscribeAnyRegisteredTournament"`
	TeamMembers                        []PlayerID   `json:"TeamMembers"`
}

type UpdateClubRequest

type UpdateClubRequest struct {
	ClubName      *string `json:"ClubName,omitempty"`
	ClubTag       *string `json:"ClubTag,omitempty"`
	PrimaryColor  *int    `json:"PrimaryColor,omitempty"`
	AccentColor   *int    `json:"AccentColor,omitempty"`
	EquippedTitle *string `json:"EquippedTitle,omitempty"`
}

type UpdateClubResponse

type UpdateClubResponse struct {
	ClubDetails ClubDetails `json:"ClubDetails"`
}

type UpdatePlayerPlaylistRequest

type UpdatePlayerPlaylistRequest struct {
	Playlist        PlaylistID `json:"Playlist"`
	NumLocalPlayers int        `json:"NumLocalPlayers"`
}

type XPReward

type XPReward struct {
	Name   string  `json:"Name"`
	Amount float64 `json:"Amount"`
}

XPReward represents an XP-based reward

Directories

Path Synopsis
examples
allrequests command
auth command
itemshop command
steam command

Jump to

Keyboard shortcuts

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