@cumulus/api-client

中文文档
22.5.0发布于 2026/11/06Apache-2.0TypeScript近 30 天下载 3142

API client for working with the Cumulus archive API

原始使用文档
文档目录4 节
  1. Usage
  2. Example
  3. About Cumulus
  4. Contributing

@cumulus/api-client

This module provides functions that facilitate programatic access to the Cumulus API for processing functions and integration testing. These methods utilize a 'private' internal API lambda that utilizes the same underlying code the 'public' API Gateway utilizes.

Usage

The various exports from this module provide wrappers around common calls to the Cumulus API. By default they're utilizing the provided cumulusApiClient.invokeApi method as a callback, but an option to provide an alternate/wrapped version (e.g. for validation) is built in to all methods.

npm install @cumulus/api-client

Example

const { granules } = require('@cumulus/api-client');

const granule = await granules.getGranule({
  prefix: process.env.STACKNAME,
  granuleId,
  collectionId
});

The above example call will return the parsed JSON body of the response from the API (e.g. JSON.parse(response.body)).

About Cumulus

Cumulus is a cloud-based data ingest, archive, distribution and management prototype for NASA's future Earth science data streams.

Cumulus Documentation

Contributing

To make a contribution, please see our contributing guidelines.

版本与发布记录

@cumulus/api-client 共发布 180 个版本,首次发布于 2020/03/06;过去 12 个月发布了 35 个版本。

版本发布日期距今
22.5.0latest2026/11/065 天前
22.4.42026/11/065 天前
22.4.32026/10/031 个月前
22.4.22026/09/251 个月前
22.4.12026/09/151 个月前
22.4.02026/09/022 个月前

其他发布通道:release-v2.0.8 → 2.0.8,release-v6.0.1 → 6.0.1,release-v8.1.1 → 8.1.1,release-v9.2.1 → 9.2.1,release-v8.1.2 → 8.1.2,release-v9.2.2 → 9.2.2。

关于 @cumulus/api-client 的常见问题

@cumulus/api-client 是什么?

API client for working with the Cumulus archive API

如何安装 @cumulus/api-client?

在项目目录运行 npm install @cumulus/api-client,或使用 pnpm add / yarn add / bun add。

@cumulus/api-client 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cumulus/api-client 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.23.4。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@cumulus/api-client 可以商用吗?

@cumulus/api-client 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@cumulus/api-client 的下载量有多少?

根据 npm 官方下载统计,@cumulus/api-client 在 2026/10/11 – 2026/11/09 这 30 天内被下载 3,142 次,日均约 105 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cumulus/api-client 还在维护吗?

最新版本 22.5.0 发布于 2026/11/06(5 天前);至今共发布 180 个版本,其中过去 12 个月发布了 35 个;首次发布于 2020/03/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。