Added TarballUrl, ZipballUrl and Assets to Release model, added Uploader to ReleaseAsset model

This commit is contained in:
Gabriel Weyer
2015-12-16 15:26:11 +11:00
parent 74b1144af5
commit 56ef5c1f57
3 changed files with 27 additions and 2 deletions
+11 -1
View File
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
@@ -10,7 +11,7 @@ namespace Octokit
{
public Release() { }
public Release(string url, string htmlUrl, string assetsUrl, string uploadUrl, int id, string tagName, string targetCommitish, string name, string body, bool draft, bool prerelease, DateTimeOffset createdAt, DateTimeOffset? publishedAt, Author author)
public Release(string url, string htmlUrl, string assetsUrl, string uploadUrl, int id, string tagName, string targetCommitish, string name, string body, bool draft, bool prerelease, DateTimeOffset createdAt, DateTimeOffset? publishedAt, Author author, string tarballUrl, string zipballUrl, IReadOnlyList<ReleaseAsset> assets)
{
Url = url;
HtmlUrl = htmlUrl;
@@ -26,6 +27,9 @@ namespace Octokit
CreatedAt = createdAt;
PublishedAt = publishedAt;
Author = author;
TarballUrl = tarballUrl;
ZipballUrl = zipballUrl;
Assets = assets;
}
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "0#")]
@@ -62,6 +66,12 @@ namespace Octokit
public Author Author { get; protected set; }
public string TarballUrl { get; protected set; }
public string ZipballUrl { get; protected set; }
public IReadOnlyList<ReleaseAsset> Assets { get; protected set; }
internal string DebuggerDisplay
{
get { return String.Format(CultureInfo.InvariantCulture, "Name: {0} PublishedAt: {1}", Name, PublishedAt); }