@veritree/services 1.2.0 → 1.3.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": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,5 +1,14 @@
1
1
  import Api from "../helpers/api";
2
+ import Relations from "../helpers/relations";
3
+ class ImagesApi extends Api {
4
+ constructor(resource) {
5
+ super(resource);
6
+ this.resource = "images";
7
+ }
2
8
 
3
- const resource = "images";
9
+ relation(prefix, id) {
10
+ return Relations(this, prefix, id);
11
+ }
12
+ }
4
13
 
5
- export const Images = new Api(resource);
14
+ export const Images = new ImagesApi();