mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-02 02:45:32 +00:00
Implementing the rest of the Notifications API
This commit is contained in:
committed by
Brendan Forster
parent
45e48e26f7
commit
f45fc8e3ff
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user