Adds support for alternate accept header to retrieve star creation timestamps

This commit is contained in:
Dave Glick
2016-01-12 20:41:54 -05:00
parent da45d9ebf6
commit dcb83fc6ff
15 changed files with 390 additions and 1 deletions
+40
View File
@@ -0,0 +1,40 @@
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
namespace Octokit
{
/// <summary>
/// Represents additional information about a star (such as creation time)
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class RepositoryStar
{
public RepositoryStar() { }
public RepositoryStar(DateTimeOffset starredAt, Repository repo)
{
StarredAt = starredAt;
Repo = repo;
}
/// <summary>
/// The date the star was created.
/// </summary>
public DateTimeOffset StarredAt { get; protected set; }
/// <summary>
/// The repository associated with the star.
/// </summary>
public Repository Repo { get; protected set; }
internal string DebuggerDisplay
{
get
{
return string.Format(CultureInfo.InvariantCulture, Repo.DebuggerDisplay);
}
}
}
}