comprodls-sdk 2.46.0 → 2.46.1

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/test.js DELETED
@@ -1,84 +0,0 @@
1
- var orgId = 'aberystwyth-thor';
2
- var ComproDLS = require('../comprodls-sdk-js/lib/comprodls.js').init('thor', 'asgard', {orgId});
3
-
4
- var accountId = 'cup1';
5
- var tokenObj = {
6
- "access_token" : "a8e3b7d2-2d41-4777-9233-df282467c95c",
7
- //"access_token" : "YWMtb2nasMuyEemJvL3ph9UnmAAAAW0KQNb1ziRGuAkJ_n6LweFX9KOhYaSQeKg~~5d5cf9be-cb5d-11e6-a329-0e34ffe5d91e", //student //YWMtw4m3tmsMEem5x6kSLL2ajAAAAWqQ3dJz4CkidQEwcm1LDszgrThOUuDLCkA~~5d5cf9be-cb5d-11e6-a329-0e34ffe5d91e
8
- // "access_token" : "YWMtQAfQGHfCEemdBmGZgYqIcgAAAWrkJ96wsnysSc8M5ilW1ZI1jOeLo226vn8~~5d5cf9be-cb5d-11e6-a329-0e34ffe5d91e", //admin
9
- "expires_in" : 604800,
10
- "refresh_token": "c002d2710236789e3f36d0b8670a07b684f44b4a43e9c4a322260c11390d37826a889053c876df0dc3ae49f4701cc27bdc42d77b62ec3735eaaf9ea35cc433f208aeb1d7003eddf38ec9ab418e40caa2fefb9fda6454a3b98daf9d911db4a4e8ca285a2dfbb395b7"
11
- };
12
-
13
-
14
- var self = this;
15
- var Adapter = ComproDLS.Xapi(orgId);
16
- // console.log(Adapter);
17
-
18
- var Options = {
19
- "actor": {
20
- "uuid": "a8e3b7d2-2d41-4777-9233-df282467c95c"
21
- },
22
- "product": {
23
- "code": "nitish_shubham"
24
- },
25
- "entity": {
26
- "timestamp": 1680160044000,
27
- "verb": "submitted",
28
- "item-code": "1528361176072/1529662897466/1529664397950",
29
- "timespent": 5000,
30
- "result": {
31
- "response": {
32
- "text": "desi boyzz testing"
33
- },
34
- "score": {
35
- "min": 0,
36
- "max": 100,
37
- "raw": 85
38
- }
39
- }
40
- },
41
- "classid": "1df11d0d-ff69-4abf-9dd4-ac1262d6f8fc"
42
- };
43
-
44
- // ComproDLS.authWithToken(orgId, tokenObj, {})
45
- // .then(function (response) {
46
- // for (let i = 0; i < 100; i++) {
47
- // Adapter.postStatement(Options)
48
- // .then(function (res) {
49
- // console.log("^^^^^^^^^^^^^", res);
50
- // })
51
- // .catch(function (err) {
52
- // console.log("ERR CATCG", err);
53
- // })
54
- // }
55
- // })
56
- // .catch(function (err) {
57
- // console.log("ERR CATCG", err);
58
- // })
59
-
60
-
61
- function sendStatement(){
62
- Adapter.postStatement(Options)
63
- .then(function (res) {
64
- console.log("^^^^^^^^^^^^^", res);
65
- // setTimeout(function(){
66
- // sendStatement();
67
- // }, 1000)
68
- setTimeout(function(){ sendStatement()}, 0);
69
- })
70
- .catch(function (err) {
71
- console.log("ERR CATCG", err);
72
- sendStatement();
73
- })
74
- }
75
-
76
- ComproDLS.authWithToken(orgId, tokenObj, {})
77
- .then(function (response) {
78
- // for(var i = 0; i < 10; i++) {
79
- sendStatement();
80
- // }
81
- })
82
- .catch(function (err) {
83
- console.log("ERR CATCG", err);
84
- });
package/test1.js DELETED
@@ -1,52 +0,0 @@
1
- var orgId = 'aberystwyth-thor';
2
- var ComproDLS = require('../comprodls-sdk-js/lib/comprodls.js').init('thor', 'asgard', {orgId});
3
-
4
- var accountId = 'cup1';
5
- var tokenObj = {
6
- "access_token" : "rishav_admin_aberystwyth-thor",
7
- // "access_token" : "a8e3b7d2-2d41-4777-9233-df282467c95c",
8
- //"access_token" : "YWMtb2nasMuyEemJvL3ph9UnmAAAAW0KQNb1ziRGuAkJ_n6LweFX9KOhYaSQeKg~~5d5cf9be-cb5d-11e6-a329-0e34ffe5d91e", //student //YWMtw4m3tmsMEem5x6kSLL2ajAAAAWqQ3dJz4CkidQEwcm1LDszgrThOUuDLCkA~~5d5cf9be-cb5d-11e6-a329-0e34ffe5d91e
9
- // "access_token" : "YWMtQAfQGHfCEemdBmGZgYqIcgAAAWrkJ96wsnysSc8M5ilW1ZI1jOeLo226vn8~~5d5cf9be-cb5d-11e6-a329-0e34ffe5d91e", //admin
10
- "expires_in" : 604800,
11
- "refresh_token": "c002d2710236789e3f36d0b8670a07b684f44b4a43e9c4a322260c11390d37826a889053c876df0dc3ae49f4701cc27bdc42d77b62ec3735eaaf9ea35cc433f208aeb1d7003eddf38ec9ab418e40caa2fefb9fda6454a3b98daf9d911db4a4e8ca285a2dfbb395b7"
12
- };
13
-
14
-
15
- var self = this;
16
- var Adapter = ComproDLS.Analytics(accountId);
17
-
18
- var Options = {
19
- // classid: '1df11d0d-ff69-4abf-9dd4-ac1262d6f8fc',
20
- productcode: 'nitish_shubham',
21
- userid: 'a8e3b7d2-2d41-4777-9233-df282467c95c',
22
- // userid: '1de8c08d-ab2a-4066-89e8-6f28e92f0605',
23
- type: 'items'
24
- // assignedPathId:"78965a6d-771d-4b04-9ed8-1c8aee72d930",
25
- // details: true
26
- };
27
-
28
- function getUP(){
29
- Adapter.getUserProductAnalytics(Options)
30
- .then(function (res) {
31
- console.log("^^^^^^^^^^^^^", res);
32
- getUP();
33
- })
34
- .catch(function (err) {
35
- if(err.code == 404){
36
- console.log(err);
37
- } else {
38
- console.log(err);
39
- }
40
- getUP();
41
- })
42
- }
43
-
44
- ComproDLS.authWithToken(orgId, tokenObj, {})
45
- .then(function (response) {
46
- for(var i = 0; i < 6; i++) {
47
- getUP();
48
- }
49
- })
50
- .catch(function (err) {
51
- console.log("ERR CATCG", err);
52
- });
package/test3.js DELETED
@@ -1,42 +0,0 @@
1
- var orgid = 'aberystwyth-thor';
2
- var ComproDLS = require('../comprodls-sdk-js/lib/comprodls.js').init('thor', 'asgard', {orgid});
3
-
4
- // var accountId = 'cup1';
5
- var tokenObj = {
6
- "access_token" : "a8e3b7d2-2d41-4777-9233-df282467c95c",
7
- //"access_token" : "YWMtb2nasMuyEemJvL3ph9UnmAAAAW0KQNb1ziRGuAkJ_n6LweFX9KOhYaSQeKg~~5d5cf9be-cb5d-11e6-a329-0e34ffe5d91e", //student //YWMtw4m3tmsMEem5x6kSLL2ajAAAAWqQ3dJz4CkidQEwcm1LDszgrThOUuDLCkA~~5d5cf9be-cb5d-11e6-a329-0e34ffe5d91e
8
- //"access_token" : "YWMtQAfQGHfCEemdBmGZgYqIcgAAAWrkJ96wsnysSc8M5ilW1ZI1jOeLo226vn8~~5d5cf9be-cb5d-11e6-a329-0e34ffe5d91e", //admin
9
- "expires_in" : 604800,
10
- "refresh_token": "c002d2710236789e3f36d0b8670a07b684f44b4a43e9c4a322260c11390d37826a889053c876df0dc3ae49f4701cc27bdc42d77b62ec3735eaaf9ea35cc433f208aeb1d7003eddf38ec9ab418e40caa2fefb9fda6454a3b98daf9d911db4a4e8ca285a2dfbb395b7"
11
- };
12
-
13
-
14
- var self = this;
15
- var Adapter = ComproDLS.Attempts();
16
-
17
- var Options = {
18
- userid: 'nitishtc1',
19
- activityid: 'nitish_shubham___1528361176072/1529662897466/1533280874199'
20
- // classid: '564da84e-abeb-417b-bcc1-03f8434e85c8',
21
- // itemcode: 'itemcode1',
22
- // model: 'model.modelcode1',
23
- // key: 'key1'
24
- };
25
- console.log('1');
26
- // ComproDLS.authWithToken(orgId, tokenObj, {})
27
- // .then(function (response) {
28
- console.log('2');
29
- Adapter.getUserActivityMeta(Options)
30
- .then(function (res) {
31
- console.log('3');
32
- console.log("^^^^^^^^^^^^^", res);
33
- })
34
- .catch(function (err) {
35
- console.log('4');
36
- console.log("ERR CATCG", err);
37
- })
38
-
39
- // })
40
- // .catch(function (err) {
41
- // console.log("ERR CATCG", err);
42
- // })