@adobe/aio-sdk- core (英语)
这是Adobe I/O Core SDK。 其中包括:
模块可以添加到您的项目中:
npm install @adobe/aio-sdk-core --save
这是片段:
const CoreSdk = require('@adobe/aio-sdk-core')
// OR ...
const { Config, Errors, TVMClient, Logger, HttpClient, AuthClient } = require('@adobe/aio-sdk-core')
// set a Config key value
CoreSdk.Config.set('my.token', 1234)
// get all stored config values
CoreSdk.Config.get()
// create your own Error wrapper here, see @adobe/aio-lib-core-error docs
const { AioCoreSDKError, AioCoreSDKErrorWrapper } = CoreSdk.Errors
// init the TVM client for further use
const tvm = await CoreSdk.TVMClient.init({ ow: { auth: '<myauth>', namespace: '<mynamespace>' } })
// create a Logger
const myAppLogger = CoreSdk.Logger('MyApp')
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' })
// generate an IMS token using the AuthClient
const authClient = CoreSdk.AuthClient
const token = await generateAccessToken({ clientId, clientSecret, orgId, scopes }, imsEnv = 'prod')
探索
goto API 密码
捐款
欢迎捐款! 读取 贡献指南 更多信息.
许可证发放
这个项目根据Apache V2许可证获得许可. 见 自由主义 更多信息.