Labels() public static method

Returns the Uri that returns all of the labels for the specified repository.
public static Labels ( long repositoryId ) : Uri
repositoryId long The Id of the repository
return System.Uri
コード例 #1
0
        /// <summary>
        /// Creates a label.
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#create-a-label">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="newLabel">The data for the label to be created</param>
        /// <returns>The created label</returns>
        public Task <Label> Create(string owner, string repo, NewLabel newLabel)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(repo, "repo");
            Ensure.ArgumentNotNull(newLabel, "newLabel");

            return(ApiConnection.Post <Label>(ApiUrls.Labels(owner, repo), newLabel));
        }
コード例 #2
0
        public Task <Label> Create(string owner, string name, NewLabel newLabel)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(newLabel, nameof(newLabel));

            return(ApiConnection.Post <Label>(ApiUrls.Labels(owner, name), newLabel));
        }
コード例 #3
0
        public Task <IReadOnlyList <Label> > GetAllForRepository(string owner, string name, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <Label>(ApiUrls.Labels(owner, name), options));
        }
コード例 #4
0
        /// <summary>
        /// Creates a label.
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#create-a-label">API documentation</a> for more information.
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="newLabel">The data for the label to be created</param>
        public Task <Label> Create(long repositoryId, NewLabel newLabel)
        {
            Ensure.ArgumentNotNull(newLabel, "newLabel");

            return(ApiConnection.Post <Label>(ApiUrls.Labels(repositoryId), newLabel));
        }
コード例 #5
0
        /// <summary>
        /// Gets all  labels for the repository.
        /// </summary>
        /// <remarks>
        /// See the <a href="http://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository">API documentation</a> for more information.
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="options">Options for changing the API response</param>
        public Task <IReadOnlyList <Label> > GetAllForRepository(long repositoryId, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <Label>(ApiUrls.Labels(repositoryId), options));
        }
コード例 #6
0
        public Task <Label> Create(long repositoryId, NewLabel newLabel)
        {
            Ensure.ArgumentNotNull(newLabel, nameof(newLabel));

            return(ApiConnection.Post <Label>(ApiUrls.Labels(repositoryId), newLabel, AcceptHeaders.LabelsApiPreview));
        }
コード例 #7
0
        public Task <IReadOnlyList <Label> > GetAllForRepository(long repositoryId, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <Label>(ApiUrls.Labels(repositoryId), null, AcceptHeaders.LabelsApiPreview, options));
        }