public TradeOfferManager(string apiKey, string sessionId, string token, string tokensecure) { if (apiKey == null) { throw new ArgumentNullException("apiKey"); } if (sessionId == null) { throw new ArgumentNullException("sessionId"); } if (token == null) { throw new ArgumentNullException("token"); } if (tokensecure == null) { throw new ArgumentNullException("tokensecure"); } this.apiKey = apiKey; this.sessionId = sessionId; this.token = token; this.tokensecure = tokensecure; webApi = new TradeOfferWebAPI(this.apiKey); session = new OfferSession(this.sessionId, this.token, this.tokensecure, webApi); }
public OfferSession(TradeOfferWebAPI webApi, SteamWeb steamWeb) { this.webApi = webApi; this.steamWeb = steamWeb; JsonSerializerSettings = new JsonSerializerSettings(); JsonSerializerSettings.PreserveReferencesHandling = PreserveReferencesHandling.None; JsonSerializerSettings.Formatting = Formatting.None; }
public TradeOfferManager(string apiKey, SteamWeb steamWeb) { if (apiKey == null) { throw new ArgumentNullException("apiKey"); } webApi = new TradeOfferWebAPI(apiKey, steamWeb); session = new OfferSession(webApi, steamWeb); }
public TradeOfferManager(string apiKey, SteamWeb steamWeb) { if (apiKey == null) { throw new ArgumentNullException("apiKey"); } LastTimeCheckedOffers = DateTime.MinValue; webApi = new TradeOfferWebAPI(apiKey, steamWeb); session = new OfferSession(webApi, steamWeb); unhandledTradeOfferUpdates = new Queue <Offer>(); }
public OfferSession(string sessionId, string token, string tokensecure, TradeOfferWebAPI webApi) { Cookies.Add(new Cookie("sessionid", sessionId, String.Empty, "steamcommunity.com")); Cookies.Add(new Cookie("steamLogin", token, String.Empty, "steamcommunity.com")); Cookies.Add(new Cookie("steamLoginSecure", tokensecure, String.Empty, "steamcommunity.com")); SessionId = sessionId; SteamLogin = token; SteamLoginSecure = tokensecure; this.WebApi = webApi; JsonSerializerSettings = new JsonSerializerSettings(); JsonSerializerSettings.PreserveReferencesHandling = PreserveReferencesHandling.None; JsonSerializerSettings.Formatting = Formatting.None; }