Last active
August 29, 2015 14:01
-
-
Save wibblymat/01fb1271fb78ec764ffc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var label1 = new AdwordsLabels(); | |
var label2 = new AdwordsLabels(); | |
label1.Value = "first"; | |
label2.Value = "second"; | |
entry.AdwordsLabelsCollection.Add(label1); | |
entry.AdwordsLabelsCollection.Add(label2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<ProductEntry> products = new List<ProductEntry>(); | |
for (var i = 0; i < 10; i++) | |
{ | |
var entry = new ProductEntry(); | |
entry.Title.Text = "Wool sweater"; | |
AtomContent c = new AtomContent(); | |
c.Content = "Comfortable and soft, this sweater will keep you warm on those cold winter nights. Red and blue stripes."; | |
entry.Content = c; | |
entry.ProductId = "123457" + i; | |
entry.TargetCountry = "US"; | |
entry.ContentLanguage = "en"; | |
entry.Brand = "ACME"; | |
entry.Condition = "new"; | |
entry.Price = new Price("usd", "25"); | |
entry.ProductType = "Clothing & Accessories > Clothing > Outerwear > Sweaters"; | |
entry.Quantity = 3; | |
var shipping = new Shipping(); | |
shipping.Country = "US"; | |
shipping.Price = new ShippingPrice("usd", "2"); | |
entry.ShippingRules.Add(shipping); | |
entry.ShippingWeight = new ShippingWeight("lb", "0.1"); | |
entry.ImageLink = new ImageLink("http://www.example.com/image.jpg"); | |
entry.Availability = "available for order"; | |
entry.Channel = "online"; | |
entry.Gender = "female"; | |
entry.Material = "wool"; | |
entry.Pattern = "Red and blue stripes"; | |
entry.Color = "red"; | |
entry.Brand = "Google"; | |
entry.Mpn = "GOOGSWEATER" + i; | |
var link = new AtomUri("https://mystore.com/products/" + i); | |
entry.AlternateUri = link; | |
products.Add(entry); | |
} | |
var result = service.InsertProducts(products); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment