mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 12:03:19 +00:00
Added XML documentation
This commit is contained in:
@@ -6,18 +6,78 @@ namespace Octokit
|
||||
{
|
||||
public interface IReferencesClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a reference for a given repository by reference name
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#get-a-reference
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">Tha name of the reference</param>
|
||||
/// <returns></returns>
|
||||
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
||||
Justification = "Method makes a network request")]
|
||||
Task<Reference> Get(string owner, string name, string reference);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all references for a given repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#get-all-references
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <returns></returns>
|
||||
Task<IReadOnlyList<Reference>> GetAll(string owner, string name);
|
||||
|
||||
/// <summary>
|
||||
/// Gets references for a given repository by sub-namespace, i.e. "tags" or "heads"
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#get-all-references
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="subNamespace">The sub-namespace to get references for</param>
|
||||
/// <returns></returns>
|
||||
Task<IReadOnlyList<Reference>> GetAll(string owner, string name, string subNamespace);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a reference for a given repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#create-a-reference
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">The reference to create</param>
|
||||
/// <returns></returns>
|
||||
Task<Reference> Create(string owner, string name, NewReference reference);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a reference for a given repository by reference name
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#update-a-reference
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">The name of the reference</param>
|
||||
/// <param name="referenceUpdate">The updated reference data</param>
|
||||
/// <returns></returns>
|
||||
Task<Reference> Update(string owner, string name, string reference, ReferenceUpdate referenceUpdate);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a reference for a given repository by reference name
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#delete-a-reference
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">The name of the reference</param>
|
||||
/// <returns></returns>
|
||||
Task Delete(string owner, string name, string reference);
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,16 @@ namespace Octokit
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reference for a given repository by reference name
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#get-a-reference
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">Tha name of the reference</param>
|
||||
/// <returns></returns>
|
||||
public Task<Reference> Get(string owner, string name, string reference)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -19,6 +29,15 @@ namespace Octokit
|
||||
return ApiConnection.Get<Reference>(ApiUrls.Reference(owner, name, reference));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all references for a given repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#get-all-references
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <returns></returns>
|
||||
public Task<IReadOnlyList<Reference>> GetAll(string owner, string name)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -27,6 +46,16 @@ namespace Octokit
|
||||
return ApiConnection.GetAll<Reference>(ApiUrls.Reference(owner, name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets references for a given repository by sub-namespace, i.e. "tags" or "heads"
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#get-all-references
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="subNamespace">The sub-namespace to get references for</param>
|
||||
/// <returns></returns>
|
||||
public Task<IReadOnlyList<Reference>> GetAll(string owner, string name, string subNamespace)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -36,6 +65,16 @@ namespace Octokit
|
||||
return ApiConnection.GetAll<Reference>(ApiUrls.Reference(owner, name, subNamespace));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a reference for a given repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#create-a-reference
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">The reference to create</param>
|
||||
/// <returns></returns>
|
||||
public Task<Reference> Create(string owner, string name, NewReference reference)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -45,6 +84,17 @@ namespace Octokit
|
||||
return ApiConnection.Post<Reference>(ApiUrls.Reference(owner, name), reference);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates a reference for a given repository by reference name
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#update-a-reference
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">The name of the reference</param>
|
||||
/// <param name="referenceUpdate">The updated reference data</param>
|
||||
/// <returns></returns>
|
||||
public Task<Reference> Update(string owner, string name, string reference, ReferenceUpdate referenceUpdate)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -55,6 +105,16 @@ namespace Octokit
|
||||
return ApiConnection.Patch<Reference>(ApiUrls.Reference(owner, name, reference), referenceUpdate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a reference for a given repository by reference name
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/git/refs/#delete-a-reference
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="reference">The name of the reference</param>
|
||||
/// <returns></returns>
|
||||
public Task Delete(string owner, string name, string reference)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
|
||||
Reference in New Issue
Block a user