tradly 1.0.47 → 1.0.50
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 +23 -8
- package/package.json +1 -1
package/Roots/App.js
CHANGED
|
@@ -101,6 +101,13 @@ class App {
|
|
|
101
101
|
else { return responseJson }
|
|
102
102
|
} catch (error) { return error }
|
|
103
103
|
}
|
|
104
|
+
async reverseGeoCodingAddress(param={lat,long,authKey}) {
|
|
105
|
+
let url = `/${param.lat}/${param.long}`;
|
|
106
|
+
try { const [error, responseJson] = await network.networkCall({path:ADDRESS + url,method:Method.GET,authKey:param.authKey});
|
|
107
|
+
if (error) { return error }
|
|
108
|
+
else { return responseJson }
|
|
109
|
+
} catch (error) { return error }
|
|
110
|
+
}
|
|
104
111
|
async deleteAddress(param={id,authKey}) {
|
|
105
112
|
try { const [error, responseJson] = await network.networkCall({path:ADDRESS + `/${param.id}`,method:Method.DELETE,authKey:param.authKey});
|
|
106
113
|
if (error) { return error }
|
|
@@ -117,11 +124,15 @@ class App {
|
|
|
117
124
|
}
|
|
118
125
|
async getAccountDetail(param={id,slug,authKey}) {
|
|
119
126
|
var path = ''
|
|
120
|
-
if (param.id != undefined
|
|
121
|
-
|
|
127
|
+
if (param.id != undefined) {
|
|
128
|
+
if (param.id.length != 0) {
|
|
129
|
+
path = `/${param.id}`;
|
|
130
|
+
}
|
|
122
131
|
}
|
|
123
|
-
if (param.slug != undefined
|
|
124
|
-
|
|
132
|
+
if (param.slug != undefined) {
|
|
133
|
+
if (param.slug.length != 0) {
|
|
134
|
+
path = SLUG +`${param.slug}`
|
|
135
|
+
}
|
|
125
136
|
}
|
|
126
137
|
try { const [error, responseJson] = await network.networkCall({path:ACCOUNTS + `${path}`,method:Method.GET,authKey:param.authKey});
|
|
127
138
|
if (error) { return error }
|
|
@@ -171,11 +182,15 @@ class App {
|
|
|
171
182
|
}
|
|
172
183
|
async getListingDetail(param={id,slug,authKey}) {
|
|
173
184
|
var path = ''
|
|
174
|
-
if (param.id != undefined
|
|
175
|
-
|
|
185
|
+
if (param.id != undefined) {
|
|
186
|
+
if (param.id.length != 0) {
|
|
187
|
+
path = `/${param.id}`;
|
|
188
|
+
}
|
|
176
189
|
}
|
|
177
|
-
if (param.slug != undefined
|
|
178
|
-
|
|
190
|
+
if (param.slug != undefined) {
|
|
191
|
+
if (param.slug.length != 0) {
|
|
192
|
+
path = SLUG +`${param.slug}`
|
|
193
|
+
}
|
|
179
194
|
}
|
|
180
195
|
try { const [error, responseJson] = await network.networkCall({path:LISTINGS + `${path}`,method:Method.GET,authKey:param.authKey});
|
|
181
196
|
if (error) { return error }
|