IssueLabels() public static method

Returns the Uri that returns all of the labels for the specified issue.
public static IssueLabels ( long repositoryId, int number ) : Uri
repositoryId long The Id of the repository
number int The issue number
return System.Uri
Beispiel #1
0
        /// <summary>
        /// Gets all  labels for the issue.
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#list-labels-on-an-issue">API documentation</a> for more information.
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="repo">The name of the repository</param>
        /// <param name="number">The number of the issue</param>
        /// <returns>The list of labels</returns>
        public Task <IReadOnlyList <Label> > GetAllForIssue(string owner, string repo, int number)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(repo, "repo");

            return(ApiConnection.GetAll <Label>(ApiUrls.IssueLabels(owner, repo, number)));
        }
        /// <summary>
        /// Removes all labels from an issue
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue">API documentation</a> for more information.
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="number">The number of the issue</param>
        public Task RemoveAllFromIssue(string owner, string name, int number)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(ApiConnection.Delete(ApiUrls.IssueLabels(owner, name, number)));
        }
        /// <summary>
        /// Gets all  labels for the issue.
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#list-labels-on-an-issue">API documentation</a> for more information.
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="number">The number of the issue</param>
        /// <param name="options">Options for changing the API response</param>
        public Task <IReadOnlyList <Label> > GetAllForIssue(string owner, string name, int number, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <Label>(ApiUrls.IssueLabels(owner, name, number), options));
        }
        /// <summary>
        /// Replaces all labels on the specified issues with the provided labels
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue">API documentation</a> for more information.
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="number">The number of the issue</param>
        /// <param name="labels">The names of the labels to set</param>
        public Task <IReadOnlyList <Label> > ReplaceAllForIssue(string owner, string name, int number, string[] labels)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(labels, "labels");

            return(ApiConnection.Put <IReadOnlyList <Label> >(ApiUrls.IssueLabels(owner, name, number), labels));
        }
        public Task <IReadOnlyList <Label> > GetAllForIssue(string owner, string name, int number, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <Label>(ApiUrls.IssueLabels(owner, name, number), null, AcceptHeaders.LabelsApiPreview, options));
        }
        public Task <IReadOnlyList <Label> > ReplaceAllForIssue(string owner, string name, int number, string[] labels)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(labels, nameof(labels));

            return(ApiConnection.Put <IReadOnlyList <Label> >(ApiUrls.IssueLabels(owner, name, number), labels, AcceptHeaders.LabelsApiPreview));
        }
Beispiel #7
0
        /// <summary>
        /// Adds a label to an issue
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#add-labels-to-an-issue">API documentation</a> for more information.
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="repo">The name of the repository</param>
        /// <param name="number">The number of the issue</param>
        /// <param name="labels">The names of the labels to add</param>
        /// <returns></returns>
        public Task <IReadOnlyList <Label> > AddToIssue(string owner, string repo, int number, string[] labels)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(repo, "repo");
            Ensure.ArgumentNotNull(labels, "labels");

            return(ApiConnection.Post <IReadOnlyList <Label> >(ApiUrls.IssueLabels(owner, repo, number), labels));
        }
Beispiel #8
0
        public Task <IReadOnlyList <Label> > AddToIssue(string owner, string name, int number, string[] labels)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(labels, nameof(labels));

            return(ApiConnection.Post <IReadOnlyList <Label> >(ApiUrls.IssueLabels(owner, name, number), labels));
        }
        /// <summary>
        /// Gets all  labels for the issue.
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#list-labels-on-an-issue">API documentation</a> for more information.
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="number">The number of the issue</param>
        /// <param name="options">Options for changing the API response</param>
        public Task <IReadOnlyList <Label> > GetAllForIssue(long repositoryId, int number, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <Label>(ApiUrls.IssueLabels(repositoryId, number), options));
        }
 /// <summary>
 /// Removes all labels from an issue
 /// </summary>
 /// <remarks>
 /// See the <a href="http://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue">API documentation</a> for more information.
 /// </remarks>
 /// <param name="repositoryId">The Id of the repository</param>
 /// <param name="number">The number of the issue</param>
 public Task RemoveAllFromIssue(long repositoryId, int number)
 {
     return(ApiConnection.Delete(ApiUrls.IssueLabels(repositoryId, number)));
 }
        /// <summary>
        /// Replaces all labels on the specified issues with the provided labels
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue">API documentation</a> for more information.
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="number">The number of the issue</param>
        /// <param name="labels">The names of the labels to set</param>
        public Task <IReadOnlyList <Label> > ReplaceAllForIssue(long repositoryId, int number, string[] labels)
        {
            Ensure.ArgumentNotNull(labels, "labels");

            return(ApiConnection.Put <IReadOnlyList <Label> >(ApiUrls.IssueLabels(repositoryId, number), labels));
        }
        public Task <IReadOnlyList <Label> > GetAllForIssue(long repositoryId, int number, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <Label>(ApiUrls.IssueLabels(repositoryId, number), null, AcceptHeaders.LabelsApiPreview, options));
        }
        public Task <IReadOnlyList <Label> > AddToIssue(long repositoryId, int number, string[] labels)
        {
            Ensure.ArgumentNotNull(labels, nameof(labels));

            return(ApiConnection.Post <IReadOnlyList <Label> >(ApiUrls.IssueLabels(repositoryId, number), labels, AcceptHeaders.LabelsApiPreview));
        }
Beispiel #14
0
        /// <summary>
        /// Adds a label to an issue
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#add-labels-to-an-issue">API documentation</a> for more information.
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="number">The number of the issue</param>
        /// <param name="labels">The names of the labels to add</param>
        public Task <IReadOnlyList <Label> > AddToIssue(int repositoryId, int number, string[] labels)
        {
            Ensure.ArgumentNotNull(labels, "labels");

            return(ApiConnection.Post <IReadOnlyList <Label> >(ApiUrls.IssueLabels(repositoryId, number), labels));
        }