diff --git a/Octokit/Clients/ActivitiesClient.cs b/Octokit/Clients/ActivitiesClient.cs index 4cfbb6e9..77329024 100644 --- a/Octokit/Clients/ActivitiesClient.cs +++ b/Octokit/Clients/ActivitiesClient.cs @@ -1,8 +1,26 @@  +using System.Collections.Generic; +using System.Threading.Tasks; + namespace Octokit { - public class ActivitiesClient : IActivitiesClient + public class ActivitiesClient: ApiClient, IActivitiesClient { + public ActivitiesClient(IApiConnection apiConnection) + : base(apiConnection) + { + } + /// + /// Gets all the public events + /// + /// + /// http://developer.github.com/v3/activity/events/#list-public-events + /// + /// All the public s for the particular user. + public Task> GetAll() + { + return ApiConnection.GetAll(ApiUrls.Events()); + } } } diff --git a/Octokit/Models/Response/Activity.cs b/Octokit/Models/Response/Activity.cs new file mode 100644 index 00000000..700942d2 --- /dev/null +++ b/Octokit/Models/Response/Activity.cs @@ -0,0 +1,42 @@ +using System; + +namespace Octokit +{ + public class Activity + { + /// + /// The type of the activity. + /// + public string Type { get; set; } + + /// + /// Whether the activity event is public or not. + /// + public bool Public { get; set; } + + /// + /// The repository associated with the activity event. + /// + public Repository Repo { get; set; } + + /// + /// The user associated with the activity event. + /// + public User Actor { get; set; } + + /// + /// The organization associated with the activity event. + /// + public Organization Org { get; set; } + + /// + /// The date the activity event was created. + /// + public DateTimeOffset CreatedAt { get; set; } + + /// + /// The activity event Id. + /// + public int Id { get; set; } + } +} \ No newline at end of file diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index 8f6f4a4a..501f3472 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -53,6 +53,7 @@ Properties\SolutionInfo.cs +