using System.Diagnostics;
using System.Globalization;
using Octokit.Internal;
namespace Octokit
{
public enum ReactionType
{
[Parameter(Value = "+1")]
Plus1,
[Parameter(Value = "-1")]
Minus1,
[Parameter(Value = "laugh")]
Laugh,
[Parameter(Value = "confused")]
Confused,
[Parameter(Value = "heart")]
Heart,
[Parameter(Value = "hooray")]
Hooray,
[Parameter(Value = "rocket")]
Rocket,
[Parameter(Value = "eyes")]
Eyes
}
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class Reaction
{
public Reaction() { }
public Reaction(long id, string nodeId, User user, ReactionType content)
{
Id = id;
NodeId = nodeId;
User = user;
Content = content;
}
///
/// The Id for this reaction.
///
public long Id { get; private set; }
///
/// GraphQL Node Id
///
public string NodeId { get; private set; }
///
/// Information about the user.
///
public User User { get; private set; }
///
/// The reaction type for this commit comment.
///
[Parameter(Key = "content")]
public StringEnum Content { get; private set; }
internal string DebuggerDisplay
{
get
{
return string.Format(CultureInfo.InvariantCulture, "Id: {0}, Reaction: {1}", Id, Content);
}
}
}
}