private void Delete(string[] args) { string token = GetString("--token", args); if (string.IsNullOrEmpty(token)) { Usage(); return; } string uuid = GetString("--uuid", args); if (string.IsNullOrEmpty(uuid)) { Usage("Missing argument --uuid"); return; } var documnet = new CrocodocDocument(token); Task<bool> result = documnet.DeleteAsync(uuid); result.Wait(); }
private void Upload(string token, Stream stream, string filename) { var documnet = new CrocodocDocument(token); Task<UploadResponse> result = documnet.UploadAsync(stream, filename); result.Wait(); }
private void Status(string[] args) { string token = GetString("--token", args); if (string.IsNullOrEmpty(token)) { Usage("Missing argument --token"); return; } string[] uuids = GetStrings("--uuids", args); if (uuids == null || uuids.Length == 0) { Usage("Missing argument --uuids"); return; } var documnet = new CrocodocDocument(token); Task<StatusResponse[]> result = documnet.GetStatusAsync(uuids); result.Wait(); }
private void Upload(string token, Uri uri) { var documnet = new CrocodocDocument(token); Task<UploadResponse> result = documnet.UploadAsync(uri); result.Wait(); }