00-js

中文文档
0.4.1发布于 2024/09/10MITTypeScriptESM + CJS零依赖

Node.js library for interacting with the 00 API.

原始使用文档
文档目录4 节
  1. Install
  2. Setup
  3. Usage
  4. License

00 Node.js SDK

Community made SDK for interacting with the 00 (short for DoubleZero) API.

This package is inspired by the official Resend Node.js SDK.

This package is not officially maintained by 00.

Install

npm install 00-js
# or
pnpm add 00-js
# or
yarn add 00-js

Setup

First, you need to deploy your 00 API. You can do this by following the instructions here.

Then, create an API token in your dashboard.

import { DoubleZero } from '00-js';

const doubleZero = new DoubleZero({
  baseUrl: 'https://double-zero.example.com',
  token: 'your_api_token',
});

Usage

Sending emails is very simple.

await doubleZero.emails.send({
  from: '[email protected]',
  to: '[email protected]',
  subject: 'Test email from Node.js!',
  html: '<h1>Hello world from 00!</h1>',
});

License

MIT License

版本与发布记录

00-js 共发布 6 个版本,首次发布于 2024/07/13;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.4.1latest2024/09/102 年前
0.4.02024/09/082 年前
0.3.02024/08/112 年前
0.2.02024/07/252 年前
0.1.02024/07/132 年前
0.0.12024/07/132 年前

关于 00-js 的常见问题

00-js 是什么?

用于与00 API交互的Node.js库。

如何安装 00-js?

在项目目录运行 npm install 00-js,或使用 pnpm add / yarn add / bun add。

00-js 支持 TypeScript 吗?

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

00-js 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

00-js 可以商用吗?

00-js 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

00-js 还在维护吗?

最新版本 0.4.1 发布于 2024/09/10(2 年前);至今共发布 6 个版本,其中过去 12 个月发布了 0 个;首次发布于 2024/07/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。