Skip to content

Commit

Permalink
Migrate to Stack Overflow PAT
Browse files Browse the repository at this point in the history
  • Loading branch information
artnc committed Jan 5, 2023
1 parent d9aea47 commit 7b3bfbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ engines:
# Last fragment of "Team URL" (https://stackoverflow.com/c/example) found at
# Admin settings > Name & URL > Team URL
team: example
# OAuth access token. See instructions here for how to obtain:
# Personal access token. See instructions here for how to obtain:
# https://stackoverflow.help/en/articles/4385859-stack-overflow-for-teams-api
token: Ex4mp1eEx4mp1eEx4mp1eEx4mp1eEx

Expand Down
8 changes: 2 additions & 6 deletions src/engines/stackoverflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@ const engine: Engine = {
init: ({ team, token }: { team: string; token: string }) => {
// https://stackoverflow.help/en/articles/4385859-stack-overflow-for-teams-api
client = axios.create({
baseURL: "https://api.stackexchange.com/2.3",
baseURL: "https://api.stackoverflowteams.com/2.3",
headers: { "X-API-Access-Token": token },
});
params = {
key: "aZqXxdPFukYIECFmS20DKg((", // https://stackapps.com/apps/oauth/view/24303
site: "stackoverflow",
team: `stackoverflow.com/c/${team}`,
};
params = { team };
},
name: "Stack Overflow",
search: async q => {
Expand Down

0 comments on commit 7b3bfbc

Please sign in to comment.