Hey All;
I've been trying to create and post a new transaction using a similar
logic as presented in the .Net library example as follows:
AtomEntry entry = new AtomEntry();
AtomPerson author = new AtomPerson(AtomPersonType.Author);
author.Name = "Jo March";
author.Email = "jo...@gmail.com";
entry.Authors.Add(author);
entry.Title.Text = "Tennis with Beth";
entry.Content.Content = "Meet for a quick lesson.";
Uri postUri = new Uri("http://www.google.com/calendar/feeds/
jo...@gmail.com/private/full");
// Send the request and receive the response:
AtomEntry insertedEntry = service.Insert(postUri, entry);
which using the calendar API creates a new calendar entry.
So my problem is where to put the necessary XML to add a stock to a
portfolio. From the Api to what's needed is this structure of XML:
<entry>
<gf:transactionData date='2007-09-26T00:00:00.000' shares='1000.0'
type='Buy'>
<gf:commission>
<gd:money amount='0.0' currencyCode='USD'/>
</gf:commission>
<gf:price>
<gd:money amount='568.2' currencyCode='USD'/>
</gf:price>
</gf:transactionData>
</entry>
and the feed URI of:
http://finance.google.com/finance/feeds/default/portfolios/portfolioID/positions/TICKERID/transactions
When I retrieve position data it is in the ExtensionElements, but when
adding does it need to just be in the content area? I think I might be
missing something...
Any help I'd really appreciate!!