From 619b1c9b390abccf72d0f6628baab23089e64865 Mon Sep 17 00:00:00 2001 From: d-a-s Date: Thu, 26 Jul 2018 10:32:04 -0400 Subject: [PATCH] appClient - all GitHubApps methods inside subclass In implementing this, I found that `appClient.GetCurrent()` (etc.) don't work, but that there is a subclass, so that `appClient.GitHubApps.GetCurrent()` etc does work. Took me a while to figure it out, thought that updated docs might help others. --- docs/github-apps.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/github-apps.md b/docs/github-apps.md index 8184e83e87..89787aaa15 100644 --- a/docs/github-apps.md +++ b/docs/github-apps.md @@ -54,13 +54,13 @@ Now we have an authenticated `GitHubApp` (`appClient`), we can query various top ``` csharp // Get the current authenticated GitHubApp -var app = await appClient.GetCurrent(); +var app = await appClient.GitHubApps.GetCurrent(); // Get a list of installations for the authenticated GitHubApp -var installations = await appClient.GetAllInstallationsForCurrent(); +var installations = await appClient.GitHubApps.GetAllInstallationsForCurrent(); // Get a specific installation of the authenticated GitHubApp by it's installation Id -var installation = await appClient.GetInstallation(123); +var installation = await appClient.GitHubApps.GetInstallation(123); ``` @@ -72,7 +72,7 @@ In order to do more than top level calls, a `GitHubApp` needs to authenticate as ``` csharp // Create an Installation token for Insallation Id 123 -var response = await appClient.CreateInstallationToken(123); +var response = await appClient.GitHubApps.CreateInstallationToken(123); // NOTE - the token will expire in 1 hour! response.ExpiresAt;