https://huakunshen.github.io/ossinsight-client/
A simple OSSInsight TypeScript SDK generated from the official public API openapi schema. https://raw.githubusercontent.com/pingcap/ossinsight/refs/heads/main/configs/public_api/openapi.yaml You can generate a client in any language with their schema, this package was created to facilitate my own projects.
Official API documentation at https://ossinsight.io/docs/api
It provides client sdk of 3 styles in subpackages
-
openapi-typescript
+openapi-fetch
-
ossinsight-client
import { getClient } from "ossinsight-client"; const client = getClient({ url: "https://api.ossinsight.io/v1" }); const res = await client.GET("/trends/repos/"); expect(res.error).toBeUndefined(); expect(res.data).toBeDefined(); expect(res.response.status).toBe(200);
-
-
-
ossinsight-client/zod-client
import { createApiClient } from "ossinsight-client/zod-client"; const client = createApiClient("https://api.ossinsight.io/v1"); const trendingRepos = await client.get("/trends/repos/"); expect(trendingRepos.data.result.code).toBe(200);
-
-
-
ossinsight-client/heyapi
import { client, listTrendingRepos } from "ossinsight-client/heyapi"; client.setConfig({ baseUrl: "https://api.ossinsight.io/v1", }); const rustTrendingRepos = await listTrendingRepos({ query: { language: "Rust", }, });
-