tradly 1.1.92 → 1.1.93
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/Roots/App.js +68 -0
- package/package.json +1 -1
package/Roots/App.js
CHANGED
|
@@ -414,6 +414,74 @@ class App {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
+
// user follow
|
|
418
|
+
async userFollow(param = { authKey, data }) {
|
|
419
|
+
try {
|
|
420
|
+
const [error, responseJson] = await network.networkCall({
|
|
421
|
+
path: USERS + `/followings`,
|
|
422
|
+
method: Method.POST,
|
|
423
|
+
param: param.data,
|
|
424
|
+
authKey: param.authKey,
|
|
425
|
+
currency: param.currency,
|
|
426
|
+
language: param.language,
|
|
427
|
+
});
|
|
428
|
+
if (error) {
|
|
429
|
+
return error;
|
|
430
|
+
} else {
|
|
431
|
+
return responseJson;
|
|
432
|
+
}
|
|
433
|
+
} catch (error) {
|
|
434
|
+
return error;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// user followings
|
|
439
|
+
async getUserFollowings(param = { bodyParam, authKey }) {
|
|
440
|
+
let url =
|
|
441
|
+
param.bodyParam == undefined || param.bodyParam == ""
|
|
442
|
+
? ""
|
|
443
|
+
: `?${serialization(param.bodyParam)}`;
|
|
444
|
+
try {
|
|
445
|
+
const [error, responseJson] = await network.networkCall({
|
|
446
|
+
path: USERS + `/followings/user` + url,
|
|
447
|
+
method: Method.GET,
|
|
448
|
+
authKey: param.authKey,
|
|
449
|
+
currency: param.currency,
|
|
450
|
+
language: param.language,
|
|
451
|
+
});
|
|
452
|
+
if (error) {
|
|
453
|
+
return error;
|
|
454
|
+
} else {
|
|
455
|
+
return responseJson;
|
|
456
|
+
}
|
|
457
|
+
} catch (error) {
|
|
458
|
+
return error;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// user followers
|
|
463
|
+
async getUserFollowers(param = { bodyParam, authKey }) {
|
|
464
|
+
let url =
|
|
465
|
+
param.bodyParam == undefined || param.bodyParam == ""
|
|
466
|
+
? ""
|
|
467
|
+
: `?${serialization(param.bodyParam)}`;
|
|
468
|
+
try {
|
|
469
|
+
const [error, responseJson] = await network.networkCall({
|
|
470
|
+
path: USERS + `/followers/user` + url,
|
|
471
|
+
method: Method.GET,
|
|
472
|
+
authKey: param.authKey,
|
|
473
|
+
currency: param.currency,
|
|
474
|
+
language: param.language,
|
|
475
|
+
});
|
|
476
|
+
if (error) {
|
|
477
|
+
return error;
|
|
478
|
+
} else {
|
|
479
|
+
return responseJson;
|
|
480
|
+
}
|
|
481
|
+
} catch (error) {
|
|
482
|
+
return error;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
417
485
|
// get user attributes
|
|
418
486
|
async getUserAttributes(param = { authKey, id, recaptcha_token }) {
|
|
419
487
|
try {
|