Commit 5e91e323 authored by Jérémy Lacoche's avatar Jérémy Lacoche
Browse files

add sync methods for trackables world anchors and links request

parent cebe3c24
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -45,6 +45,16 @@ namespace ETSI.ARF.WorldStorage.REST
            return ro;
        }

        static public List<Trackable> GetTrackablesSync(WorldStorageServer ws)
        {
            wsServer = ws;
            var httpClient = new BasicHTTPClient(ws.URI);
            apiClient = new WorldStorageClient(httpClient);

            Debug.Log("[REST] Request Trackables...");
            return apiClient.GetTrackables(token);
        }

        static public ResponseObject<List<Trackable>> GetTrackablesAsync(WorldStorageServer ws, Action<ResponseObject<List<Trackable>>> func)
        {
            wsServer = ws;
+9 −0
Original line number Diff line number Diff line
@@ -46,6 +46,15 @@ namespace ETSI.ARF.WorldStorage.REST
            return ro;
        }

        static public List<WorldAnchor> GetWorldAnchorsSync(WorldStorageServer ws)
        {
            wsServer = ws;
            var httpClient = new BasicHTTPClient(ws.URI);
            apiClient = new WorldStorageClient(httpClient);

            return apiClient.GetWorldAnchors(token);
        }

        static public ResponseObject<List<WorldAnchor>> GetWorldAnchorsAsync(WorldStorageServer ws, Action<ResponseObject<List<WorldAnchor>>> func)
        {
            wsServer = ws;
+9 −0
Original line number Diff line number Diff line
@@ -45,6 +45,15 @@ namespace ETSI.ARF.WorldStorage.REST
            return ro;
        }

        static public List<WorldLink> GetWorldLinksSync(WorldStorageServer ws)
        {
            wsServer = ws;
            var httpClient = new BasicHTTPClient(ws.URI);
            apiClient = new WorldStorageClient(httpClient);

            return apiClient.GetWorldLinks(token);
        }

        static public ResponseObject<List<WorldLink>> GetWorldLinksAsync(WorldStorageServer ws, Action<ResponseObject<List<WorldLink>>> func)
        {
            wsServer = ws;