From c6807ce418bd06242396d8ca861bc90d4483dfe3 Mon Sep 17 00:00:00 2001 From: pltaylor Date: Wed, 13 Nov 2013 19:59:17 -0500 Subject: [PATCH] Create now returns blob reference. --- Octokit.Reactive/Clients/IObservableBlobClient.cs | 2 +- Octokit.Reactive/Clients/ObservableBlobClient.cs | 2 +- Octokit/Clients/BlobsClient.cs | 4 ++-- Octokit/Clients/IBlobsClient.cs | 2 +- Octokit/Models/Response/BlobReference.cs | 10 ++++++++++ Octokit/Octokit.csproj | 1 + 6 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 Octokit/Models/Response/BlobReference.cs diff --git a/Octokit.Reactive/Clients/IObservableBlobClient.cs b/Octokit.Reactive/Clients/IObservableBlobClient.cs index d4acdc8b..0cca24ff 100644 --- a/Octokit.Reactive/Clients/IObservableBlobClient.cs +++ b/Octokit.Reactive/Clients/IObservableBlobClient.cs @@ -27,6 +27,6 @@ namespace Octokit.Reactive /// The name of the repository /// The new Blob /// The that was just created. - IObservable Create(string owner, string name, NewBlob newBlob); + IObservable Create(string owner, string name, NewBlob newBlob); } } \ No newline at end of file diff --git a/Octokit.Reactive/Clients/ObservableBlobClient.cs b/Octokit.Reactive/Clients/ObservableBlobClient.cs index 26563f65..7279f9bc 100644 --- a/Octokit.Reactive/Clients/ObservableBlobClient.cs +++ b/Octokit.Reactive/Clients/ObservableBlobClient.cs @@ -43,7 +43,7 @@ namespace Octokit.Reactive /// The name of the repository /// The new Blob /// The that was just created. - public IObservable Create(string owner, string name, NewBlob newBlob) + public IObservable Create(string owner, string name, NewBlob newBlob) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); diff --git a/Octokit/Clients/BlobsClient.cs b/Octokit/Clients/BlobsClient.cs index 3b628c1d..4ac0b3b9 100644 --- a/Octokit/Clients/BlobsClient.cs +++ b/Octokit/Clients/BlobsClient.cs @@ -38,13 +38,13 @@ namespace Octokit /// The name of the repository /// The new Blob /// The that was just created. - public Task Create(string owner, string name, NewBlob newBlob) + public Task Create(string owner, string name, NewBlob newBlob) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(newBlob, "newBlob"); - return ApiConnection.Post(ApiUrls.Blob(owner, name), newBlob); + return ApiConnection.Post(ApiUrls.Blob(owner, name), newBlob); } } } diff --git a/Octokit/Clients/IBlobsClient.cs b/Octokit/Clients/IBlobsClient.cs index 75a8c63d..d063c59e 100644 --- a/Octokit/Clients/IBlobsClient.cs +++ b/Octokit/Clients/IBlobsClient.cs @@ -27,6 +27,6 @@ namespace Octokit /// The name of the repository /// The new Blob /// The that was just created. - Task Create(string owner, string name, NewBlob newBlob); + Task Create(string owner, string name, NewBlob newBlob); } } \ No newline at end of file diff --git a/Octokit/Models/Response/BlobReference.cs b/Octokit/Models/Response/BlobReference.cs new file mode 100644 index 00000000..4d3d111f --- /dev/null +++ b/Octokit/Models/Response/BlobReference.cs @@ -0,0 +1,10 @@ +namespace Octokit +{ + public class BlobReference + { + /// + /// The SHA of the blob. + /// + public string Sha { get; set; } + } +} \ No newline at end of file diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index 50c5bbbc..30529a8e 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -53,6 +53,7 @@ Properties\SolutionInfo.cs +