Use higher level methods to fetch related schemas and collection
authorFrank Bessou <frank.bessou@logilab.fr>
Tue, 02 May 2017 11:45:34 +0200
changeset 143 85c29903f060
parent 142 b2f4121aa93d
child 144 1356e8b593ba
Use higher level methods to fetch related schemas and collection
src/Api.js
--- a/src/Api.js	Tue May 02 11:12:29 2017 +0200
+++ b/src/Api.js	Tue May 02 11:45:34 2017 +0200
@@ -29,7 +29,7 @@
         if (targetType !== null) {
             url += `&target_type=${targetType}`;
         }
-        return this.hypermediaClient.jsonSchemaFetch(url);
+        return this.hypermediaClient.getSchema(url);
     }
 
     getEntities(etype) {
@@ -51,7 +51,7 @@
                 searchParams.append('sort', sort);
             }
         }
-        return this.hypermediaClient.jsonFetchCollection(`${url}?${searchParams.toString()}`);
+        return this.hypermediaClient.getResource(`${url}?${searchParams.toString()}`);
     }
 
     getEntity(etype, eid) {