@retter/sdk 0.5.1 → 0.5.3

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/README.MD CHANGED
@@ -101,6 +101,7 @@ interface RetterCloudObjectConfig {
101
101
  headers?: {
102
102
  [key: string]: string
103
103
  }
104
+ pathParams?: string
104
105
  queryStringParams?: {
105
106
  [key: string]: string
106
107
  }
@@ -206,3 +207,36 @@ interface RetterCloudObjectMethod {
206
207
  ```ts
207
208
  const instanceIds = await cloudObject.listInstances()
208
209
  ```
210
+
211
+ ## Static Calls
212
+
213
+ > make sure using sdk version v0.5.3 or higher
214
+
215
+ Static method calls can be made via sdk. Getting a cloud object is not necessary. Simple call `makeStaticCall` method on rio objecty. `classId` and `method` parameters must be specified. Other parameters can be seen in interface below.
216
+
217
+ ```ts
218
+ interface RetterCloudObjectStaticCall {
219
+ classId: string
220
+ method: string
221
+ headers?: { [key: string]: string }
222
+ pathParams?: string
223
+ queryStringParams?: { [key: string]: string }
224
+ httpMethod?: 'get' | 'delete' | 'post' | 'put'
225
+ body?: any
226
+ platform?: string
227
+ culture?: string
228
+ }
229
+ ```
230
+
231
+ Example:
232
+
233
+ ```ts
234
+ import Retter from '@retter/sdk'
235
+
236
+ const rio = Retter.getInstance(config: RetterClientConfig)
237
+
238
+ await rio.makeStaticCall({
239
+ classId: 'StaticTest',
240
+ method: 'methodName',
241
+ })
242
+ ```