This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 4
- Package version: 1.0.0
- Generator version: 7.17.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/contextPut the package under your project folder and add the following in import:
import faceit "github.com/mconnat/go-faceit"To use a proxy, set the environment variable HTTP_PROXY:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value faceit.ContextServerIndex of type int.
ctx := context.WithValue(context.Background(), faceit.ContextServerIndex, 1)Templated server URL is formatted using default variables from configuration or from context value faceit.ContextServerVariables of type map[string]string.
ctx := context.WithValue(context.Background(), faceit.ContextServerVariables, map[string]string{
"basePath": "v2",
})Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers map in the Configuration.
An operation is uniquely identified by "{classname}Service.{nickname}" string.
Similar rules for overriding default operation server index and variables applies by using faceit.ContextOperationServerIndices and faceit.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), faceit.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), faceit.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})All URIs are relative to https://open.faceit.com/data/v4
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ChampionshipsAPI | GetChampionship | Get /championships/{championship_id} | Retrieve championship details |
| ChampionshipsAPI | GetChampionshipMatches | Get /championships/{championship_id}/matches | Retrieve all matches of a championship |
| ChampionshipsAPI | GetChampionshipResults | Get /championships/{championship_id}/results | Retrieve all results of a championship |
| ChampionshipsAPI | GetChampionshipSubscriptions | Get /championships/{championship_id}/subscriptions | Retrieve all subscriptions of a championship |
| ChampionshipsAPI | GetChampionships | Get /championships | Retrieve all championships of a game |
| GamesAPI | GetAllGames | Get /games | Retrieve details of all games on FACEIT |
| GamesAPI | GetGame | Get /games/{game_id} | Retrieve game details |
| GamesAPI | GetGameMatchmakings | Get /games/{gameId}/matchmakings | Retrieve details of all matchmakings of a game on FACEIT |
| GamesAPI | GetParentGame | Get /games/{game_id}/parent | Retrieve the details of the parent game, if the game is region-specific |
| GamesAPI | GetQueueBans | Get /games/{game_id}/queues/{queue_id}/bans | Retrieve queue bans on FACEIT |
| GamesAPI | GetQueueById | Get /games/{game_id}/queues/{queue_id} | Retrieve details of a queue on FACEIT |
| GamesAPI | GetQueuesByEntityFilters | Get /games/{game_id}/queues | Retrieve queues by filters on FACEIT |
| GamesAPI | GetQueuesByRegion | Get /games/{game_id}/regions/{region_id}/queues | Retrieve queues by region on FACEIT |
| HubsAPI | GetHub | Get /hubs/{hub_id} | Retrieve hub details |
| HubsAPI | GetHubMatches | Get /hubs/{hub_id}/matches | Retrieve all matches of a hub |
| HubsAPI | GetHubMembers | Get /hubs/{hub_id}/members | Retrieve all members of a hub |
| HubsAPI | GetHubRoles | Get /hubs/{hub_id}/roles | Retrieve all roles members can have in a hub |
| HubsAPI | GetHubRules | Get /hubs/{hub_id}/rules | Retrieve rules of a hub |
| HubsAPI | GetHubStats | Get /hubs/{hub_id}/stats | Retrieve statistics of a hub |
| LeaderboardsAPI | GetChampionshipGroupRanking | Get /leaderboards/championships/{championship_id}/groups/{group} | Retrieve group ranking of a championship |
| LeaderboardsAPI | GetChampionshipLeaderboards | Get /leaderboards/championships/{championship_id} | Retrieve all leaderboards of a championship |
| LeaderboardsAPI | GetHubLeaderboards | Get /leaderboards/hubs/{hub_id} | Retrieve all leaderboards of a hub |
| LeaderboardsAPI | GetHubRanking | Get /leaderboards/hubs/{hub_id}/general | Retrieve all time ranking of a hub |
| LeaderboardsAPI | GetHubSeasonRanking | Get /leaderboards/hubs/{hub_id}/seasons/{season} | Retrieve seasonal ranking of a hub |
| LeaderboardsAPI | GetLeaderboard | Get /leaderboards/{leaderboard_id} | Retrieve ranking from a leaderboard id |
| LeaderboardsAPI | GetPlayerRankingInLeaderboard | Get /leaderboards/{leaderboard_id}/players/{player_id} | Retrieve a players ranking in a leaderboard |
| LeaguesAPI | GetLeagueById | Get /leagues/{league_id} | Retrieve details of a league of a matchmaking on FACEIT |
| LeaguesAPI | GetLeagueSeason | Get /leagues/{league_id}/seasons/{season_id} | Retrieve details of a season of a league on FACEIT |
| LeaguesAPI | GetPlayerForLeagueSeason | Get /leagues/{league_id}/seasons/{season_id}/players/{player_id} | Retrieve details of a player for a given league and season on FACEIT |
| MatchesAPI | GetMatch | Get /matches/{match_id} | Retrieve match details |
| MatchesAPI | GetMatchStats | Get /matches/{match_id}/stats | Retrieve statistics of a match |
| MatchmakingsAPI | GetMatchmaking | Get /matchmakings/{matchmaking_id} | Retrieve details of a matchmaking of a game on FACEIT |
| OrganizersAPI | GetOrganizer | Get /organizers/{organizer_id} | Retrieve organizer details |
| OrganizersAPI | GetOrganizerByName | Get /organizers | Retrieve organizer details from name |
| OrganizersAPI | GetOrganizerChampionships | Get /organizers/{organizer_id}/championships | Retrieve all championships of an organizer |
| OrganizersAPI | GetOrganizerGames | Get /organizers/{organizer_id}/games | Retrieve all games an organizer is involved with |
| OrganizersAPI | GetOrganizerHubs | Get /organizers/{organizer_id}/hubs | Retrieve all hubs of an organizer |
| OrganizersAPI | GetOrganizerTournaments | Get /organizers/{organizer_id}/tournaments | Retrieve all tournaments of an organizer |
| PlayersAPI | GetPlayer | Get /players/{player_id} | Retrieve player details |
| PlayersAPI | GetPlayerBans | Get /players/{player_id}/bans | Retrieve all bans of a player |
| PlayersAPI | GetPlayerFromLookup | Get /players | Retrieve player details |
| PlayersAPI | GetPlayerHistory | Get /players/{player_id}/history | Retrieve all matches of a player |
| PlayersAPI | GetPlayerHubs | Get /players/{player_id}/hubs | Retrieve all hubs of a player |
| PlayersAPI | GetPlayerStats | Get /players/{player_id}/games/{game_id}/stats | Retrieve statistics of a player for a given amount of matches |
| PlayersAPI | GetPlayerStats_0 | Get /players/{player_id}/stats/{game_id} | Retrieve statistics of a player |
| PlayersAPI | GetPlayerTeams | Get /players/{player_id}/teams | Retrieve all teams of a player |
| PlayersAPI | GetPlayerTournaments | Get /players/{player_id}/tournaments | Retrieve all tournaments of a player |
| RankingsAPI | GetGlobalRanking | Get /rankings/games/{game_id}/regions/{region} | Retrieve global ranking of a game |
| RankingsAPI | GetPlayerRanking | Get /rankings/games/{game_id}/regions/{region}/players/{player_id} | Retrieve user position in the global ranking of a game |
| SearchAPI | SearchChampionships | Get /search/championships | Search for championships |
| SearchAPI | SearchClans | Get /search/clans | Search for clans |
| SearchAPI | SearchHubs | Get /search/hubs | Search for hubs |
| SearchAPI | SearchOrganizers | Get /search/organizers | Search for organizers |
| SearchAPI | SearchPlayers | Get /search/players | Search for players |
| SearchAPI | SearchTeams | Get /search/teams | Search for teams |
| SearchAPI | SearchTournaments | Get /search/tournaments | Search for tournaments |
| TeamsAPI | GetTeam | Get /teams/{team_id} | Retrieve team details |
| TeamsAPI | GetTeamStats | Get /teams/{team_id}/stats/{game_id} | Retrieve statistics of a team |
| TeamsAPI | GetTeamTournaments | Get /teams/{team_id}/tournaments | Retrieve tournaments of a team |
| TournamentsAPI | GetTournament | Get /tournaments/{tournament_id} | Retrieve tournament details |
| TournamentsAPI | GetTournamentBrackets | Get /tournaments/{tournament_id}/brackets | Retrieve brackets of a tournament |
| TournamentsAPI | GetTournamentMatches | Get /tournaments/{tournament_id}/matches | Retrieve all matches of a tournament |
| TournamentsAPI | GetTournamentTeams | Get /tournaments/{tournament_id}/teams | Retrieve all teams of a tournament |
| TournamentsAPI | GetTournamentsList | Get /tournaments | Retrieve tournaments v1 (no longer used) |
- AccessMode
- Address
- AlgorithmParameters
- Assets
- AuthenticateOKBody
- Band
- BirthDate
- Brackets
- BracketsFaction
- BracketsMatch
- BracketsRound
- CapacityRange
- Championship
- ChampionshipBounds
- ChampionshipPlacement
- ChampionshipPlacementGroup
- ChampionshipResultList
- ChampionshipSchedule
- ChampionshipScreening
- ChampionshipStream
- ChampionshipSubscription
- ChampionshipSubscriptionsList
- ChampionshipsList
- CheckIn
- ClanSearch
- ClansSearchList
- ClusterVolume
- ClusterVolumeSpec
- CompetitionSearch
- CompetitionsSearchList
- ContainerTopOKBody
- ContainerUpdateOKBody
- CreateOptions
- CreateResponse
- DeleteResponse
- DetailedMatchResult
- Division
- EntityRanking
- ErrorResponse
- Faction
- FactionResult
- FilesystemChange
- Game
- GameAssets
- GameDetail
- GameUserSearch
- GamesList
- GeoDescription
- GeoLabel
- GlobalRanking
- GlobalRankingList
- GraphDriverData
- HistoryFaction
- HistoryResponseItem
- Hub
- HubMembers
- HubSmall
- HubStats
- HubUser
- HubsList
- HubsSmallList
- IdResponse
- Info
- Item
- ItemList
- ItemMedia
- JoinCheck
- JoinType
- Leaderboard
- LeaderboardConfig
- LeaderboardsList
- League
- ListResponse
- Match
- MatchHistory
- MatchHistoryList
- MatchHistoryPlayer
- MatchList
- MatchResult
- MatchStats
- Matchmaking
- MatchmakingList
- MatchmakingQueue
- MatchmakingSlim
- Meta
- Order
- OrderItem
- OrderList
- OrderUser
- Organizer
- OrganizerSearch
- OrganizersSearchList
- PaginationFields
- Placement
- Player
- PlayerBan
- PlayerBansList
- PlayerGlobalRanking
- PlayerInLeague
- PlayerStats
- PlayerStatsForMatch
- PlayerStatsForMatchesList
- PlayerStatsSimple
- Plugin
- PluginConfig
- PluginConfigArgs
- PluginConfigInterface
- PluginConfigLinux
- PluginConfigNetwork
- PluginConfigRootfs
- PluginConfigUser
- PluginDevice
- PluginEnv
- PluginInterfaceType
- PluginMount
- PluginSettings
- Port
- Prize
- Promotion
- PublishStatus
- Queue
- QueueAlgorithm
- QueueBan
- QueueBansList
- QueueSimple
- QueuesList
- Ranking
- Relegation
- Role
- RolesList
- Roster
- RoundStats
- Rules
- Season
- SeasonDetailed
- Secret
- ServiceCreateResponse
- ServiceUpdateResponse
- SpacePlayer
- Stats
- StatsCompetitionPlayer
- StatsSkillLevel
- StatsSkillLevelRange
- SubstitutionConfiguration
- Summary
- Team
- TeamList
- TeamSearch
- TeamStats
- TeamStatsSimple
- TeamsSearchList
- Tier
- Topology
- TopologyRequirement
- Tournament
- TournamentSimple
- TournamentTeam
- TournamentTeams
- TournamentsList
- TypeMount
- UsageData
- UserSearch
- UserSettings
- UserSimple
- UsersSearchList
- Version
- Volume
- WaitExitError
- WaitResponse
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Note, each API key must be added to a map of map[string]APIKey where the key is: key and passed in as the auth context for each request.
Example
auth := context.WithValue(
context.Background(),
faceit.ContextAPIKeys,
map[string]faceit.APIKey{
"key": {Key: "API_KEY_STRING"},
},
)
r, err := client.Service.Operation(auth, args)Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime