endoflife-date

中文文档
1.3.0发布于 2026/11/03MITCommonJS构建来源已验证

The endoflife.date v0 API is currently deprecated, please use the endoflife.date v1 API.

原始使用文档
文档目录8 节
  1. Installation
  2. For Node.js
  3. For browser
  4. Webpack Configuration
  5. Getting Started
  6. Documentation for API Endpoints
  7. Documentation for Models
  8. Documentation for Authorization

endoflife-date

EndoflifeDate - JavaScript client for endoflife-date The endoflife.date v0 API is currently deprecated, please use the endoflife.date v1 API. This SDK is automatically generated by the OpenAPI Generator project:

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install endoflife-date --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your endoflife-date from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/oapicf/endoflife.date-api-clients then install it via:

    npm install oapicf/endoflife.date-api-clients --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var EndoflifeDate = require('endoflife-date');


var api = new EndoflifeDate.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getApiAllJson(callback);

Documentation for API Endpoints

All URIs are relative to https://endoflife.date

ClassMethodHTTP requestDescription
EndoflifeDate.DefaultApigetApiAllJsonGET /api/all.jsonAll Products
EndoflifeDate.DefaultApigetApiProductCycleJsonGET /api/{product}/{cycle}.jsonSingle cycle details
EndoflifeDate.DefaultApigetApiProductJsonGET /api/{product}.jsonGet All Details

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

版本与发布记录

endoflife-date 共发布 5 个版本,首次发布于 2023/09/18;过去 12 个月发布了 3 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.3.0latest2026/11/03今天
1.2.02026/08/162 个月前
1.1.02025/11/3011 个月前
1.0.02024/03/142 年前
0.10.02023/09/183 年前

关于 endoflife-date 的常见问题

endoflife-date 是什么?

endoflife。date v0 API目前已弃用 使用endoflife。日期v1 API。

如何安装 endoflife-date?

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

endoflife-date 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/endoflife-date 是否存在。

endoflife-date 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

endoflife-date 可以商用吗?

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

endoflife-date 还在维护吗?

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