steamsalty/steam/api.go
Noah Theus 9c64a3e4b5 v0.2
- Include comment text in notification
- Include commenter in notification
- Use Timestamp to check if a comment is new
- Set sleep interval between requests in env variable
2024-12-21 08:06:47 +01:00

17 lines
490 B
Go

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")
}
log.Debug().Interface("Player", response[0]).Msg("Successfully got PlayerSummary from Steam API")
return response[0]
}