public GitHubRequest <GistModel> EditGist(GistEditModel gist) { var obj = new Dictionary <string, object>(); obj.Add("description", gist.Description); var files = new Dictionary <string, object>(); obj.Add("files", files); if (gist.Files != null) { foreach (var f in gist.Files.Keys) { if (gist.Files[f] == null) { files.Add(f, null); } else { var content = new Dictionary <string, object>(); files.Add(f, content); content.Add("content", gist.Files[f].Content); if (gist.Files[f].Filename != null) { content.Add("filename", gist.Files[f].Filename); } } } } return(GitHubRequest.Patch <GistModel>(Uri, obj)); }
public GitHubRequest <PullRequestModel> UpdateState(string state) { return(GitHubRequest.Patch <PullRequestModel>(Uri, new { state })); }
public GitHubRequest <CommentModel> Update(string body) { return(GitHubRequest.Patch <CommentModel>(Uri, new { body = body })); }
public GitHubRequest <bool> MarkAsRead() { return(GitHubRequest.Patch <bool>(Uri)); }
public GitHubRequest <IssueModel> UpdateLabels(IEnumerable <string> labels) { return(GitHubRequest.Patch <IssueModel>(Uri, new { labels = labels.ToArray() })); }
public GitHubRequest <IssueModel> UpdateMilestone(int?milestone) { return(GitHubRequest.Patch <IssueModel>(Uri, new { milestone })); }
public GitHubRequest <IssueModel> UpdateAssignee(string assignee) { return(GitHubRequest.Patch <IssueModel>(Uri, new { assignee })); }
public GitHubRequest <IssueModel> Update(string title, string body, string state, string assignee, int?milestone, string[] labels) { return(GitHubRequest.Patch <IssueModel>(Uri, new { title, body, assignee, milestone, labels, state })); }
public GitHubRequest <LabelModel> Update(string title, string color) { return(GitHubRequest.Patch <LabelModel>(Uri, new { title, color })); }