@accelbyte/sdk 0.2.0-beta.4 → 0.2.0-beta.8

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.
@@ -11,7 +11,7 @@
11
11
  "link:stop": "yarn unlink @accelbyte/sdk && yarn install --force"
12
12
  },
13
13
  "dependencies": {
14
- "@accelbyte/sdk": "0.2.0-beta.4",
14
+ "@accelbyte/sdk": "0.2.0-beta.5",
15
15
  "@next/font": "13.0.7",
16
16
  "@types/node": "18.11.17",
17
17
  "@types/react": "18.0.26",
@@ -8,7 +8,7 @@
8
8
  "link:stop": "yarn unlink @accelbyte/sdk && yarn install --force"
9
9
  },
10
10
  "dependencies": {
11
- "@accelbyte/sdk": "0.2.0-beta.4",
11
+ "@accelbyte/sdk": "0.2.0-beta.5",
12
12
  "dotenv": "16.0.3"
13
13
  }
14
14
  }
@@ -0,0 +1,13 @@
1
+ This is a TypeScript example using the SDK in a Node environment
2
+
3
+ ## Getting Started
4
+
5
+ Run the command below:
6
+
7
+ ```bash
8
+ cd accelbyte-web-sdk/packages/sdk
9
+ # or
10
+ node --loader ts-node/esm examples/typescript-node/node-example.ts
11
+ ```
12
+
13
+
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Copyright (c) 2023 AccelByte Inc. All Rights Reserved
3
+ * This is licensed software from AccelByte Inc, for limitations
4
+ * and restrictions contact your company contract manager.
5
+ */
6
+
7
+ // import { Accelbyte } from '@accelbyte/sdk'
8
+ import { config } from 'dotenv'
9
+
10
+ import { Accelbyte } from '../../src/AccelbyteSdkFactory'
11
+
12
+ config()
13
+
14
+ const SDK_CONFIG = {
15
+ baseURL: 'https://demo.accelbyte.io',
16
+ clientId: '77f88506b6174c3ea4d925f5b4096ce8',
17
+ namespace: 'accelbyte',
18
+ redirectURI: 'http://localhost:3030'
19
+ }
20
+
21
+ const sdk = Accelbyte.SDK({
22
+ options: SDK_CONFIG
23
+ })
24
+
25
+ // Sample SDK calls:
26
+ main()
27
+
28
+ async function main() {
29
+ console.info(SDK_CONFIG)
30
+
31
+ // console.log(sdk.IAM.)
32
+ console.log(sdk.IAM.UserAuthorization().createLoginURL())
33
+ //
34
+ // const listDiscoveryConfigs = await sdk.AccelbyteConfig.PublicTemplate().getDiscoveryTemplateConfigs()
35
+ //
36
+ // console.info('List of discovery configs:')
37
+ // console.info(JSON.stringify(listDiscoveryConfigs))
38
+ //
39
+ // const listOfCurrencies = await sdk.Platform.Currency().getCurrencies()
40
+ // const listOfItems = await sdk.Platform.Item().fetchItemsByCriteria({})
41
+ //
42
+ // console.info('List of namespaces:')
43
+ // console.info(JSON.stringify(listOfCurrencies))
44
+ //
45
+ // console.info('List of items:')
46
+ // console.info(JSON.stringify(listOfItems))
47
+ //
48
+ // // These require authentication and we can't use it right away.
49
+ // // Ensure that you have logged in (have cookies) or pass the access token to the `Authorization` header.
50
+ // const listOfNamespaces = sdk.Basic.Namespace({
51
+ // config: {
52
+ // headers: {
53
+ // Authorization: `Bearer <replace-this-with-access-token>`
54
+ // }
55
+ // }
56
+ // }).getNamespaces()
57
+ //
58
+ // console.info('List of namespaces:')
59
+ // console.info(JSON.stringify(listOfNamespaces))
60
+ }
@@ -11,7 +11,7 @@
11
11
  "link:stop": "yarn unlink @accelbyte/sdk && yarn install --force"
12
12
  },
13
13
  "dependencies": {
14
- "@accelbyte/sdk": "0.2.0-beta.4",
14
+ "@accelbyte/sdk": "0.2.0-beta.5",
15
15
  "dotenv": "16.0.3",
16
16
  "react": "^18.2.0",
17
17
  "react-dom": "^18.2.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@accelbyte/sdk",
3
- "version": "0.2.0-beta.4",
3
+ "version": "0.2.0-beta.8",
4
4
  "author": "AccelByte Inc",
5
5
  "license": "AccelByte License",
6
6
  "main": "./dist/index.node.js",