# README
lobby
lobby is a http client of dst lobby server, help you more convenient to get information from lobby.
Note: The HTTP API maybe changed by klei official in the future
install
go get -u github.com/dstgo/lobbyapi
use
Here are some examples as follows
regions
get all the available regions
package main
import (
"fmt"
"github.com/dstgo/lobbyapi"
)
func main() {
lobbyclient := lobbyapi.New("no need klei token")
capableRegions, err := lobbyclient.GetCapableRegions()
if err != nil {
panic(err)
}
fmt.Println(capableRegions)
}
output
{[{us-east-1} {eu-central-1} {ap-southeast-1} {ap-east-1}]}
servers
get server list with region and platform, available platforms as follows:
- Steam
- PSN
- Rail
- XBone
- Switch
here is an example
package main
import (
"fmt"
"github.com/dstgo/lobbyapi"
)
func main() {
lobbyclient := lobbyapi.New("no need klei token")
list, err := lobbyclient.GetLobbyServers("ap-east-1","Steam")
if err != nil {
panic(err)
}
fmt.Println(list)
}
details
get details for specific server
must be used with klei token
package main
import (
"fmt"
"github.com/dstgo/lobbyapi"
)
func main() {
lobbyclient := lobbyapi.New("klei token")
details, err := lobbyclient.GetServerDetails("ap-east-1","xxxxx")
if err != nil {
panic(err)
}
fmt.Println(details)
}
# Functions
New returns a new instance of lobby client with klei token.
No description provided by the author
No description provided by the author
# Constants
Region represents dst lobby server region, it may be updated by klei in the future.
Region represents dst lobby server region, it may be updated by klei in the future.
Region represents dst lobby server region, it may be updated by klei in the future.
No description provided by the author
Lobby server urls, may be updated by klei in the future.
Lobby server urls, may be updated by klei in the future.
Lobby server urls, may be updated by klei in the future.
PS4Official can not be use in api query params.
No description provided by the author
Rail is alias of WeGame, only serve at ap-east-1.
No description provided by the author
No description provided by the author
Region represents dst lobby server region, it may be updated by klei in the future.
No description provided by the author
# Variables
ExplicitPlatforms means that platforms could be used as query params in klei api.
# Structs
Client is dst lobby http client, interact with lobby server and returns server information.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Secondaries represents the secondaries shard among dst servers.
Server includes all the information about single dst server.
ServerDetails includes some details information.
No description provided by the author
# Type aliases
Platform represents dst server platform, it may be updated by klei in the future.