tradly 1.0.91 → 1.0.92

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 +40 -0
  2. package/package.json +1 -1
package/Roots/App.js CHANGED
@@ -913,6 +913,46 @@ class App {
913
913
  return error;
914
914
  }
915
915
  }
916
+ async getListingVariants(param = { authKey, listingId }) {
917
+ try {
918
+ const [error, responseJson] = await network.networkCall({
919
+ path: LISTINGS + `/${param.listingId}` + VARIANTS,
920
+ method: Method.GET,
921
+ authKey: param.authKey,
922
+ currency: param.currency,
923
+ });
924
+ if (error) {
925
+ return error;
926
+ } else {
927
+ return responseJson;
928
+ }
929
+ } catch (error) {
930
+ return error;
931
+ }
932
+ }
933
+ async getListingVariantDetails(
934
+ param = { authKey, listingId, variant_id }
935
+ ) {
936
+ try {
937
+ const [error, responseJson] = await network.networkCall({
938
+ path:
939
+ LISTINGS +
940
+ `/${param.listingId}` +
941
+ VARIANTS +
942
+ `/${param.variant_id}`,
943
+ method: Method.GET,
944
+ authKey: param.authKey,
945
+ currency: param.currency,
946
+ });
947
+ if (error) {
948
+ return error;
949
+ } else {
950
+ return responseJson;
951
+ }
952
+ } catch (error) {
953
+ return error;
954
+ }
955
+ }
916
956
  async addEditVariants(param = { authKey, listingId, id, data }) {
917
957
  let method =
918
958
  param.id == undefined || param.id == ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.0.91",
3
+ "version": "1.0.92",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",