static public void Main() { // Configure API key authorization: api_key Configuration.Default.AddApiKey("x-api-key", ExampleConstants.AWS_API_KEY); var stockx = new StockXApi(); stockx.Configuration.BasePath = ExampleConstants.STOCKX_ENDPOINT; var login = new LoginRequest(ExampleConstants.STOCKX_USERNAME, ExampleConstants.STOCKX_PASSWORD); try { // Login stockx.Login(login); // Lookup the supplied product by its product ID var marketData = stockx.GetProductMarketData("7f9c67ff-2cd4-4e27-8b64-518900a1bc0b", "air-jordan-1-retro-high-off-white-chicago"); Console.WriteLine(marketData); } catch (Exception e) { Console.WriteLine(e.ToString()); Console.WriteLine("Exception when calling StockXApi.GetProductMarketData: " + e.Message); } }
static public void Main() { // Configure API key authorization: api_key Configuration.Default.AddApiKey("x-api-key", ExampleConstants.AWS_API_KEY); var stockx = new StockXApi(); stockx.Configuration.BasePath = ExampleConstants.STOCKX_ENDPOINT; var login = new LoginRequest(ExampleConstants.STOCKX_USERNAME, ExampleConstants.STOCKX_PASSWORD); try { // Login stockx.Login(login); // Lookup the supplied product by its product ID var search = stockx.Search("jeezy"); Console.WriteLine(search); } catch (Exception e) { Console.WriteLine(e.ToString()); Console.WriteLine("Exception when calling StockXApi.Search: " + e.Message); } }
static public void Main() { // Configure API key authorization: api_key Configuration.Default.AddApiKey("x-api-key", ExampleConstants.AWS_API_KEY); var stockx = new StockXApi(); stockx.Configuration.BasePath = ExampleConstants.STOCKX_ENDPOINT; var login = new LoginRequest(ExampleConstants.STOCKX_USERNAME, ExampleConstants.STOCKX_PASSWORD); try { // Attempts to log the user in with a username and password. LoginResponse result = stockx.Login(login); Console.WriteLine(result.Customer); } catch (Exception e) { Console.WriteLine(e.ToString()); Console.WriteLine("Exception when calling StockXApi.Login: " + e.Message); } }