using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; namespace Octokit { [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Gist { public Gist() { } public Gist(string url, string id, string nodeId, string description, bool @public, User owner, IReadOnlyDictionary files, int comments, string commentsUrl, string htmlUrl, string gitPullUrl, string gitPushUrl, DateTimeOffset createdAt, DateTimeOffset updatedAt, IReadOnlyList forks, IReadOnlyList history) { Url = url; Id = id; NodeId = nodeId; Description = description; Public = @public; Owner = owner; Files = files; Comments = comments; CommentsUrl = commentsUrl; HtmlUrl = htmlUrl; GitPullUrl = gitPullUrl; GitPushUrl = gitPushUrl; CreatedAt = createdAt; UpdatedAt = updatedAt; Forks = forks; History = history; } /// /// The API URL for this . /// public string Url { get; protected set; } /// /// The Id of this . /// /// /// Given a gist url of https://gist.github.com/UserName/1234 the Id would be '1234'. /// public string Id { get; protected set; } /// /// GraphQL Node Id /// public string NodeId { get; protected set; } /// /// A description of the . /// public string Description { get; protected set; } /// /// Indicates if the is private or public. /// public bool Public { get; protected set; } /// /// The who owns this . /// /// /// Given a gist url of https://gist.github.com/UserName/1234 the Owner would be 'UserName'. /// public User Owner { get; protected set; } /// /// A containing all s in this . /// public IReadOnlyDictionary Files { get; protected set; } /// /// The number of comments on this . /// public int Comments { get; protected set; } /// /// A url to retrieve the comments for this . /// public string CommentsUrl { get; protected set; } /// /// URL to view the gist on gist.github.com. /// public string HtmlUrl { get; protected set; } /// /// The git url to pull from to retrieve the contents for this . /// public string GitPullUrl { get; protected set; } /// /// The git url to push to when changing this . /// public string GitPushUrl { get; protected set; } /// /// The for when this was created. /// public DateTimeOffset CreatedAt { get; protected set; } /// /// The for when this was last updated. /// public DateTimeOffset UpdatedAt { get; protected set; } /// /// A of all that exist for this . /// public IReadOnlyList Forks { get; protected set; } /// /// A of all containing the full history for this . /// public IReadOnlyList History { get; protected set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "Description: {0}", Description); } } } }