mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-27 00:23:39 +00:00
23b25f5922
* add node_id to Deployments payloads (Deployment and DeploymentStatus and Account/User/Organization) * add node_id to gist responses * add node_id to Git Blob * add node_id to Git Commit response * add node_id to GitReference response * add node_id to everything that inherits GitReference * add node_id to Issue * add node_id to IssueComment/IssueEvent * add node_id to Label * add node_id to Milestone * add node_id to Project/ProjectCard/ProjectColumn * add node_id to Reaction * add node_id to Release/ReleaseAsset * add node_id to Team * add node_id to Repository.RepositoryContributor/RepositoryInvitation/RepositoryTag * add node_id to Commit related responses * Add node_id to PullRequest related responses * Add node_id to any response models it was found to be missing, based on auditing integration test responses * remove unused test variable that was using a response ctor * fix tests that need to handle node_id now * Committer is a request object as well as response, so make nodeId optional * fix test
72 lines
2.0 KiB
C#
72 lines
2.0 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.Globalization;
|
|
|
|
namespace Octokit
|
|
{
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
public class ReleaseAsset
|
|
{
|
|
public ReleaseAsset() { }
|
|
|
|
public ReleaseAsset(string url, int id, string nodeId, string name, string label, string state, string contentType, int size, int downloadCount, DateTimeOffset createdAt, DateTimeOffset updatedAt, string browserDownloadUrl, Author uploader)
|
|
{
|
|
Url = url;
|
|
Id = id;
|
|
NodeId = nodeId;
|
|
Name = name;
|
|
Label = label;
|
|
State = state;
|
|
ContentType = contentType;
|
|
Size = size;
|
|
DownloadCount = downloadCount;
|
|
CreatedAt = createdAt;
|
|
UpdatedAt = updatedAt;
|
|
BrowserDownloadUrl = browserDownloadUrl;
|
|
Uploader = uploader;
|
|
}
|
|
|
|
public string Url { get; protected set; }
|
|
|
|
public int Id { get; protected set; }
|
|
|
|
/// <summary>
|
|
/// GraphQL Node Id
|
|
/// </summary>
|
|
public string NodeId { get; protected set; }
|
|
|
|
public string Name { get; protected set; }
|
|
|
|
public string Label { get; protected set; }
|
|
|
|
public string State { get; protected set; }
|
|
|
|
public string ContentType { get; protected set; }
|
|
|
|
public int Size { get; protected set; }
|
|
|
|
public int DownloadCount { get; protected set; }
|
|
|
|
public DateTimeOffset CreatedAt { get; protected set; }
|
|
|
|
public DateTimeOffset UpdatedAt { get; protected set; }
|
|
|
|
public string BrowserDownloadUrl { get; protected set; }
|
|
|
|
public Author Uploader { get; protected set; }
|
|
|
|
internal string DebuggerDisplay
|
|
{
|
|
get { return string.Format(CultureInfo.InvariantCulture, "Name: {0} CreatedAt: {1}", Name, CreatedAt); }
|
|
}
|
|
|
|
public ReleaseAssetUpdate ToUpdate()
|
|
{
|
|
return new ReleaseAssetUpdate(Name)
|
|
{
|
|
Label = Label
|
|
};
|
|
}
|
|
}
|
|
}
|