Get All repo commits with request parameters

Implemented Get All using the available parameters wrapped in a
CommitRequest object.  Added unit tests and xml documentation along the
way.
This commit is contained in:
Timothy Haagenson
2014-07-09 09:38:02 -05:00
parent f1b772e4e8
commit a72e39f98b
13 changed files with 145 additions and 3 deletions
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class CommitRequest : RequestParameters
{
public CommitRequest()
{
}
/// <summary>
/// SHA or branch to start listing commits from.
/// </summary>
public string Sha { get; set; }
/// <summary>
/// Only commits containing this file path will be returned.
/// </summary>
public string Path { get; set; }
/// <summary>
/// GitHub login or email address by which to filter by commit author.
/// </summary>
public string Author { get; set; }
/// <summary>
/// Only commits after this date will be returned.
/// </summary>
public DateTimeOffset? Since { get; set; }
/// <summary>
/// Only commits before this date will be returned.
/// </summary>
public DateTimeOffset? Until { get; set; }
internal string DebuggerDisplay
{
get
{
return String.Format(CultureInfo.InvariantCulture, "Sha: {0} ", Sha);
}
}
}
}