@vouchfor/sdk 1.1.4 → 1.1.5

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.
@@ -36,6 +36,39 @@ class VouchService extends BaseRestService {
36
36
  path: 'upload',
37
37
  });
38
38
  }
39
+
40
+ get clips() {
41
+ function getPath(id, ordinality) {
42
+ return ordinality
43
+ ? `${id}/questions/${ordinality}/clips`
44
+ : `${id}clips`;
45
+ }
46
+
47
+ return {
48
+ create: (clips, { id, ordinality }, apiKey) => {
49
+ const path = getPath(id, ordinality);
50
+ return this._request({
51
+ apiKey,
52
+ body: clips,
53
+ path
54
+ });
55
+ },
56
+
57
+ delete: (clips, { id, ordinality }, apiKey) => {
58
+ const path = getPath(id, ordinality);
59
+ return this._request({
60
+ apiKey,
61
+ body: clips,
62
+ path: `${path}/delete`
63
+ });
64
+ },
65
+
66
+ list: ({ id, ordinality }, apiKey) => {
67
+ const path = getPath(id, ordinality);
68
+ return this._request({ apiKey, path });
69
+ }
70
+ }
71
+ }
39
72
  }
40
73
 
41
74
  module.exports = VouchService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vouchfor/sdk",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Vouch API SDK",
5
5
  "main": "lib/index.js",
6
6
  "repository": {