tradly 1.0.34 → 1.0.38

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 +16 -3
  2. package/package.json +1 -1
package/Roots/App.js CHANGED
@@ -41,8 +41,8 @@ class App {
41
41
  } else { return responseJson}
42
42
  } catch (error) {return error}
43
43
  }
44
- async updateUserInfo(param = {data,authKey}) {
45
- try { const [error,responseJson] = await network.networkCall({path:USERS,method:Method.POST,param:param.data,authKey:param.authKey});
44
+ async updateUserInfo(param = {id,data,authKey}) {
45
+ try { const [error,responseJson] = await network.networkCall({path:USERS + `/${param.id}`,method:Method.PATCH,param:param.data,authKey:param.authKey});
46
46
  if (error) { return error;
47
47
  } else { return responseJson}
48
48
  } catch (error) {return error}
@@ -183,6 +183,19 @@ class App {
183
183
  else { return responseJson }
184
184
  } catch (error) { return error }
185
185
  }
186
+ async getMyListingsLikes(param={bodyParam,authKey}) {
187
+ let url = param.bodyParam == undefined || param.bodyParam == '' ? '' : `?${serialization(param.bodyParam)}`;
188
+ try { const [error, responseJson] = await network.networkCall({path:LISTINGS + LIKE+ url,method:Method.GET,authKey:param.authKey});
189
+ if (error) { return error }
190
+ else { return responseJson }
191
+ } catch (error) { return error }
192
+ }
193
+ async commonFuntion(param={path,bodyParam,authKey,Method}) {
194
+ try { const [error, responseJson] = await network.networkCall({path:param.path,method:param.Method,authKey:param.authKey});
195
+ if (error) { return error }
196
+ else { return responseJson }
197
+ } catch (error) { return error }
198
+ }
186
199
  //MARK:-  Schedules 
187
200
  async createSchedule(param={id,authKey,data}) {
188
201
  let path = LISTINGS + `/${param.id}` + SCHEDULE;
@@ -462,7 +475,7 @@ class App {
462
475
  } catch (error) { return error }
463
476
  }
464
477
  async likeReview(param={authKey,data,id}) {
465
- try { const [error, responseJson] = await network.networkCall({path:REVIEW + `/${param.id}` ,method:Method.PATCH,authKey:param.authKey,param:param.data});
478
+ try { const [error, responseJson] = await network.networkCall({path:REVIEW + `/${param.id}/like` ,method:Method.PATCH,authKey:param.authKey,param:param.data});
466
479
  if (error) { return error }
467
480
  else { return responseJson }
468
481
  } catch (error) { return error }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.0.34",
3
+ "version": "1.0.38",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",