@accelbyte/sdk 0.2.0-beta.11 → 0.2.0-beta.12
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/CHANGELOG.md +1 -1
- package/dist/index.browser.es.js +30 -35
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.d.ts +2 -7
- package/dist/index.node.es.js +30 -35
- package/dist/index.node.es.js.map +1 -1
- package/dist/index.node.js +29 -34
- package/dist/index.node.js.map +1 -1
- package/examples/node/index.mjs +30 -26
- package/examples/node/package.json +1 -1
- package/examples/node/yarn.lock +4 -4
- package/package.json +1 -1
package/examples/node/index.mjs
CHANGED
|
@@ -8,7 +8,8 @@ const SDK_CONFIG = {
|
|
|
8
8
|
baseURL: 'https://demo.accelbyte.io',
|
|
9
9
|
clientId: '77f88506b6174c3ea4d925f5b4096ce8',
|
|
10
10
|
namespace: 'accelbyte',
|
|
11
|
-
redirectURI: 'http://localhost:3030'
|
|
11
|
+
redirectURI: 'http://localhost:3030',
|
|
12
|
+
log: 'DEBUG'
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
const sdk = Accelbyte.SDK({
|
|
@@ -21,32 +22,35 @@ main()
|
|
|
21
22
|
async function main() {
|
|
22
23
|
console.info(SDK_CONFIG)
|
|
23
24
|
|
|
24
|
-
console.log(sdk.
|
|
25
|
-
|
|
26
|
-
const listDiscoveryConfigs = await sdk.AccelbyteConfig.PublicTemplate().getDiscoveryTemplateConfigs()
|
|
27
|
-
|
|
28
|
-
console.info('List of discovery configs:')
|
|
29
|
-
console.info(JSON.stringify(listDiscoveryConfigs))
|
|
25
|
+
console.log('-- sdk', sdk.version())
|
|
30
26
|
|
|
31
|
-
const listOfCurrencies = await sdk.Platform.Currency().getCurrencies()
|
|
32
|
-
const listOfItems = await sdk.Platform.Item().fetchItemsByCriteria({})
|
|
33
27
|
|
|
34
|
-
console.
|
|
35
|
-
console.info(JSON.stringify(listOfCurrencies))
|
|
36
|
-
|
|
37
|
-
console.info('List of items:')
|
|
38
|
-
console.info(JSON.stringify(listOfItems))
|
|
39
|
-
|
|
40
|
-
// These require authentication and we can't use it right away.
|
|
41
|
-
// Ensure that you have logged in (have cookies) or pass the access token to the `Authorization` header.
|
|
42
|
-
const listOfNamespaces = sdk.Basic.Namespace({
|
|
43
|
-
config: {
|
|
44
|
-
headers: {
|
|
45
|
-
Authorization: `Bearer <replace-this-with-access-token>`
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}).getNamespaces()
|
|
28
|
+
console.log(sdk.IAM.UserAuthorization().createLoginURL())
|
|
49
29
|
|
|
50
|
-
|
|
51
|
-
|
|
30
|
+
// const listDiscoveryConfigs = await sdk.AccelbyteConfig.PublicTemplate().getDiscoveryTemplateConfigs()
|
|
31
|
+
//
|
|
32
|
+
// console.info('List of discovery configs:')
|
|
33
|
+
// console.info(JSON.stringify(listDiscoveryConfigs))
|
|
34
|
+
//
|
|
35
|
+
// const listOfCurrencies = await sdk.Platform.Currency().getCurrencies()
|
|
36
|
+
// const listOfItems = await sdk.Platform.Item().fetchItemsByCriteria({})
|
|
37
|
+
//
|
|
38
|
+
// console.info('List of namespaces:')
|
|
39
|
+
// console.info(JSON.stringify(listOfCurrencies))
|
|
40
|
+
//
|
|
41
|
+
// console.info('List of items:')
|
|
42
|
+
// console.info(JSON.stringify(listOfItems))
|
|
43
|
+
//
|
|
44
|
+
// // These require authentication and we can't use it right away.
|
|
45
|
+
// // Ensure that you have logged in (have cookies) or pass the access token to the `Authorization` header.
|
|
46
|
+
// const listOfNamespaces = sdk.Basic.Namespace({
|
|
47
|
+
// config: {
|
|
48
|
+
// headers: {
|
|
49
|
+
// Authorization: `Bearer <replace-this-with-access-token>`
|
|
50
|
+
// }
|
|
51
|
+
// }
|
|
52
|
+
// }).getNamespaces()
|
|
53
|
+
//
|
|
54
|
+
// console.info('List of namespaces:')
|
|
55
|
+
// console.info(JSON.stringify(listOfNamespaces))
|
|
52
56
|
}
|
package/examples/node/yarn.lock
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# yarn lockfile v1
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
"@accelbyte/sdk@0.2.0-beta.
|
|
6
|
-
version "0.2.0-beta.
|
|
7
|
-
resolved "https://registry.yarnpkg.com/@accelbyte/sdk/-/sdk-0.2.0-beta.
|
|
8
|
-
integrity sha512-
|
|
5
|
+
"@accelbyte/sdk@0.2.0-beta.11":
|
|
6
|
+
version "0.2.0-beta.11"
|
|
7
|
+
resolved "https://registry.yarnpkg.com/@accelbyte/sdk/-/sdk-0.2.0-beta.11.tgz#84e63974c807bd5ba0804b5e64c5afd209d4062b"
|
|
8
|
+
integrity sha512-a8iwlQ7lDMFDowMavqm4CH2gRFiFRffotJ+M3RGID6iAVGojZfGbuVwTc00dcGDfOK+6yWukBmAniUvAlJ1OHg==
|
|
9
9
|
dependencies:
|
|
10
10
|
axios "0.27.2"
|
|
11
11
|
buffer "6.0.3"
|