mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 19:26:51 +00:00
Create now returns blob reference.
This commit is contained in:
@@ -27,6 +27,6 @@ namespace Octokit.Reactive
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="newBlob">The new Blob</param>
|
||||
/// <returns>The <see cref="Blob"/> that was just created.</returns>
|
||||
IObservable<Blob> Create(string owner, string name, NewBlob newBlob);
|
||||
IObservable<BlobReference> Create(string owner, string name, NewBlob newBlob);
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ namespace Octokit.Reactive
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="newBlob">The new Blob</param>
|
||||
/// <returns>The <see cref="Blob"/> that was just created.</returns>
|
||||
public IObservable<Blob> Create(string owner, string name, NewBlob newBlob)
|
||||
public IObservable<BlobReference> Create(string owner, string name, NewBlob newBlob)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
|
||||
@@ -38,13 +38,13 @@ namespace Octokit
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="newBlob">The new Blob</param>
|
||||
/// <returns>The <see cref="Blob"/> that was just created.</returns>
|
||||
public Task<Blob> Create(string owner, string name, NewBlob newBlob)
|
||||
public Task<BlobReference> Create(string owner, string name, NewBlob newBlob)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNull(newBlob, "newBlob");
|
||||
|
||||
return ApiConnection.Post<Blob>(ApiUrls.Blob(owner, name), newBlob);
|
||||
return ApiConnection.Post<BlobReference>(ApiUrls.Blob(owner, name), newBlob);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,6 @@ namespace Octokit
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="newBlob">The new Blob</param>
|
||||
/// <returns>The <see cref="Blob"/> that was just created.</returns>
|
||||
Task<Blob> Create(string owner, string name, NewBlob newBlob);
|
||||
Task<BlobReference> Create(string owner, string name, NewBlob newBlob);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Octokit
|
||||
{
|
||||
public class BlobReference
|
||||
{
|
||||
/// <summary>
|
||||
/// The SHA of the blob.
|
||||
/// </summary>
|
||||
public string Sha { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,7 @@
|
||||
<Link>Properties\SolutionInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Clients\ActivitiesClient.cs" />
|
||||
<Compile Include="Models\Response\BlobReference.cs" />
|
||||
<Compile Include="Clients\IBlobsClient.cs" />
|
||||
<Compile Include="Models\Request\NewBlob.cs" />
|
||||
<Compile Include="Models\Response\Blob.cs" />
|
||||
|
||||
Reference in New Issue
Block a user