Exemple #1
0
    public static IEnumerable SW_GetProduct(string ShipwireUsername, string ShipwirePassword, long ProductID)
    {
        ShipwireClient sw = new ShipwireClient(ShipwireUsername, ShipwirePassword);
        List<SWProduct> products = new List<SWProduct>();
        products.Add(sw.GetProduct(ProductID));

        return products;
    }
 private void GetSWProduct()
 {
     sw = new ShipwireClient(_uname, _pwd);
     SWProduct swp = sw.GetProduct(Convert.ToInt64(txtInput.Text));
     txtRawData.Clear();
     txtRawData.Text += String.Format("Dims: {0}x{1}x{2}| Weight: {3}\n", swp.dimensions.resource.width, swp.dimensions.resource.height, swp.dimensions.resource.length, swp.dimensions.resource.weight);
     if (swp.alternateNames.resource.total != 0)
         txtRawData.Text += String.Format("Alternate names: {0}\n", swp.alternateNames.resource.items[0].resource.name);
 }