Remove getRelated from Api
authorFrank Bessou <frank.bessou@logilab.fr>
Fri, 28 Apr 2017 16:00:16 +0200
changeset 160 8e40616ccb29
parent 159 7cea474fc422
child 161 b26c54547826
Remove getRelated from Api
src/Api.js
--- a/src/Api.js	Fri Apr 28 15:52:44 2017 +0200
+++ b/src/Api.js	Fri Apr 28 16:00:16 2017 +0200
@@ -1,8 +1,6 @@
 /* global fetch */
 
 import 'whatwg-fetch';
-import {isEmpty} from 'lodash/lang';
-import {get} from 'lodash/object';
 
 import HypermediaClient from "./services/hypermedia.js";
 
@@ -42,18 +40,6 @@
         });
     }
 
-    getRelated(etype, eid, rtype, params = {}) {
-        const url = `/${etype}/${eid}/${rtype}`;
-        const searchParams = new URLSearchParams;
-        if (!isEmpty(params)) {
-            const sort = get(params, 'sort', null);
-            if (sort !== null) {
-                searchParams.append('sort', sort);
-            }
-        }
-        return this.hypermediaClient.getResource(`${url}?${searchParams.toString()}`);
-    }
-
     getEntity(etype, eid) {
         const route = `/${etype}/${eid}`;
         const url = route;