/// <summary> /// Replaces all topics for the specified repository. /// </summary> /// <remarks> /// See the <a href="https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository">API documentation</a> for more details /// </remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="topics">The topics list to be set.</param> /// <returns>All topics for the repository</returns> public async Task <RepositoryTopics> ReplaceAllTopics(string owner, string name, RepositoryTopics topics) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); var endpoint = ApiUrls.RepositoryTopics(owner, name); return(await ApiConnection.Put <RepositoryTopics>(endpoint, topics, null, AcceptHeaders.RepositoryTopicsPreview).ConfigureAwait(false)); }
/// <summary> /// Replaces all topics for the specified repository. /// </summary> /// <remarks> /// See the <a href="https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository">API documentation</a> for more details /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="topics">The topics list to be set</param> /// <returns>All topics for the repository.</returns> public async Task <RepositoryTopics> ReplaceAllTopics(long repositoryId, RepositoryTopics topics) { var endpoint = ApiUrls.RepositoryTopics(repositoryId); return(await ApiConnection.Put <RepositoryTopics>(endpoint, topics, null, AcceptHeaders.RepositoryTopicsPreview).ConfigureAwait(false)); }