Skip to content
Open
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
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Here is a snippet:
```javascript
const CoreSdk = require('@adobe/aio-sdk-core')
// OR ...
const { Config, Errors, TVMClient, Logger, HttpClient } = require('@adobe/aio-sdk-core')
const { Config, Errors, TVMClient, Logger, HttpClient, AuthClient } = require('@adobe/aio-sdk-core')

// set a Config key value
CoreSdk.Config.set('my.token', 1234)
Expand All @@ -57,7 +57,11 @@ myAppLogger.info('Hello, Dave.')

// create own reference variable to call HttpClient for exponential backoff
const httpClient = CoreSdk.HttpClient
const response = await httpClient.exponentialBackoff('url', {method: 'GET'})
const response = await httpClient.exponentialBackoff('url', { method: 'GET' })

// generate an IMS token using the AuthClient
const authClient = CoreSdk.AuthClient
const token = await generateAccessToken({ clientId, clientSecret, orgId, scopes }, imsEnv = 'prod')
```

## Explore
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"@adobe/aio-lib-core-errors": "^4",
"@adobe/aio-lib-core-logging": "^3",
"@adobe/aio-lib-core-networking": "^5",
"@adobe/aio-lib-core-tvm": "^4"
"@adobe/aio-lib-core-tvm": "^4",
"@adobe/aio-lib-core-auth": "^1"
},
"devDependencies": {
"@adobe/eslint-config-aio-lib-config": "^4.0.0",
Expand Down
9 changes: 8 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const Config = require('@adobe/aio-lib-core-config')
const TVMClient = require('@adobe/aio-lib-core-tvm')
const Logger = require('@adobe/aio-lib-core-logging')
const HttpClient = require('@adobe/aio-lib-core-networking')
const AuthClient = require('@adobe/aio-lib-core-auth')

/** @module @adobe/aio-sdk-core */
module.exports = {
Expand Down Expand Up @@ -46,5 +47,11 @@ module.exports = {
*
* @see {@link https://github.com/adobe/aio-lib-core-networking/blob/master/README.md|@adobe/aio-lib-core-networking}
*/
HttpClient
HttpClient,
/**
* The Auth Module of the Adobe I/O Core SDK
*
* @see {@link https://github.com/adobe/aio-lib-core-auth/blob/master/README.md|@adobe/aio-lib-core-auth}
*/
AuthClient
}
1 change: 1 addition & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ test('module existence', () => {
expect(core.TVMClient).toBeTruthy()
expect(core.Logger).toBeTruthy()
expect(core.HttpClient).toBeTruthy()
expect(core.AuthClient).toBeTruthy()
})
Loading