Simple question:
I was using Google Analytics v2.3 under .NET -- until August 23rd, 2012.
I've downloaded the Google Data API msi version 2.1.0.0.
I've gotten the source code from Subversion.
Which sample (if any) shows how to implement the new version 3.0 account retrieval and API method invocations?
This was my old code.
public Dictionary<string, string> GetAccounts_old(string username, string password, string myservice)
{
AccountQuery feedQuery = new AccountQuery();
AnalyticsService service = new AnalyticsService(myservice);
Dictionary<string, string> accounts = new Dictionary<string, string>();
try
{
if (!string.IsNullOrEmpty(username))
{
service.setUserCredentials(username, password);
}
foreach (AccountEntry entry in service.Query(feedQuery).Entries)
{
accounts.Add(entry.ProfileId.Value, entry.Title.Text);
}
}
catch (Exception ex)
{
throw new Exception("There was a problem: " + ex.Message);
}
return accounts;
}