/// <summary> /// Request Waveface Cloud to check station accessibility from the internet. /// </summary> /// <param name="sessionToken"></param> public static void PingMyStation(string sessionToken) { try { CloudServer.requestPath <CloudResponse>( new WebClient(), "users/pingMyStation", new Dictionary <object, object> { { CloudServer.PARAM_API_KEY, CloudServer.APIKey }, { CloudServer.PARAM_SESSION_TOKEN, sessionToken } } ); } catch (WammerCloudException e) { ExtractApiRetMsg(e); throw; } }
public static StorageUsageResponse StorageUsage(string sessionToken) { try { // TODO: call the api via station StorageUsageResponse res = CloudServer.requestPath <StorageUsageResponse>( new WebClient(), "storages/usage", new Dictionary <object, object> { { CloudServer.PARAM_API_KEY, CloudServer.APIKey }, { CloudServer.PARAM_SESSION_TOKEN, sessionToken } } ); return(res); } catch (WammerCloudException e) { ExtractApiRetMsg(e); throw; } }
public static GetUserResponse GetUser(string sessionToken, string userId) { try { GetUserResponse res = CloudServer.requestPath <GetUserResponse>( new WebClient(), "users/get", new Dictionary <object, object> { { CloudServer.PARAM_API_KEY, CloudServer.APIKey }, { CloudServer.PARAM_SESSION_TOKEN, sessionToken }, { "user_id", userId } } ); return(res); } catch (WammerCloudException e) { ExtractApiRetMsg(e); throw; } }