@mittwald/api-client 2.0.1 → 2.0.2
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.
- package/README.md +16 -2
- package/dist/cjs/generated/v2/client.d.ts +195 -207
- package/dist/cjs/generated/v2/client.js +45 -45
- package/dist/cjs/generated/v2/descriptors.d.ts +72 -72
- package/dist/cjs/generated/v2/descriptors.js +108 -108
- package/dist/cjs/generated/v2/types.d.ts +302 -251
- package/dist/esm/generated/v2/client.d.ts +195 -207
- package/dist/esm/generated/v2/client.js +45 -45
- package/dist/esm/generated/v2/descriptors.d.ts +72 -72
- package/dist/esm/generated/v2/descriptors.js +106 -106
- package/dist/esm/generated/v2/types.d.ts +302 -251
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ yarn add @mittwald/api-client
|
|
|
23
23
|
Import the client:
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
|
-
import
|
|
26
|
+
import { MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
To create a client instance you can use one of the following factory method for
|
|
@@ -40,7 +40,7 @@ on how to obtain an API token and how to get started with the API.
|
|
|
40
40
|
## Example
|
|
41
41
|
|
|
42
42
|
```typescript
|
|
43
|
-
import
|
|
43
|
+
import { MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
44
44
|
|
|
45
45
|
const mittwaldApi = MittwaldAPIClient.newWithToken("your-access-token");
|
|
46
46
|
|
|
@@ -66,3 +66,17 @@ To intercept requests or responses you can use
|
|
|
66
66
|
[pkg-auth]:
|
|
67
67
|
https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-to-github-packages
|
|
68
68
|
[api-getting-started]: https://developer.mittwald.de/docs/v2/api/intro
|
|
69
|
+
|
|
70
|
+
## Usage with TypeScript
|
|
71
|
+
|
|
72
|
+
All response and request types can be imported from the `MittwaldAPIV2`
|
|
73
|
+
namespace.
|
|
74
|
+
|
|
75
|
+
### Importing types
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
79
|
+
|
|
80
|
+
type Project =
|
|
81
|
+
MittwaldAPIV2.Paths.V2Projects.Get.Responses.$200.Content.ApplicationJson[number];
|
|
82
|
+
```
|