@argos-ci/api-client
v0.26.0
Published
Argos API Client library.
Readme
Argos API Client
A typed client for the Argos API, built on openapi-fetch.
Installation
npm install @argos-ci/api-clientUsage
Create a client and call any endpoint. Requests and responses are fully typed from the Argos OpenAPI schema:
import { createClient } from "@argos-ci/api-client";
const client = createClient({
authToken: process.env.ARGOS_TOKEN,
});
const { data, error } = await client.GET("/project");
if (error) {
throw new Error(error.error);
}
console.log(data);