@argos-ci/api-client 0.24.0 → 0.24.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +37 -3
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,15 +1,49 @@
1
1
  <p align="center">
2
2
  <a href="https://argos-ci.com/?utm_source=github&utm_medium=logo" target="_blank">
3
- <img src="https://raw.githubusercontent.com/argos-ci/argos/main/resources/logos/logo-github-readme.png" alt="Argos" width="300" height="61">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/argos-ci/argos/main/resources/logos/github-readme-logo-dark.png">
5
+ <img alt="Argos" src="https://raw.githubusercontent.com/argos-ci/argos/main/resources/logos/github-readme-logo-light.png" width="360" height="70">
6
+ </picture>
4
7
  </a>
5
8
  </p>
6
9
 
7
- _Argos is a visual testing solution that fits in your workflow to avoid visual regression. Takes screenshots on each commit and be notified if something changes._
10
+ <p align="center"><strong>The open source visual testing platform for AI-native engineering teams.</strong></p>
8
11
 
9
12
  # Argos API Client
10
13
 
11
- Argos API Client to interact with Argos API.
14
+ A typed client for the [Argos API](https://api.argos-ci.com/v2/), built on [openapi-fetch](https://openapi-ts.dev/openapi-fetch/).
12
15
 
13
16
  [![npm version](https://img.shields.io/npm/v/@argos-ci/api-client.svg)](https://www.npmjs.com/package/@argos-ci/api-client)
14
17
  [![npm dm](https://img.shields.io/npm/dm/@argos-ci/api-client.svg)](https://www.npmjs.com/package/@argos-ci/api-client)
15
18
  [![npm dt](https://img.shields.io/npm/dt/@argos-ci/api-client.svg)](https://www.npmjs.com/package/@argos-ci/api-client)
19
+
20
+ ## Installation
21
+
22
+ ```sh
23
+ npm install @argos-ci/api-client
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ Create a client and call any endpoint. Requests and responses are fully typed from the Argos OpenAPI schema:
29
+
30
+ ```ts
31
+ import { createClient } from "@argos-ci/api-client";
32
+
33
+ const client = createClient({
34
+ authToken: process.env.ARGOS_TOKEN,
35
+ });
36
+
37
+ const { data, error } = await client.GET("/project");
38
+
39
+ if (error) {
40
+ throw new Error(error.error);
41
+ }
42
+
43
+ console.log(data);
44
+ ```
45
+
46
+ ## Links
47
+
48
+ - [Official Docs](https://argos-ci.com/docs)
49
+ - [Discord](https://argos-ci.com/discord)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@argos-ci/api-client",
3
3
  "description": "Argos API Client library.",
4
- "version": "0.24.0",
4
+ "version": "0.24.4",
5
5
  "author": "Smooth Code",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -54,5 +54,5 @@
54
54
  "openapi-fetch": "^0.17.0",
55
55
  "p-retry": "^8.0.0"
56
56
  },
57
- "gitHead": "ee2e5d3c14c83e07dfffa14ddc9f34f934f8c368"
57
+ "gitHead": "1b25b7c1109a3d032d627c5f9d2f2c3937731aea"
58
58
  }