From 1c5ee676163d3fea923e62cc953a86547431d743 Mon Sep 17 00:00:00 2001 From: Connor Younglund Date: Fri, 2 Dec 2022 15:56:15 -0500 Subject: [PATCH] address PR feedback Signed-off-by: Connor Younglund --- .changeset/short-turtles-dream.md | 4 ++-- plugins/stack-overflow-backend/README.md | 6 ++++-- plugins/stack-overflow-backend/config.d.ts | 8 +++++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.changeset/short-turtles-dream.md b/.changeset/short-turtles-dream.md index 9192f9137c..022ef35f58 100644 --- a/.changeset/short-turtles-dream.md +++ b/.changeset/short-turtles-dream.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-stack-overflow-backend': minor +'@backstage/plugin-stack-overflow-backend': patch --- -Added option to supply API Access Token +Added option to supply API Access Token. This is required in addition to an API key when trying to access the data for a private Stack Overflow Team. diff --git a/plugins/stack-overflow-backend/README.md b/plugins/stack-overflow-backend/README.md index 65fa50e062..0d88ea98d1 100644 --- a/plugins/stack-overflow-backend/README.md +++ b/plugins/stack-overflow-backend/README.md @@ -15,9 +15,11 @@ stackoverflow: baseUrl: https://api.stackexchange.com/2.2 # alternative: your internal stack overflow instance ``` -### Stack Overflow for Teams (private stack overflow instance) +### Stack Overflow for Teams -If you have a private stack overflow instance you will need to supply an API key as well. You can read more about how to set this up by going to [Stack Overflows Help Page](https://stackoverflow.help/en/articles/4385859-stack-overflow-for-teams-api) +If you have an private Stack Overflow instance and/or a private Stack Overflow Team you will need to supply an API key. You can read more about how to set this up by going to [Stack Overflow's Help Page](https://stackoverflow.help/en/articles/4385859-stack-overflow-for-teams-api). + +A private Stack Overflow Team requires both an API key and an API Access Token. Step 3 ("Generate an Access Token via OAuth") from the previously mentioned Help Page explains the process for generating an API Access Token with no expiration. ```yaml stackoverflow: diff --git a/plugins/stack-overflow-backend/config.d.ts b/plugins/stack-overflow-backend/config.d.ts index 617524f0a3..54e517c5d8 100644 --- a/plugins/stack-overflow-backend/config.d.ts +++ b/plugins/stack-overflow-backend/config.d.ts @@ -25,9 +25,15 @@ export interface Config { baseUrl?: string; /** - * The api key to authenticate to Stack Overflow API + * The API key to authenticate to Stack Overflow API * @visibility secret */ apiKey?: string; + + /** + * The API Access Token to authenticate to Stack Overflow API + * @visibility secret + */ + apiAccessToken?: string; }; }