mirror of
https://github.com/watn3y/steamsalty.git
synced 2025-07-30 16:21:07 +02:00
v0.1
This commit is contained in:
parent
6aa64b6287
commit
3ec330e3a2
16 changed files with 408 additions and 1 deletions
17
steam/api.go
Normal file
17
steam/api.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package steam
|
||||
|
||||
import (
|
||||
"github.com/Philipp15b/go-steamapi"
|
||||
"github.com/rs/zerolog/log"
|
||||
"watn3y/steamsalty/config"
|
||||
)
|
||||
|
||||
func getPlayerDetails(steamID uint64) (summary steamapi.PlayerSummary) {
|
||||
|
||||
response, err := steamapi.GetPlayerSummaries([]uint64{steamID}, config.BotConfig.SteamAPIKey)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("Failed to get Player Summary")
|
||||
}
|
||||
|
||||
return response[0]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue