跳转到正文

函数与设置

GitHub

请参阅 Github Readme 了解更多信息。

可以通过以下选项配置 CapacitorUpdater:

属性类型描述默认自
appReadyTimeoutnumber配置原生插件在判定更新“失败”前需等待的毫秒数。支持 Android、iOS 和 Electron。10000 // (10 seconds)
responseTimeoutnumber配置原生插件在判定 API 超时前需等待的毫秒数。支持 Android、iOS 和 Electron。20000 // (20 seconds)
autoDeleteFailedboolean配置插件是否应自动删除失败的 bundle。支持 Android、iOS 和 Electron。true
autoDeletePreviousboolean配置插件是否应在更新成功后自动删除旧的 bundle。支持 Android、iOS 和 Electron。true
autoUpdateboolean | ‘off’ | ‘atBackground’ | ‘atInstall’ | ‘onLaunch’ | ‘always’ | ‘onlyDownload’配置插件如何通过更新服务器使用 Auto Update。true 等同于 “atBackground”;false 等同于 “off”。 - off: 禁用 Auto Update - atBackground: 自动检查并下载,并在应用进入后台时应用更新 - atInstall: 仅在全新安装或 Native Build 更新后立即应用,否则使用 atBackground - onLaunch: 启动时立即应用,否则在启动检查后使用 atBackground - always: 只要 Auto Update 运行就立即应用 - onlyDownload: 自动检查并下载,触发 updateAvailable 事件,但不会自动设置下一个 bundle。即时应用模式(“atInstall”、“onLaunch”、“always”)应配合 —delta 使用,以免更新影响用户体验。在 Android 和 iOS 上,这些模式需要设置 autoSplashscreen: true 以及 @capacitor/splash-screen 且 launchAutoHide: false。支持 Android、iOS 和 Electron。“atBackground” // true is still accepted
resetWhenUpdateboolean当设备安装了更新的 Native Build bundle 时,自动删除之前下载的 bundle。支持 Android、iOS 和 Electron。true
updateUrlstring配置用于发送更新检查请求的 URL / 端点。支持 Android、iOS 和 Electron。https://plugin.capgo.app/updates
channelUrlstring配置用于 Channel 操作的 URL / 端点。支持 Android、iOS 和 Electron。https://plugin.capgo.app/channel_self
statsUrlstring配置用于发送更新统计数据的 URL / 端点。支持 Android、iOS 和 Electron。设置为 "" 可禁用统计报告。https://plugin.capgo.app/stats
publicKeystring配置用于端到端 live update 加密 Version 2 的公钥。支持 Android、iOS 和 Electron。undefined6.2.0
versionstring配置当前 App 版本。这将用于首次更新请求。如果未设置,插件将从原生 code 获取版本。支持 Android、iOS 和 Electron。undefined4.17.48
directUpdateboolean | ‘always’ | ‘atInstall’ | ‘onLaunch’已弃用。请改用 autoUpdate 字符串模式:“atInstall”、“onLaunch” 或 “always”。此选项仍为现有 App 提供支持。Instant apply 应配合 —delta 进行 upload,以免更新影响用户体验。在 Android 和 iOS 上,这些模式需要 autoSplashscreen: true 以及 @capacitor/splash-screen 配合 launchAutoHide: false。- false:从不执行直接更新 - atInstall:等同于 autoUpdate: “atInstall” - onLaunch:等同于 autoUpdate: “onLaunch” - always:等同于 autoUpdate: “always” - true:为向下兼容,等同于 “always”。支持 Android、iOS 和 Electron。false5.1.0
autoSplashscreenboolean在使用即时应用模式(“atInstall”、“onLaunch” 或 “always”,包括已弃用的 directUpdate 值)时必填。必须安装并配置 @capacitor/splash-screen,且 launchAutoHide 设置为 false。启用后,插件会在应用更新完成后或无需更新时自动隐藏 splashscreen。这样你就不需要手动监听 appReady 事件并调用 SplashScreen.hide()。支持 Android 和 iOS。false7.6.0
periodCheckDelaynumber配置定期检查更新的延迟时间,单位为秒。支持 Android、iOS 和 Electron。时间不能少于 600 秒(10 分钟)。600 // (10 minutes)
localS3boolean配置 CLI 以使用本地服务器进行测试,或使用自托管的更新服务器。undefined4.17.48
localHoststring配置 CLI 以使用本地服务器进行测试,或使用自托管的更新服务器。undefined4.17.48
localWebHoststring配置 CLI 以使用本地服务器进行测试,或使用自托管的更新服务器。undefined4.17.48
localSupastring配置 CLI 以使用本地服务器进行测试,或使用自托管的更新服务器。undefined4.17.48
localSupaAnonstring配置 CLI 以使用本地服务器进行测试。undefined4.17.48
localApistring配置 CLI 以使用本地 api 进行测试。undefined6.3.3
localApiFilesstring配置 CLI 以使用本地文件 api 进行测试。undefined6.3.3
allowModifyUrlboolean允许插件从 JavaScript 端动态修改 updateUrl、statsUrl 和 channelUrl。false5.4.0
defaultChannelstring在配置中设置应用的默认 channel。区分大小写。此设置会覆盖云端设置的默认 channel,但仍会遵循云端进行的覆盖操作。undefined5.5.0
appIdstring在配置中设置应用的 app id。undefined6.0.0
keepUrlPathAfterReloadboolean配置插件以在重载后保留 URL 路径。警告:触发重载时,‘window.history’ 将被清空。false6.8.0
disableJSLoggingboolean禁用插件的 JavaScript 日志。如果设为 true,插件将不会向 JavaScript 控制台打印日志,仅保留原生日志。false7.3.0
shakeMenuboolean启用摇一摇手势以显示更新菜单,用于调试和测试false7.5.0

在 capacitor.config.json:

{
"plugins": {
"CapacitorUpdater": {
"appReadyTimeout": 1000 // (1 second),
"responseTimeout": 10 // (10 second),
"autoDeleteFailed": false,
"autoDeletePrevious": false,
"autoUpdate": "onlyDownload",
"resetWhenUpdate": false,
"updateUrl": https://example.com/api/auto_update,
"channelUrl": https://example.com/api/channel,
"statsUrl": https://example.com/api/stats,
"publicKey": undefined,
"version": undefined,
"directUpdate": undefined,
"autoSplashscreen": undefined,
"periodCheckDelay": undefined,
"localS3": undefined,
"localHost": undefined,
"localWebHost": undefined,
"localSupa": undefined,
"localSupaAnon": undefined,
"localApi": undefined,
"localApiFiles": undefined,
"allowModifyUrl": undefined,
"defaultChannel": undefined,
"appId": undefined,
"keepUrlPathAfterReload": undefined,
"disableJSLogging": undefined,
"shakeMenu": undefined
}
}
}

在 capacitor.config.ts:

import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
plugins: {
CapacitorUpdater: {
appReadyTimeout: 1000 // (1 second),
responseTimeout: 10 // (10 second),
autoDeleteFailed: false,
autoDeletePrevious: false,
autoUpdate: 'onlyDownload',
resetWhenUpdate: false,
updateUrl: https://example.com/api/auto_update,
channelUrl: https://example.com/api/channel,
statsUrl: https://example.com/api/stats,
publicKey: undefined,
version: undefined,
directUpdate: undefined,
autoSplashscreen: undefined,
periodCheckDelay: undefined,
localS3: undefined,
localHost: undefined,
localWebHost: undefined,
localSupa: undefined,
localSupaAnon: undefined,
localApi: undefined,
localApiFiles: undefined,
allowModifyUrl: undefined,
defaultChannel: undefined,
appId: undefined,
keepUrlPathAfterReload: undefined,
disableJSLogging: undefined,
shakeMenu: undefined,
},
},
};
export default config;
notifyAppReady() => Promise<AppReadyResult>

通知 Capacitor Updater 当前 bundle 运行正常(如果每次启动 App 时未调用此方法,将会触发回滚)。 默认情况下,应在 App 启动后的前 10 秒内调用此方法,否则会发生回滚。 可以通过 {@link appReadyTimeout} 修改此行为。

返回值: Promise<AppReadyResult>


setUpdateUrl(options: UpdateUrl) => Promise<void>

设置 App 的 updateUrl,该 URL 将用于检查更新。

参数类型描述
optionsUpdateUrl包含用于检查更新的 URL。

自: 5.4.0


setStatsUrl(options: StatsUrl) => Promise<void>

设置应用的 statsUrl,用于发送统计数据。传入空字符串将禁用统计收集。

参数类型描述
optionsStatsUrl包含用于发送统计数据的 URL。

自: 5.4.0


setChannelUrl(options: ChannelUrl) => Promise<void>

设置应用的 channelUrl,用于指定更新频道。

参数类型描述
optionsChannelUrl包含用于设置频道的 URL。

自: 5.4.0


download(options: DownloadOptions) => Promise<BundleInfo>

从提供的 URL 下载新的 bundle。该 URL 应指向一个 zip 文件,其中包含文件,或者包含一个唯一 ID,里面带有你的所有文件。

参数类型描述
optionsDownloadOptions{@link DownloadOptions} 用于下载新的 bundle zip。

返回值: Promise<BundleInfo>


next(options: BundleId) => Promise<BundleInfo>

设置应用重新加载时要使用的下一个 bundle。

参数类型描述
optionsBundleId包含下次应用启动时需设置的下一个 Bundle ID。{@link BundleInfo.id}

返回值: Promise<BundleInfo>


set(options: BundleId) => Promise<void>

设置当前 bundle 并立即重新加载应用。

参数类型描述
optionsBundleId一个 {@link} BundleId} 对象,包含要设置为当前的新的 bundle id。

delete(options: BundleId) => Promise<void>

从原生应用存储中删除指定的 bundle。配合 {@link list} 使用可获取已存储的 Bundle IDs。

参数类型描述
optionsBundleId一个 {@link} BundleId} 包含要删除的 bundle ID 的对象(注意:这是 bundle ID,而非版本名称)

list(options?: ListOptions | undefined) => Promise<BundleListResult>

获取应用中所有已本地下载的 bundles

参数类型描述
optionsListOptions{@link ListOptions} 用于列出 bundles

返回值: Promise<BundleListResult>


reset(options?: ResetOptions | undefined) => Promise<void>

将应用重置为 builtin bundle(即发送至 Apple App Store / Google Play Store 的版本)或上一次成功加载的 bundle。

参数类型描述
optionsResetOptions包含 {@link ResetOptions.toLastSuccessful}, true 重置为内置 bundle 并 false 将重置为上一次成功加载的 bundle。

current() => Promise<CurrentBundleResult>

获取当前的 bundle,如果未设置则返回 builtin. currentNative 是设备上安装的原始 bundle

返回值: Promise<CurrentBundleResult>


reload() => Promise<void>

重新加载视图


setMultiDelay(options: MultiDelayConditions) => Promise<void>

设置一个 {@link} DelayCondition} 数组,其中包含 Plugin 用于延迟更新的条件。 当所有条件都满足后,更新流程将照常重新开始,因此在应用进入后台或被杀死后,更新将会被安装。 对于 date 类型,值应为 ISO8601 日期字符串。 对于 background 类型,值应为毫秒数。 对于 nativeVersion 类型,值应为版本号。 对于 kill 类型,该值不被使用。 该函数目前存在行为不一致的问题:kill 选项在第一次 kill 后会触发更新,而不会像其他选项那样在下次进入后台时触发。这将在未来的重大版本中修复。

参数类型描述
optionsMultiDelayConditions包含 {@link} MultiDelayConditions 条件数组,用于设置

自: 4.3.0


cancelDelay() => Promise<void>

取消 {@link} DelayCondition 以立即处理更新。

自: 4.0.0


getLatest(options?: GetLatestOptions | undefined) => Promise<LatestVersion>

从更新 URL 获取最新的 bundle

参数类型
optionsGetLatestOptions

返回值: Promise<LatestVersion>

自: 4.0.0


setChannel(options: SetChannelOptions) => Promise<ChannelRes>

为该设备设置由插件管理的本地 channel。该 channel 必须 allow_device_self_set 已启用才能生效。

setChannel() 向后端验证 channel,然后将选定的 channel 本地存储在设备上。此操作不会创建或更新后端的 Device Override,因此设备不会在 Capgo dashboard 中显示为已覆盖。只有通过 dashboard 或 Public API 创建的分配才会显示在 Device Override UI 中。

注意事项:

  • 请勿使用此方法在启动时设置 channel。请改用 defaultChannel Capacitor 配置中的
  • 此方法适用于 App 已就绪且用户已进行交互(例如:选择加入 beta 测试计划)之后的使用场景。
  • Public channels 不支持自行分配。 如果 channel 被标记为 public,调用 setChannel() 将返回错误。若要使用 public channel,请改用 unsetChannel() ——设备会自动回退到匹配的 public channel。
  • 使用 listChannels() 以发现哪些 channel 可用以及它们是否允许自行分配。
参数类型描述
optionsSetChannelOptions是否将 {@link} SetChannelOptions} channel 设置为

返回值: Promise<ChannelRes>

自: 4.7.0


unsetChannel(options: UnsetChannelOptions) => Promise<void>

取消该设备由插件管理的本地 channel。这只会清除由 setChannel(); 它不会删除 Dashboard 或 Public API Device Override 记录。

调用此方法后,正常的 channel 优先级规则生效:现有的 Dashboard 或 Public API Device Override 仍然优先;否则,设备可以根据自身条件(平台、设备类型、build type)回退到匹配的 public/default channel。

适用于以下场景:

  • 您想将设备移回默认更新轨道
  • 您想使用 public channel(因为 public channel 无法通过 setChannel())
参数类型
optionsUnsetChannelOptions

自: 4.7.0


getChannel() => Promise<GetChannelRes>

获取此设备的 channel

返回值: Promise<GetChannelRes>

自: 4.8.0


listChannels() => Promise<ListChannelsResult>

列出该设备可用的所有 channel。返回与设备当前环境(平台、模拟器/真机、开发/生产构建)兼容,且为公开或允许自行分配的 channel。

结果中的每个 channel 包含:

  • public:如果 true,这是一个 默认 channel。你无法使用 setChannel()将其分配给自己。相反,如果你要移除你的 channel 分配,请使用 unsetChannel(),设备将自动从该公共频道接收更新。
  • allow_self_set:如果 true,这是一个 可自行分配的 Channel。您可以使用以下方法将设备显式分配到该频道: setChannel().

返回值: Promise<ListChannelsResult>

自: 7.5.0


setCustomId(options: SetCustomIdOptions) => Promise<void>

为该设备设置自定义 ID

参数类型描述
optionsSetCustomIdOptions是 {@link SetCustomIdOptions} 要设置的 customId

自: 4.9.0


getBuiltinVersion() => Promise<BuiltinVersion>

获取原生应用版本;若在配置中已设置,则返回内置版本

返回值: Promise<BuiltinVersion>

自: 5.2.0


getDeviceId() => Promise<DeviceId>

获取用于标识设备的唯一 ID(发送至自动更新服务器)

返回值: Promise<DeviceId>


getPluginVersion() => Promise<PluginVersion>

获取原生 Capacitor Updater 插件版本(发送至自动更新服务器)

返回值: Promise<PluginVersion>


isAutoUpdateEnabled() => Promise<AutoUpdateEnabled>

获取自动更新配置的状态。

返回值: Promise<AutoUpdateEnabled>


removeAllListeners() => Promise<void>

移除该插件的所有监听器。

自: 1.0.0


addListener(‘download’, …)

“addListener(‘download’, …)”章节
addListener(eventName: 'download', listenerFunc: (state: DownloadEvent) => void) => Promise<PluginListenerHandle>

监听 App 中的 bundle 下载事件。在下载开始、下载中以及下载完成后各触发一次。 这将返回下载过程中的所有下载百分比。

参数类型
eventName‘download’
listenerFunc(state: DownloadEvent) => void

返回值: Promise<PluginListenerHandle>

自: 2.0.11


addListener(‘noNeedUpdate’, …)

章节:“addListener(‘noNeedUpdate’, …)”
addListener(eventName: 'noNeedUpdate', listenerFunc: (state: NoNeedEvent) => void) => Promise<PluginListenerHandle>

监听无需更新事件,适合需要在每次启动 App 时强制检查更新的场景

参数类型
eventName‘noNeedUpdate’
listenerFunc(state: NoNeedEvent) => void

返回值: Promise<PluginListenerHandle>

自: 4.0.0


addListener(‘updateAvailable’, …)

“addListener(‘updateAvailable’, …)” 章节
addListener(eventName: 'updateAvailable', listenerFunc: (state: UpdateAvailableEvent) => void) => Promise<PluginListenerHandle>

监听可用更新事件,适用于希望在每次应用启动时强制检查更新的场景

参数类型
eventName‘updateAvailable’
listenerFunc(state: UpdateAvailableEvent) => void

返回值: Promise<PluginListenerHandle>

自: 4.0.0


addListener(‘downloadComplete’, …)

“addListener(‘downloadComplete’, …)” 章节
addListener(eventName: 'downloadComplete', listenerFunc: (state: DownloadCompleteEvent) => void) => Promise<PluginListenerHandle>

监听 downloadComplete 事件。

参数类型
eventName‘downloadComplete’
listenerFunc(state: DownloadCompleteEvent) => void

返回值: Promise<PluginListenerHandle>

自: 4.0.0


addListener(‘majorAvailable’, …)

“addListener(‘majorAvailable’, …)” 章节
addListener(eventName: 'majorAvailable', listenerFunc: (state: MajorAvailableEvent) => void) => Promise<PluginListenerHandle>

监听 App 中的 Major 更新事件。当设置了 disableAutoUpdateBreaking 导致 Major 更新被拦截时,会通过此事件通知您。

参数类型
eventName‘majorAvailable’
listenerFunc(state: MajorAvailableEvent) => void

返回值: Promise<PluginListenerHandle>

自: 2.3.0


addListener(‘updateFailed’, …)

“addListener(‘updateFailed’, …)”章节
addListener(eventName: 'updateFailed', listenerFunc: (state: UpdateFailedEvent) => void) => Promise<PluginListenerHandle>

监听 App 中的更新失败事件,在下次启动 App 时若更新安装失败会通知你

参数类型
eventName‘updateFailed’
listenerFunc(state: UpdateFailedEvent) => void

返回值: Promise<PluginListenerHandle>

自: 2.3.0


addListener(‘downloadFailed’, …)

“addListener(‘downloadFailed’, …)”章节
addListener(eventName: 'downloadFailed', listenerFunc: (state: DownloadFailedEvent) => void) => Promise<PluginListenerHandle>

监听 App 中的下载失败事件,bundle 下载失败时会通知你

参数类型
eventName‘downloadFailed’
listenerFunc(state: DownloadFailedEvent) => void

返回值: Promise<PluginListenerHandle>

自: 4.0.0


addListener(eventName: 'appReloaded', listenerFunc: () => void) => Promise<PluginListenerHandle>

监听 App 中的重载事件,在重载发生后通知你

参数类型
eventName‘appReloaded’
listenerFunc() => void

返回值: Promise<PluginListenerHandle>

自: 4.3.0


addListener(‘appReady’, …)

“addListener(‘appReady’, …)”章节
addListener(eventName: 'appReady', listenerFunc: (state: AppReadyEvent) => void) => Promise<PluginListenerHandle>

监听 App 的 app ready 事件,在 App 就绪后通知您

参数类型
eventName‘appReady’
listenerFunc(state: AppReadyEvent) => void

返回值: Promise<PluginListenerHandle>

自: 5.1.0


isAutoUpdateAvailable() => Promise<AutoUpdateAvailable>

检查是否可用自动更新(未被 serverUrl 禁用)。

返回值: Promise<AutoUpdateAvailable>


getNextBundle() => Promise<BundleInfo | null>

获取应用重新加载时将使用的下一个 bundle。 如果未设置下一个 bundle,则返回 null。

返回值: Promise<BundleInfo | null>

自: 6.8.0


setShakeMenu(options: SetShakeMenuOptions) => Promise<void>

启用或禁用用于调试/测试的摇一摇菜单

参数类型描述
optionsSetShakeMenuOptions包含一个布尔值,用于启用或禁用摇一摇菜单

自: 7.5.0


isShakeMenuEnabled() => Promise<ShakeMenuEnabled>

获取摇一摇菜单的当前状态

返回值: Promise<ShakeMenuEnabled>

自: 7.5.0


属性类型
bundleBundleInfo
属性类型
idstring
versionstring
downloadedstring
checksumstring
statusBundleStatus
属性类型
urlstring
属性类型
urlstring
属性类型
urlstring

该 URL 和版本用于从服务器下载 bundle。如果你使用后端,所有信息都将由 getLatest 方法提供。 如果你不使用后端,则需要提供 bundle 的 URL 和版本。如果你使用 CLI encrypt 命令对 bundle 进行了加密,则需要提供 SessionKey,这些 key 会作为该命令的返回结果。

属性类型描述默认自
urlstring要下载的 bundle zip 文件(例如:dist.zip)的 URL。(可以是任意 URL,例如:Amazon S3、GitHub 标签,或你托管 bundle 的任何其他位置。)
versionstring此 bundle/版本的版本号 code/名称
sessionKeystring当 bundle 使用 session key 加密时,用于该更新的 session keyundefined4.0.0
checksumstring该更新的校验和,应为 sha256 格式;如果 bundle 已加密,还需使用私钥加密undefined4.0.0
manifestManifestEntry[]用于 Delta(manifest)多文件下载的 manifestundefined6.1.0
属性类型
file_namestring | null
file_hashstring | null
download_urlstring | null
属性类型
idstring
属性类型
bundlesBundleInfo[]
属性类型描述默认自
rawboolean是否返回原始 bundle 列表或 manifest。如果为 true,列表将尝试读取内部数据库,而非磁盘上的文件。false6.14.0
属性类型
toLastSuccessfulboolean
属性类型
bundleBundleInfo
nativestring
属性类型
delayConditionsDelayCondition[]
属性类型描述
kindDelayUntilNext在 setMultiDelay 中设置延迟条件
valuestring
属性类型描述自
versionstringgetLatest 方法的返回值4.0.0
checksumstring6
majorboolean
messagestring
sessionKeystring
errorstring
oldstring
urlstring
manifestManifestEntry[]6.1
属性类型描述默认自
channelstring获取最新版本的 Channel。此功能要求该 Channel 必须允许 ‘self_assign’undefined6.8.0
属性类型描述自
statusstring当前设置的 Channel 状态4.7.0
errorstring
messagestring
属性类型
channelstring
triggerAutoUpdateboolean
属性类型
triggerAutoUpdateboolean
属性类型描述自
channelstring获取 channel 的当前状态4.8.0
errorstring
messagestring
statusstring
allowSetboolean
属性类型描述自
channelsChannelInfo[]可用频道列表7.5.0
属性类型描述自
idnumber数字通道 ID7.5.0
namestring通道名称7.5.0
publicboolean如果为 true,则这是默认/回退通道。设备无法自行分配到公共通道。相反,当设备移除其通道覆盖设置(使用 unsetChannel())时,它将自动接收来自匹配的公共通道的更新。7.5.0
allow_self_setboolean如果为 true,设备可以使用以下方式显式地自行分配到此通道: setChannel()。这通常用于 beta 测试、A/B 测试或选择性加入的更新轨道。7.5.0

通道命令使用通道 name而非此数字 id.

属性类型
customIdstring
属性类型
versionstring
属性类型
deviceIdstring
属性类型
versionstring
属性类型
enabledboolean
属性类型
remove() => Promise<void>
属性类型描述自
percentnumber下载进度,范围在 0 到 100 之间。4.0.0
bundleBundleInfo
属性类型描述自
bundleBundleInfo下载进度,范围在 0 到 100 之间。4.0.0
属性类型描述自
bundleBundleInfo当前的下载进度,范围在 0 到 100 之间。4.0.0
属性类型描述自
bundleBundleInfo当有新更新可用时触发。4.0.0
属性类型描述自
versionstring当有新的 major bundle 可用时触发。4.0.0
属性类型描述自
bundleBundleInfo更新安装失败时触发。4.0.0
属性类型描述自
versionstring下载失败时触发。4.0.0
属性类型描述自
bundleBundleInfo当应用准备就绪时触发。5.2.0
statusstring
属性类型
availableboolean
属性类型
enabledboolean
属性类型
enabledboolean

pending: bundle 等待被 SET 作为下一个 bundle。 downloading: bundle 正在下载。 success: bundle 已下载完成,准备好 SET 作为下一个 bundle。 错误:bundle 下载失败。

‘success’ | ‘error’ | ‘pending’ | ‘downloading’

‘background’ | ‘kill’ | ‘nativeVersion’ | ‘date’

如果你正在使用 函数与设置 要规划 dashboard 和 API 操作,请将其连接到 使用 @capgo/capacitor-updater 用于“使用 @capgo/capacitor-updater”中的原生能力, API 概览 关于 API Overview 中的实现细节, 简介 关于 Introduction 中的实现细节, API 密钥 有关 API Keys 的实现细节,以及 设备 有关 Devices 的实现细节。