zilzar / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

Which sample in GData release 2.1.0.0 shows how to use the version 3.0 OAuth API? #621

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 shows how to implement the new version 3.0 account retrieval and 
API method invocations? 

Kindly advise ASAP.

Original issue reported on code.google.com by michael....@tbwachiat.com on 11 Sep 2012 at 7:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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;
        }

Original comment by michael....@tbwachiat.com on 12 Sep 2012 at 3:01

GoogleCodeExporter commented 9 years ago
Did google migrate away from 2.3 without a working C# demo? 
I'm curious.

Original comment by michael....@tbwachiat.com on 12 Sep 2012 at 4:08

GoogleCodeExporter commented 9 years ago
The Google Analytics API v3 is supported by a different library: 
http://code.google.com/p/google-api-dotnet-client/

Please only use the issue tracker to report issues, for other requests related 
to this library you can post on the discussion group: 
https://groups.google.com/group/gdata-dotnet-client-library?pli=1

Original comment by ccherub...@google.com on 12 Sep 2012 at 7:02