diff --git a/README.md b/README.md index 4a088b1..b60f23e 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,19 @@ npm install github-api-get ```javascript --- -import { getGithubTopics } from "./githubApi.js"; +// in a module +export {}; -// async ... getGithubTopics from github: +// import the function from the library +import { getGithubTopics } from "github-api-get"; + +// define a example usage function +export async function getGithubTopicsFromGithub() { const loginName = "roebi"; const projectName = "01-01-vanilla-HTML5-starter-page"; const infoLog = true; const isProd = true; + const githubTopics = getGithubTopics(loginName, projectName, infoLog, isProd) as Promise; const realGithubTopics = await githubTopics; @@ -30,7 +36,12 @@ import { getGithubTopics } from "./githubApi.js"; console.info("realGithubTopics"); console.info(realGithubTopics); console.groupEnd(); +} + +// run the example +await getGithubTopicsFromGithub(); +// TODO ... // if you need a part of the project information // github-api.project.topics diff --git a/coverage/consts.js.html b/coverage/consts.js.html index cf4cf81..dd1b058 100644 --- a/coverage/consts.js.html +++ b/coverage/consts.js.html @@ -86,7 +86,7 @@

All files consts.js

+ + + + + diff --git a/coverage/index.html b/coverage/index.html index 70d482a..29cf4dc 100644 --- a/coverage/index.html +++ b/coverage/index.html @@ -91,7 +91,7 @@

All files

- githubApi.js + githubApiGet.js
@@ -117,7 +117,7 @@

All files