public static Label ( long repositoryId, string labelName ) : |
||
repositoryId | long | The Id of the repository |
labelName | string | The name of label |
Результат |
/// <summary> /// Updates a label. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/issues/labels/#update-a-label">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="labelName">The name of the label</param> /// <param name="labelUpdate">The data for the label to be updated</param> public Task <Label> Update(long repositoryId, string labelName, LabelUpdate labelUpdate) { Ensure.ArgumentNotNullOrEmptyString(labelName, nameof(labelName)); Ensure.ArgumentNotNull(labelUpdate, nameof(labelUpdate)); return(ApiConnection.Post <Label>(ApiUrls.Label(repositoryId, labelName), labelUpdate, AcceptHeaders.LabelsApiPreview)); }
/// <summary> /// Updates a label. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/issues/labels/#update-a-label">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="labelName">The name of the label</param> /// <param name="labelUpdate">The data for the label to be updated</param> public Task <Label> Update(int repositoryId, string labelName, LabelUpdate labelUpdate) { Ensure.ArgumentNotNullOrEmptyString(labelName, "labelName"); Ensure.ArgumentNotNull(labelUpdate, "labelUpdate"); return(ApiConnection.Post <Label>(ApiUrls.Label(repositoryId, labelName), labelUpdate)); }
/// <summary> /// Deletes a label. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/issues/labels/#delete-a-label">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="labelName">The name of the label</param> public Task Delete(string owner, string name, string labelName) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNullOrEmptyString(labelName, "labelName"); return(ApiConnection.Delete(ApiUrls.Label(owner, name, labelName))); }
public Task <Label> Get(string owner, string name, string labelName) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNullOrEmptyString(labelName, nameof(labelName)); return(ApiConnection.Get <Label>(ApiUrls.Label(owner, name, labelName), null, AcceptHeaders.LabelsApiPreview)); }
/// <summary> /// Gets a single Label by name. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/issues/labels/#get-a-single-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="name">The name of the label</param> /// <returns>The label</returns> public Task <Label> Get(string owner, string repo, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(repo, "repo"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); return(ApiConnection.Get <Label>(ApiUrls.Label(owner, repo, name))); }
/// <summary> /// Updates a label. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/issues/labels/#update-a-label">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="labelName">The name of the label</param> /// <param name="labelUpdate">The data for the label to be updated</param> public Task <Label> Update(string owner, string name, string labelName, LabelUpdate labelUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNullOrEmptyString(labelName, "labelName"); Ensure.ArgumentNotNull(labelUpdate, "labelUpdate"); return(ApiConnection.Post <Label>(ApiUrls.Label(owner, name, labelName), labelUpdate)); }
public Task <Label> Update(long repositoryId, string labelName, LabelUpdate labelUpdate) { Ensure.ArgumentNotNullOrEmptyString(labelName, nameof(labelName)); Ensure.ArgumentNotNull(labelUpdate, nameof(labelUpdate)); // BUG: this should be a PATCH instead of POST return(ApiConnection.Post <Label>(ApiUrls.Label(repositoryId, labelName), labelUpdate)); }
public Task <Label> Update(string owner, string name, string labelName, LabelUpdate labelUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNullOrEmptyString(labelName, nameof(labelName)); Ensure.ArgumentNotNull(labelUpdate, nameof(labelUpdate)); // BUG: this should be a PATCH instead of POST return(ApiConnection.Post <Label>(ApiUrls.Label(owner, name, labelName), labelUpdate, AcceptHeaders.LabelsApiPreview)); }
/// <summary> /// Deletes a label. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/issues/labels/#delete-a-label">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="labelName">The name of the label</param> public Task Delete(long repositoryId, string labelName) { Ensure.ArgumentNotNullOrEmptyString(labelName, "labelName"); return(ApiConnection.Delete(ApiUrls.Label(repositoryId, labelName))); }
public Task <Label> Get(long repositoryId, string labelName) { Ensure.ArgumentNotNullOrEmptyString(labelName, nameof(labelName)); return(ApiConnection.Get <Label>(ApiUrls.Label(repositoryId, labelName), null, AcceptHeaders.LabelsApiPreview)); }
/// <summary> /// Gets a single Label by name. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/issues/labels/#get-a-single-label">API documentation</a> for more information. /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="labelName">The name of the label</param> public Task <Label> Get(int repositoryId, string labelName) { Ensure.ArgumentNotNullOrEmptyString(labelName, "labelName"); return(ApiConnection.Get <Label>(ApiUrls.Label(repositoryId, labelName))); }