@sermas/api-client 1.0.0-alpha3 → 1.0.0-alpha4

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 +24 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -6,6 +6,30 @@
6
6
  npm i -s @sermas/api-client
7
7
  ```
8
8
 
9
+ ## Usage
10
+
11
+ ```ts
12
+ import {createSermasClient} from '@sermas/api-client'
13
+
14
+
15
+ const main = async () => {
16
+
17
+ const client = await createSermasClient({
18
+ appId: 'my-app',
19
+ access_token: '<token>',
20
+ refresh_token: '<token>',
21
+ domain: 'http://localhost:8080',
22
+ })
23
+
24
+ const res = await client.api.authentication.whoami()
25
+
26
+ console.log(`Hello from ${res.preferred_username}`)
27
+
28
+ }
29
+
30
+ main().catch(e => console.error(e))
31
+ ```
32
+
9
33
 
10
34
  ## Development
11
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sermas/api-client",
3
- "version": "1.0.0-alpha3",
3
+ "version": "1.0.0-alpha4",
4
4
  "description": "Sermas API client",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -51,4 +51,4 @@
51
51
  },
52
52
  "author": "",
53
53
  "license": "Apache-2.0"
54
- }
54
+ }