Implementing the rest of the Notifications API

This commit is contained in:
Dillon Buchanan
2014-08-17 11:03:32 -04:00
committed by Brendan Forster
parent 45e48e26f7
commit f45fc8e3ff
20 changed files with 795 additions and 0 deletions
@@ -0,0 +1,46 @@
using System;
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
/// <summary>
/// Specifies the parameters to filter notifications by
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class NotificationsRequest : RequestParameters
{
/// <summary>
/// If true, show notifications marked as read. Default: false
/// </summary>
public bool All { get; set; }
/// <summary>
/// If true, only shows notifications in which the user is directly participating or mentioned. Default: false
/// </summary>
public bool Participating { get; set; }
/// <summary>
/// Filters out any notifications updated before the given time. Default: Time.now
/// </summary>
public DateTimeOffset Since { get; set; }
/// <summary>
/// Construct a <see cref="NotificationsRequest"/> object
/// </summary>
public NotificationsRequest()
{
All = false;
Participating = false;
Since = DateTimeOffset.Now;
}
internal string DebuggerDisplay
{
get
{
return String.Format(CultureInfo.InvariantCulture, "All: {0}, Participating: {1}, Since: {2}", All, Participating, Since);
}
}
}
}