-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make client property names consistent
Also added ObservableReleasesClient
- Loading branch information
Showing
9 changed files
with
53 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.Reactive.Threading.Tasks; | ||
|
||
namespace Octokit.Reactive.Clients | ||
{ | ||
public class ObservableReleasesClient : IObservableReleasesClient | ||
{ | ||
readonly IReleasesClient _client; | ||
|
||
public ObservableReleasesClient(IReleasesClient client) | ||
{ | ||
Ensure.ArgumentNotNull(client, "client"); | ||
|
||
_client = client; | ||
} | ||
|
||
public IObservable<IReadOnlyList<Release>> GetAll(string owner, string name) | ||
{ | ||
return _client.GetAll(owner, name).ToObservable(); | ||
} | ||
|
||
public IObservable<Release> CreateRelease(string owner, string name, ReleaseUpdate data) | ||
{ | ||
return _client.CreateRelease(owner, name, data).ToObservable(); | ||
} | ||
|
||
public IObservable<ReleaseAsset> UploadAsset(Release release, ReleaseAssetUpload data) | ||
{ | ||
return _client.UploadAsset(release, data).ToObservable(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System; | ||
|
||
namespace Octokit.Reactive | ||
{ | ||
public interface IObservableReleasesClient | ||
{ | ||
IObservable<IReadOnlyList<Release>> GetAll(string owner, string name); | ||
IObservable<Release> CreateRelease(string owner, string name, ReleaseUpdate data); | ||
IObservable<ReleaseAsset> UploadAsset(Release release, ReleaseAssetUpload data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters