Skip to content
Snippets Groups Projects
Commit 5e91e323 authored by lacoche's avatar lacoche
Browse files

add sync methods for trackables world anchors and links request

parent cebe3c24
No related branches found
No related tags found
1 merge request!6Scripts reviewed and updated for new WS Editor.
...@@ -45,6 +45,16 @@ namespace ETSI.ARF.WorldStorage.REST ...@@ -45,6 +45,16 @@ namespace ETSI.ARF.WorldStorage.REST
return ro; 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) static public ResponseObject<List<Trackable>> GetTrackablesAsync(WorldStorageServer ws, Action<ResponseObject<List<Trackable>>> func)
{ {
wsServer = ws; wsServer = ws;
......
...@@ -46,6 +46,15 @@ namespace ETSI.ARF.WorldStorage.REST ...@@ -46,6 +46,15 @@ namespace ETSI.ARF.WorldStorage.REST
return ro; 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) static public ResponseObject<List<WorldAnchor>> GetWorldAnchorsAsync(WorldStorageServer ws, Action<ResponseObject<List<WorldAnchor>>> func)
{ {
wsServer = ws; wsServer = ws;
......
...@@ -45,6 +45,15 @@ namespace ETSI.ARF.WorldStorage.REST ...@@ -45,6 +45,15 @@ namespace ETSI.ARF.WorldStorage.REST
return ro; 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) static public ResponseObject<List<WorldLink>> GetWorldLinksAsync(WorldStorageServer ws, Action<ResponseObject<List<WorldLink>>> func)
{ {
wsServer = ws; wsServer = ws;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment