Socket
Book a DemoInstallSign in
Socket

apifox-openapi

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apifox-openapi

Apifox 开放 API 的 JavaScript SDK.

0.0.2
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

Apifox-OpenApi

Apifox 开放 API 的 JavaScript SDK.

version downloads-month

用法

const fs = require('fs')
const path = require('path')
const { ApifoxOpenApi } = require('apifox-openapi')

const result = fs.readFileSync(path.resolve(__dirname, './openapiv3.json')).toString()

// 初始化
const instance = new ApifoxOpenApi({ 
  // Apifox 访问令牌
  accessToken: 'APS-XXXX',
  // Apifox 开放 API 版本
  apiVersion: '2024-03-28',
  // Apifox 项目 ID
  projectId: '9999999'
})

// 导入 API
instance.importOpenApi(result).then((res)=>{
  console.log('导入成功', res)
}).catch((err)=>{
  console.error('导入失败', err)
})

相关链接

  • Apifox 开放 API

FAQs

Package last updated on 20 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.