tradly 1.1.91 → 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.
Files changed (2) hide show
  1. package/Roots/App.js +94 -0
  2. 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 {
@@ -1758,6 +1826,32 @@ class App {
1758
1826
  return error;
1759
1827
  }
1760
1828
  }
1829
+ async getUserAttributeValues(param = { bodyParam, authKey }) {
1830
+ let url =
1831
+ param.bodyParam == undefined || param.bodyParam == ""
1832
+ ? ""
1833
+ : `?${serialization(param.bodyParam)}`;
1834
+ try {
1835
+ const [error, responseJson] = await network.networkCall({
1836
+ path:
1837
+ ATTRIBUTE +
1838
+ `/${param.id}` +
1839
+ "/user_attributes_values" +
1840
+ url,
1841
+ method: Method.GET,
1842
+ authKey: param.authKey,
1843
+ currency: param.currency,
1844
+ language: param.language,
1845
+ });
1846
+ if (error) {
1847
+ return error;
1848
+ } else {
1849
+ return responseJson;
1850
+ }
1851
+ } catch (error) {
1852
+ return error;
1853
+ }
1854
+ }
1761
1855
  async getAttributesGrouped(param = { bodyParam, authKey }) {
1762
1856
  let url =
1763
1857
  param.bodyParam == undefined || param.bodyParam == ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.1.91",
3
+ "version": "1.1.93",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",