fansunited-sdk-umd 1.0.0 → 1.0.4
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 +10 -5
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -33,13 +33,15 @@ in the config.
|
|
|
33
33
|
This is what the SDK config requires:
|
|
34
34
|
|
|
35
35
|
```javascript
|
|
36
|
+
import {FansUnitedSDK} from "fansunited-sdk-esm";
|
|
37
|
+
|
|
36
38
|
let fansUnitedSdk = FansUnitedSDK({
|
|
37
|
-
"
|
|
39
|
+
"apiKey": "your-api-key-here",
|
|
38
40
|
"environment": "dev|prod|sandbox|etc", // default: prod
|
|
39
|
-
"
|
|
40
|
-
"client_id": "asdssfHShdsah4sajal3425j65",
|
|
41
|
+
"clientId": "your-client-id-here",
|
|
41
42
|
"lang": "BG|EN|RO", // default: EN
|
|
42
|
-
"
|
|
43
|
+
"idSchema": "native|enetpulse|sportradar|sportal365", // default: native
|
|
44
|
+
"authProvider": new myTokenProvider()
|
|
43
45
|
});
|
|
44
46
|
```
|
|
45
47
|
|
|
@@ -65,4 +67,7 @@ class myTokenProvider implements FansUnitedAuthInterface() {
|
|
|
65
67
|
// custom logic to delete token...
|
|
66
68
|
};
|
|
67
69
|
}
|
|
68
|
-
```
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The token is being stored in memory for security purposes.
|
|
73
|
+
The Fans United SDK is monitoring for the validity/expiration of the token and issues a new token before expiry.
|