Files
octokit.net/Octokit.Reactive/Clients/IObservableTreesClient.cs
Micah b141703dbd Adds TreeClient.GetRecursive method.
Initially I implemented this as an optional parameter that would append "?recursive=1" to the end of the URI if an optional recursive boolean was supplied to the TreeClient.Get method.  Unfortunately, code analysis complained about that so I went with a set of new overloads instead.

Let me know if a different approach is preferred for adding optional query string parameters to API methods or if this is the preferred solution.  The problem with this solution is that it doesn't scale out well with multiple optional parameters.
2015-01-11 14:31:55 -08:00

44 lines
2.0 KiB
C#

using System;
namespace Octokit.Reactive
{
public interface IObservableTreesClient
{
/// <summary>
/// Gets a Tree Response for a given SHA.
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/git/trees/#get-a-tree
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="reference">The SHA that references the tree</param>
/// <returns>The <see cref="TreeResponse"/> for the specified Tree.</returns>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
IObservable<TreeResponse> Get(string owner, string name, string reference);
/// <summary>
/// Gets a Tree Response for a given SHA.
/// </summary>
/// <remarks>
/// https://developer.github.com/v3/git/trees/#get-a-tree-recursively
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="reference">The SHA that references the tree</param>
/// <returns>The <see cref="TreeResponse"/> for the specified Tree.</returns>
IObservable<TreeResponse> GetRecursive(string owner, string name, string reference);
/// <summary>
/// Creates a new Tree in the specified repo
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/git/trees/#create-a-tree
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="newTree">The value of the new tree</param>
/// <returns>The <see cref="TreeResponse"/> that was just created.</returns>
IObservable<TreeResponse> Create(string owner, string name, NewTree newTree);
}
}