Oct 17, 2024
我们很高兴地宣布发布SharpAPI Node.js SDK客户端——这是一个强大的、由AI驱动的工具,旨在无缝地将工作流程自动化集成到您的JS/Node项目中。
SharpAPI Node.js SDK 客户端 旨在无缝集成强大的 AI 驱动自动化功能到您的 Node.js 应用程序中,使高级功能如简历解析、SEO 标签生成、情感分析等更易于获取。
通过 SharpAPI,开发人员可以自动化跨行业的工作流程,如电子商务、人力资源、营销和旅游业,而无需繁琐的手动 API 设置。
查看我们的 Node.js SDK 直接 ➺ npmjs.com
对于准备开始的 Node.js 开发人员,我们的 SharpAPI Node.js 测试套件 GitHub 存储库提供了实用的代码示例和实际应用案例。探索如何利用各种 API 端点进行快速部署和更好地理解。该套件包括一系列交互式测试,帮助您亲身体验 SharpAPI 的功能,简化集成到您的项目中。查看并开始利用 SharpAPI Node.js SDK 来增强您的应用程序!
SharpAPI Node.js SDK 客户端 提供了跨多个行业的多种功能:
开始使用 SharpAPI Node.js SDK 客户端很容易。您可以通过 npm 或 Yarn 快速设置。
npm install @sharpapi/sharpapi-node-client
yarn add @sharpapi/sharpapi-node-client
要使用 SDK,请在 SharpAPI.com 注册并获取您的 API 密钥。
将您的 API 密钥存储在项目目录中的 .env 文件中:
SHARP_API_KEY=your_sharpapi_api_key_here
安装并使用 dotenv 包来加载您的 .env 文件:
require('dotenv').config();
SharpAPI Node.js SDK 客户端 提供了一个易于使用的接口,用于各种 SharpAPI 功能。以下是一些关键功能的使用示例。
const { SharpApiService } = require('@sharpapi/sharpapi-node-client');
require('dotenv').config();
const sharpApi = new SharpApiService(process.env.SHARP_API_KEY);
(async () => {
try {
const statusUrl = await sharpApi.productCategories("Lenovo Chromebook Laptop", "German", 400, "Neutral", "Optional e-store categories");
const result = await sharpApi.fetchResults(statusUrl);
console.log(result.getResultJson());
} catch (error) {
console.error("Error:", error);
}
})();
const { SharpApiService } = require('@sharpapi/sharpapi-node-client');
require('dotenv').config();
const sharpApi = new SharpApiService(process.env.SHARP_API_KEY);
(async () => {
try {
const statusUrl = await sharpApi.parseResume("path/to/sample_resume.pdf", "English");
const parsedResume = await sharpApi.fetchResults(statusUrl);
console.log(parsedResume.getResultJson());
} catch (error) {
console.error("Error:", error);
}
})();
const { SharpApiService } = require('@sharpapi/sharpapi-node-client');
require('dotenv').config();
const sharpApi = new SharpApiService(process.env.SHARP_API_KEY);
(async () => {
try {
const statusUrl = await sharpApi.productReviewSentiment("This product exceeded my expectations!");
const sentimentResult = await sharpApi.fetchResults(statusUrl);
console.log(sentimentResult.getResultJson());
} catch (error) {
console.error("Error:", error);
}
})();
快乐编码!🚀
您的客户已经需要人工智能。通过推荐最简单的添加方式来获得报酬。