diff --git a/Octokit.Reactive/Clients/IObservableReleasesClient.cs b/Octokit.Reactive/Clients/IObservableReleasesClient.cs
index 26c0f120..6c27a8bf 100644
--- a/Octokit.Reactive/Clients/IObservableReleasesClient.cs
+++ b/Octokit.Reactive/Clients/IObservableReleasesClient.cs
@@ -1,11 +1,138 @@
using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Reactive;
namespace Octokit.Reactive
{
public interface IObservableReleasesClient
{
+ ///
+ /// Gets all s for the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// Thrown when a general API error occurs.
+ /// The list of s for the specified repository.
IObservable GetAll(string owner, string name);
+
+ ///
+ /// Gets a single for the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the release
+ /// Thrown when a general API error occurs.
+ /// The specified by the id
+ [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")]
+ IObservable Get(string owner, string name, int number);
+
+ ///
+ /// Creates a new for the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// A description of the release to create
+ /// Thrown when a general API error occurs.
+ /// The created .
IObservable CreateRelease(string owner, string name, ReleaseUpdate data);
+
+ ///
+ /// Edits an existing for the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// A description of the release to edit
+ /// Thrown when a general API error occurs.
+ /// The updated .
+ IObservable EditRelease(string owner, string name, ReleaseUpdate data);
+
+ ///
+ /// Deletes an existing for the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the release to delete
+ /// Thrown when a general API error occurs.
+ ///
+ IObservable DeleteRelease(string owner, string name, int number);
+
+ ///
+ /// Gets all for the specified release of the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the .
+ /// Thrown when a general API error occurs.
+ /// The list of for the specified release of the specified repository.
+ IObservable GetAssets(string owner, string name, int number);
+
+ ///
+ /// Uploads a for the specified release.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The to attach the uploaded asset to
+ /// Description of the asset with its data
+ /// Thrown when a general API error occurs.
+ /// The created .
IObservable UploadAsset(Release release, ReleaseAssetUpload data);
+
+ ///
+ /// Gets the specified for the specified release of the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the
+ /// The id of the
+ /// The specified by the asset id.
+ IObservable GetAsset(string owner, string name, int releaseId, int assetId);
+
+ ///
+ /// Edits the for the specified release of the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the
+ /// The id of the
+ /// Description of the asset with its amended data
+ /// The edited .
+ IObservable EditAsset(string owner, string name, int releaseId, int assetId, ReleaseAssetUpdate data);
+
+ ///
+ /// Deletes the specified from the specified repository
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the .
+ ///
+ IObservable DeleteAsset(string owner, string name, int number);
}
}
diff --git a/Octokit.Reactive/Clients/ObservableReleasesClient.cs b/Octokit.Reactive/Clients/ObservableReleasesClient.cs
index 45ed8cea..edb5f642 100644
--- a/Octokit.Reactive/Clients/ObservableReleasesClient.cs
+++ b/Octokit.Reactive/Clients/ObservableReleasesClient.cs
@@ -1,4 +1,5 @@
using System;
+using System.Reactive;
using System.Reactive.Threading.Tasks;
using Octokit.Reactive.Internal;
@@ -17,19 +18,162 @@ namespace Octokit.Reactive
_connection = client.Connection;
}
+ ///
+ /// Gets all s for the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// Thrown when a general API error occurs.
+ /// The list of s for the specified repository.
public IObservable GetAll(string owner, string name)
{
return _connection.GetAndFlattenAllPages(ApiUrls.Releases(owner, name));
}
+ ///
+ /// Gets a single for the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the release
+ /// Thrown when a general API error occurs.
+ /// The specified by the id
+ public IObservable Get(string owner, string name, int number)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Creates a new for the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// A description of the release to create
+ /// Thrown when a general API error occurs.
+ /// The created .
public IObservable CreateRelease(string owner, string name, ReleaseUpdate data)
{
return _client.CreateRelease(owner, name, data).ToObservable();
}
+ ///
+ /// Edits an existing for the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// A description of the release to edit
+ /// Thrown when a general API error occurs.
+ /// The updated .
+ public IObservable EditRelease(string owner, string name, ReleaseUpdate data)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Deletes an existing for the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the release to delete
+ /// Thrown when a general API error occurs.
+ ///
+ public IObservable DeleteRelease(string owner, string name, int number)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Gets all for the specified release of the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the .
+ /// Thrown when a general API error occurs.
+ /// The list of for the specified release of the specified repository.
+ public IObservable GetAssets(string owner, string name, int number)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Uploads a for the specified release.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The to attach the uploaded asset to
+ /// Description of the asset with its data
+ /// Thrown when a general API error occurs.
+ /// The created .
+ public IObservable GetAsset(string owner, string name, int releaseId, int assetId)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Gets the specified for the specified release of the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the
+ /// The id of the
+ /// The specified by the asset id.
public IObservable UploadAsset(Release release, ReleaseAssetUpload data)
{
return _client.UploadAsset(release, data).ToObservable();
}
+
+ ///
+ /// Edits the for the specified release of the specified repository.
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the
+ /// The id of the
+ /// Description of the asset with its amended data
+ /// The edited .
+ public IObservable EditAsset(string owner, string name, int releaseId, int assetId, ReleaseAssetUpdate data)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Deletes the specified from the specified repository
+ ///
+ ///
+ /// See the API documentation for more information.
+ ///
+ /// The repository's owner
+ /// The repository's name
+ /// The id of the .
+ ///
+ public IObservable DeleteAsset(string owner, string name, int number)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/Octokit/Clients/IReleasesClient.cs b/Octokit/Clients/IReleasesClient.cs
index b07e655f..136778af 100644
--- a/Octokit/Clients/IReleasesClient.cs
+++ b/Octokit/Clients/IReleasesClient.cs
@@ -18,7 +18,7 @@ namespace Octokit
/// Gets all s for the specified repository.
///
///
- /// See the API documentation for more information.
+ /// See the API documentation for more information.
///
/// The repository's owner
/// The repository's name
@@ -29,12 +29,15 @@ namespace Octokit
///
/// Gets a single for the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the release
/// Thrown when a general API error occurs.
/// The specified by the id
- [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
+ [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")]
Task Get(string owner, string name, int number);
///
@@ -53,6 +56,9 @@ namespace Octokit
///
/// Edits an existing for the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// A description of the release to edit
@@ -63,6 +69,9 @@ namespace Octokit
///
/// Deletes an existing for the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the release to delete
@@ -73,6 +82,9 @@ namespace Octokit
///
/// Gets all for the specified release of the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the .
@@ -95,6 +107,9 @@ namespace Octokit
///
/// Gets the specified for the specified release of the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the
@@ -105,6 +120,9 @@ namespace Octokit
///
/// Edits the for the specified release of the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the
@@ -116,11 +134,13 @@ namespace Octokit
///
/// Deletes the specified from the specified repository
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the .
///
Task DeleteAsset(string owner, string name, int number);
-
}
}
diff --git a/Octokit/Clients/ReleasesClient.cs b/Octokit/Clients/ReleasesClient.cs
index 7324c7d3..a4500d57 100644
--- a/Octokit/Clients/ReleasesClient.cs
+++ b/Octokit/Clients/ReleasesClient.cs
@@ -25,7 +25,7 @@ namespace Octokit
/// Gets all s for the specified repository.
///
///
- /// See the API documentation for more information.
+ /// See the API documentation for more information.
///
/// The repository's owner
/// The repository's name
@@ -43,6 +43,9 @@ namespace Octokit
///
/// Gets a single for the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the release
@@ -82,6 +85,9 @@ namespace Octokit
///
/// Edits an existing for the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// A description of the release to edit
@@ -100,6 +106,9 @@ namespace Octokit
///
/// Deletes an existing for the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the release to delete
@@ -118,6 +127,9 @@ namespace Octokit
///
/// Gets all for the specified release of the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the .
@@ -159,6 +171,9 @@ namespace Octokit
///
/// Gets the specified for the specified release of the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the
@@ -178,6 +193,9 @@ namespace Octokit
///
/// Edits the for the specified release of the specified repository.
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the
@@ -200,6 +218,9 @@ namespace Octokit
///
/// Deletes the specified from the specified repository
///
+ ///
+ /// See the API documentation for more information.
+ ///
/// The repository's owner
/// The repository's name
/// The id of the .
diff --git a/Octokit/Models/Request/ReleaseAssetUpdate.cs b/Octokit/Models/Request/ReleaseAssetUpdate.cs
index d97c6c94..adf663ca 100644
--- a/Octokit/Models/Request/ReleaseAssetUpdate.cs
+++ b/Octokit/Models/Request/ReleaseAssetUpdate.cs
@@ -7,7 +7,23 @@ namespace Octokit
{
public class ReleaseAssetUpdate
{
- public string Name { get; set; }
+ public ReleaseAssetUpdate(string name)
+ {
+ Ensure.ArgumentNotNullOrEmptyString(name, "name");
+
+ Name = name;
+ }
+
+ ///
+ /// The file name of the asset.
+ /// This field is required.
+ ///
+ public string Name { get; private set; }
+
+ ///
+ /// An alternate description of the asset.
+ /// Used in place of the filename.
+ ///
public string Label { get; set; }
}
}