mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 12:42:32 +00:00
Fill out the activity model
This commit is contained in:
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all the public events
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/activity/events/#list-public-events
|
||||
/// </remarks>
|
||||
/// <returns>All the public <see cref="Activity"/>s for the particular user.</returns>
|
||||
public Task<IReadOnlyList<Activity>> GetAll()
|
||||
{
|
||||
return ApiConnection.GetAll<Activity>(ApiUrls.Events());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
public class Activity
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of the activity.
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the activity event is public or not.
|
||||
/// </summary>
|
||||
public bool Public { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The repository associated with the activity event.
|
||||
/// </summary>
|
||||
public Repository Repo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The user associated with the activity event.
|
||||
/// </summary>
|
||||
public User Actor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The organization associated with the activity event.
|
||||
/// </summary>
|
||||
public Organization Org { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The date the activity event was created.
|
||||
/// </summary>
|
||||
public DateTimeOffset CreatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The activity event Id.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,7 @@
|
||||
<Link>Properties\SolutionInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Clients\ActivitiesClient.cs" />
|
||||
<Compile Include="Models\Response\Activity.cs" />
|
||||
<Compile Include="Clients\AssigneesClient.cs" />
|
||||
<Compile Include="Clients\CommitStatusClient.cs" />
|
||||
<Compile Include="Clients\GitDatabaseClient.cs" />
|
||||
|
||||
Reference in New Issue
Block a user