From def374d253095194133b94736bb332f8efdb673d Mon Sep 17 00:00:00 2001 From: Kristian Hellang Date: Wed, 18 Mar 2015 21:30:36 +0100 Subject: [PATCH] Nuke GetReadme and GetReadmeHtml :fire: Closes #750 --- .../Clients/IObservableRepositoriesClient.cs | 18 ----------- .../Clients/ObservableRepositoriesClient.cs | 24 -------------- .../Clients/RepositoriesClientTests.cs | 27 ---------------- Octokit/Clients/IRepositoriesClient.cs | 26 --------------- Octokit/Clients/RepositoriesClient.cs | 32 ------------------- 5 files changed, 127 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs b/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs index e8f914b0..222cea82 100644 --- a/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs +++ b/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs @@ -97,24 +97,6 @@ namespace Octokit.Reactive Justification = "Makes a network request")] IObservable GetAllForOrg(string organization); - /// - /// Returns the HTML rendered README. - /// - /// The owner of the repository - /// The name of the repository - /// - [Obsolete("This method has been obsoleted by Content.GetReadme. Please use that instead.")] - IObservable GetReadme(string owner, string name); - - /// - /// Returns just the HTML portion of the README without the surrounding HTML document. - /// - /// The owner of the repository - /// The name of the repository - /// - [Obsolete("This method has been obsoleted by Content.GetReadmeHtml. Please use that instead.")] - IObservable GetReadmeHtml(string owner, string name); - /// /// A client for GitHub's Commit Status API. /// diff --git a/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs index a942c2a8..9c17dbf8 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs @@ -159,30 +159,6 @@ namespace Octokit.Reactive return _connection.GetAndFlattenAllPages(ApiUrls.OrganizationRepositories(organization)); } - /// - /// Returns the HTML rendered README. - /// - /// The owner of the repository - /// The name of the repository - /// - [Obsolete("This method has been obsoleted by Content.GetReadme. Please use that instead.")] - public IObservable GetReadme(string owner, string name) - { - return _client.Content.GetReadme(owner, name).ToObservable(); - } - - /// - /// Returns just the HTML portion of the README without the surrounding HTML document. - /// - /// The owner of the repository - /// The name of the repository - /// - [Obsolete("This method has been obsoleted by Content.GetReadmeHtml. Please use that instead.")] - public IObservable GetReadmeHtml(string owner, string name) - { - return _client.Content.GetReadmeHtml(owner, name).ToObservable(); - } - /// /// A client for GitHub's Commit Status API. /// diff --git a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs index 9d868b52..60893bd5 100644 --- a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs @@ -575,33 +575,6 @@ public class RepositoriesClientTests } } - public class TheGetReadmeMethod - { - [IntegrationTest] - public async Task ReturnsReadmeForSeeGit() - { - var github = Helper.GetAuthenticatedClient(); - - var readme = await github.Repository.GetReadme("octokit", "octokit.net"); - Assert.Equal("README.md", readme.Name); - string readMeHtml = await readme.GetHtmlContent(); - Assert.True(readMeHtml.StartsWith("
> GetAllForOrg(string organization); - /// - /// Gets the preferred README for the specified repository. - /// - /// - /// See the API documentation for more information. - /// - /// The owner of the repository - /// The name of the repository - /// Thrown when a general API error occurs. - /// - [Obsolete("This method has been obsoleted by Content.GetReadme. Please use that instead.")] - Task GetReadme(string owner, string name); - - /// - /// Gets the perferred README's HTML for the specified repository. - /// - /// - /// See the API documentation for more information. - /// - /// The owner of the repository - /// The name of the repository - /// Thrown when a general API error occurs. - /// - [Obsolete("This method has been obsoleted by Content.GetReadmeHtml. Please use that instead.")] - Task GetReadmeHtml(string owner, string name); - /// /// A client for GitHub's Commit Status API. /// diff --git a/Octokit/Clients/RepositoriesClient.cs b/Octokit/Clients/RepositoriesClient.cs index b8f68c83..3c978298 100644 --- a/Octokit/Clients/RepositoriesClient.cs +++ b/Octokit/Clients/RepositoriesClient.cs @@ -254,38 +254,6 @@ namespace Octokit return ApiConnection.GetAll(ApiUrls.OrganizationRepositories(organization)); } - /// - /// Gets the preferred README for the specified repository. - /// - /// - /// See the API documentation for more information. - /// - /// The owner of the repository - /// The name of the repository - /// Thrown when a general API error occurs. - /// - [Obsolete("This method has been obsoleted by Content.GetReadme. Please use that instead.")] - public Task GetReadme(string owner, string name) - { - return Content.GetReadme(owner, name); - } - - /// - /// Gets the perferred README's HTML for the specified repository. - /// - /// - /// See the API documentation for more information. - /// - /// The owner of the repository - /// The name of the repository - /// Thrown when a general API error occurs. - /// - [Obsolete("This method has been obsoleted by Content.GetReadmeHtml. Please use that instead.")] - public Task GetReadmeHtml(string owner, string name) - { - return Content.GetReadmeHtml(owner, name); - } - /// /// A client for GitHub's Commit Status API. ///