Created
February 10, 2014 21:03
-
-
Save gguuss/8924100 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Google.Apis.Plus.v1; | |
using Google.Apis.Plus.v1.Data; | |
namespace EasyPlus | |
{ | |
internal class Program | |
{ | |
// From https://code.google.com/apis/console | |
public const string API_KEY = "YOUR_API_KEY"; | |
private static void Main(string[] args) | |
{ | |
// A service object for basic API calls. | |
PlusService plusService = new PlusService( | |
new Google.Apis.Services.BaseClientService.Initializer() | |
{ | |
ApiKey = API_KEY | |
}); | |
// List the activities for a user (+GusClass in this case). | |
IList<Activity> activities = | |
plusService.Activities.List( | |
"+GusClass", | |
ActivitiesResource.ListRequest.CollectionEnum.Public). | |
Execute().Items; | |
// Print the activities. | |
foreach (Activity act in activities) | |
{ | |
Console.WriteLine(act.Title); | |
} | |
Console.Write("Press any key to continue..."); | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment