-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update index.js: use of githubApiGetProject
- Loading branch information
Showing
1 changed file
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,45 @@ | ||
export {}; | ||
|
||
import { getGithubTopics } from 'github-api-get'; | ||
import { githubApiGetProject, getGithubTopics } from 'github-api-get'; | ||
import { GITHUB_PROJECT_TOPICS } from './consts.js'; | ||
|
||
async function realdataTopicsWithPathExpression() { | ||
const loginName = 'roebi'; | ||
const projectName = '01-01-vanilla-HTML5-starter-page'; | ||
const infoLog = true; | ||
const isProd = true; | ||
const githubTopics = githubApiGetProject( | ||
loginName, | ||
projectName, | ||
GITHUB_PROJECT_TOPICS, | ||
infoLog, | ||
isProd | ||
); // as Promise<string[]>; | ||
|
||
const realGithubTopics = await githubTopics; | ||
console.group( | ||
'realGithubTopics, call of githubApiGetProject with constant GITHUB_PROJECT_TOPICS' | ||
); | ||
console.info('realGithubTopics'); | ||
console.info(realGithubTopics); | ||
console.groupEnd(); | ||
} | ||
|
||
async function getGithubTopicsfromgithub() { | ||
const loginName = 'roebi'; | ||
const projectName = '01-01-vanilla-HTML5-starter-page'; | ||
const infoLog = true; | ||
const isProd = true; | ||
// this call is deprecated, use githubApiGetProject with constant GITHUB_PROJECT_TOPICS | ||
const githubTopics = getGithubTopics(loginName, projectName, infoLog, isProd); // as Promise<string[]>; | ||
|
||
const realGithubTopics = await githubTopics; | ||
console.group('realGithubTopics'); | ||
console.group('realGithubTopics, deprecated call getGithubTopics'); | ||
console.info('realGithubTopics'); | ||
console.info(realGithubTopics); | ||
console.groupEnd(); | ||
} | ||
|
||
await realdataTopicsWithPathExpression(); | ||
console.info(); | ||
await getGithubTopicsfromgithub(); |