Hi,
I'm trying to come up to speed on inserting items into google base
from c#. I've copied google's example code, but I'm getting a "400
Bad Request" Error.
My developer key looks OK with the customer_tool program, but I can't
insert items with the customer_tool either. From the customer_tool I
get a "Stream does not support writing" error.
My GoogleBase and Google Client DLL's are version 1.1.2.
Any ideas on how to resolve this problem would be appreciated.
Thanks
P.S. Here my code:
GBaseService service = new GBaseService("Google-Tutorial-1.0",
developerKey);
GBaseQuery query = new
GBaseQuer(GBaseUriFactory.Default.SnippetsFeedUri);
service.setUserCredentials("myloging","mypwd");
GBaseEntry entry = new GBaseEntry();
entry.Title.Text = "My House";
entry.Content.Content = "The best house of the area.";
entry.GBaseAttributes.ItemType = "test";
entry.GBaseAttributes.AddTextAttribute("my attribute", "hello");
entry.GBaseAttributes.AddFloatAttribute("bathrooms", 2f);
entry.GBaseAttributes.AddFloatAttribute("rooms", 6.5f);
entry.GBaseAttributes.AddFloatAttribute("bedrooms", 2f);
entry.GBaseAttributes.Location = "1900 Snow Cone Avenue, North Pole";
GBaseEntry myEntry =
service.Insert(GBaseUriFactory.Default.ItemsFeedUri, entry);