Philipp15b / go-steamapi

Steam Web API in Go.
http://godoc.org/github.com/Philipp15b/go-steamapi
MIT License
93 stars 28 forks source link

GetPlayerSummaries adding %20 before first id #14

Open felipecrrmts opened 1 week ago

felipecrrmts commented 1 week ago

Example: GetPlayerSummaries([]uint64{76561198110650343}, "realkey")

is becoming this request:

https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v2/?key=realkey&steamids=%2076561198110650343

felipecrrmts commented 1 week ago

the problem is in this bit:

    var getPlayerSummaries = NewSteamMethod("ISteamUser", "GetPlayerSummaries", 2)
    strIds := make([]string, len(ids))
    for _, id := range ids {
        strIds = append(strIds, strconv.FormatUint(id, 10))
    }

should be:

    var getPlayerSummaries = NewSteamMethod("ISteamUser", "GetPlayerSummaries", 2)
    strIds := make([]string, len(ids))
    for i, id := range ids {
        strIds[i] = strconv.FormatUint(id, 10)
    }