@segment/public-api-sdk-typescript 34.2.0-b5873 → 34.2.0-b5886

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 +6 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -40,20 +40,17 @@ You are now ready to start making calls to Public API!
40
40
  ## Example
41
41
 
42
42
  ```typescript
43
- import * as publicApi from '@segment/public-api-sdk-typescript'
43
+ import * as PublicAPI from '@segment/public-api-sdk-typescript'
44
44
 
45
- const TOKEN = // ...
45
+ const TOKEN = '...' // fetch your token from a secure location
46
46
 
47
- const api = publicApi.configureApis(TOKEN)
48
- publicApi.unwrap(api.workspaces.getWorkspaceCurrent())
47
+ const { workspaces } = PublicAPI.configureApis(TOKEN)
48
+ PublicAPI.unwrap(workspaces.getWorkspace())
49
49
  .then((result) => {
50
- console.log(`Result:\n ${JSON.stringify(result)}`);
50
+ console.log(JSON.stringify(result))
51
51
  })
52
- .catch((error) => {
53
- console.log("ERROR\n:", error)
54
- }
52
+ .catch(console.error)
55
53
  )
56
-
57
54
  ```
58
55
 
59
56
  ## Contributing
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "uuid": "^8.3.2",
19
19
  "request": "^2.88.2"
20
20
  },
21
- "version": "34.2.0-b5873",
21
+ "version": "34.2.0-b5886",
22
22
  "devDependencies": {
23
23
  "@types/bluebird": "^3.5.33",
24
24
  "@types/jest": "^29",