@veritree/services 2.6.0 → 2.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritree/services",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -6,10 +6,22 @@ class UserApi extends Api {
6
6
  this.resource = 'me';
7
7
  }
8
8
 
9
- async me() {
10
- const url = `${this.getUrl()}${this.getUrlParams()}`;
11
- return await this.get(url);
9
+ me() {
10
+ const url = this.getUrl();
11
+
12
+ const get = async () => {
13
+ return await this.get(url);
14
+ };
15
+
16
+ const update = async (data) => {
17
+ return await this.post(url, data, 'patch');
18
+ };
19
+
20
+ return {
21
+ get,
22
+ update,
23
+ };
12
24
  }
13
25
  }
14
26
 
15
- export const User = new UserApi();
27
+ export const User = new UserApi();