Skip to main content
Glama
apifox.test.ts737 B
import { extractProjectIdAndApiIdFromText, fetchApiInfoApi } from "../apifox.js"; import { describe, it, expect } from 'vitest' describe('fetchApiInfoApi', () => { it('should fetch api info', async () => { const result = await fetchApiInfoApi('5333436', '269566330','') expect(result).toMatchInlineSnapshot(`"{"success":false,"errorCode":"403012","errorMessage":"No project maintainer privilege"}"`) }) it('should extract project id and api id from text', () => { const result = extractProjectIdAndApiIdFromText('https://app.apifox.com/link/project/5333436/apis/api-271295333') expect(result).toMatchInlineSnapshot(` { "apiId": "271295333", "projectId": "5333436", } `) }) })

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sujianqingfeng/mcp-apifox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server