func NewClient(key APIKey, sessionId, steamLogin string) *Client { c := &Client{ new(http.Client), key, sessionId, } community.SetCookies(c.client, sessionId, steamLogin) return c }
// Creates a new Trade based on the given cookies `sessionid`, `steamLogin`, `steamLoginSecure` and the trade partner's Steam ID. func New(sessionId, steamLogin, steamLoginSecure string, other steamid.SteamId) *Trade { client := new(http.Client) client.Timeout = 10 * time.Second t := &Trade{ client: client, other: other, sessionId: sessionId, baseUrl: fmt.Sprintf(tradeUrl, other), Version: 1, } community.SetCookies(t.client, sessionId, steamLogin, steamLoginSecure) return t }