Skip to content

feat: [EXT-2183] get-management-token #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .env.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# App Id for the test Application
APP_ID=
# Space where the Application is Installed
SPACE_ID=
# Environment where the Application is Installed
ENVIRONMENT_ID=
# Organization where the Application Definition belongs
ORGANIZATION_ID=
# A personal access token to register the keypair before the tests
PERSONAL_ACCESS_TOKEN=
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
.idea
.idea
keys
.env
7 changes: 5 additions & 2 deletions .typedocrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
"excludeNotDocumented": true,
"exclude": [
"**/*.spec.ts",
"**/*/index.ts"
"**/*/index.ts",
"src/utils/**/*",
"test/**/*"
],
"out": "docs",
"theme": "minimal"
"stripInternal": true,
"excludeNotExported": true
}
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@ and include it in your code like

```js
const {getManagementToken} = require('contentful-node-apps-toolkit');
const {appInstallationId, spaceId, privateKey} = require('./some-constants');

getManagementToken(PRIVATE_KEY)
.then(token => {
getManagementToken(privateKey, {appInstallationId, spaceId})
.then((token) => {
console.log('Here is your app token')
console.log(token)
})
```

## API Docs

API documentation is available [here](https://contentful.github.io/node-apps-toolkit/)
API documentation is available [here](https://contentful.github.io/node-apps-toolkit/)

## Testing

> **:warning: Please Note**
>
> In order to run integration tests all the environment variables present in
[`.env.tpl`](./.env.tpl) must be provided.
2 changes: 1 addition & 1 deletion docs/assets/css/main.css

Large diffs are not rendered by default.

183 changes: 69 additions & 114 deletions docs/globals.html

Large diffs are not rendered by default.

195 changes: 84 additions & 111 deletions docs/index.html

Large diffs are not rendered by default.

233 changes: 112 additions & 121 deletions docs/modules/_get_management_token_.html

Large diffs are not rendered by default.

Loading