diff --git a/README.md b/README.md index 2dfa9e8..d44305d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Tests](https://github.com/testingbot/testingbot-java/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/testingbot/testingbot-java/actions/workflows/test.yml) [![CodeQL](https://github.com/testingbot/testingbot-java/actions/workflows/codeql-analysis.yml/badge.svg?branch=master)](https://github.com/testingbot/testingbot-java/actions/workflows/codeql-analysis.yml) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0) -[![Java](https://img.shields.io/badge/Java-1.7%2B-blue.svg)](https://www.oracle.com/java/) +[![Java](https://img.shields.io/badge/Java-8%2B-blue.svg)](https://www.oracle.com/java/) TestingBotREST Java ==================== @@ -36,7 +36,7 @@ Retrieves collection of available browsers ```java -ArrayList devices = restApi.getBrowsers(); +ArrayList browsers = restApi.getBrowsers(); ``` ### getDevices @@ -45,7 +45,7 @@ Retrieves collection of available devices ```java -ArrayList devices = restApi.getDevices(); +List devices = restApi.getDevices(int offset, int count); ``` ### getAvailableDevices @@ -54,7 +54,7 @@ Retrieves collection of available devices ```java -ArrayList devices = restApi.getAvailableDevices(); +List devices = restApi.getAvailableDevices(); ``` ### getDevice @@ -150,7 +150,7 @@ Updates information about the current user ```java -TestingbotUser user = restApi.updateUserInfo(TestingBotUser); +boolean success = restApi.updateUserInfo(TestingbotUser user); ``` ### getTunnels @@ -406,8 +406,8 @@ Maven com.testingbot testingbotrest - 1.0.8 + 1.1.0 test - ``` diff --git a/src/main/java/com/testingbot/testingbotrest/TestingbotREST.java b/src/main/java/com/testingbot/testingbotrest/TestingbotREST.java index 3305441..82742d6 100644 --- a/src/main/java/com/testingbot/testingbotrest/TestingbotREST.java +++ b/src/main/java/com/testingbot/testingbotrest/TestingbotREST.java @@ -431,7 +431,7 @@ public TestingbotDevice getDevice(int deviceId) { * @return boolean success */ public boolean deleteStorageFile(String appUrl) { - return this.apiBoolean(new HttpDelete(apiBase + "/storage/" + enc(appUrl)), null); + return this.apiBoolean(new HttpDelete(apiBase + "/storage/" + enc(appUrl.replace("tb://", ""))), null); } diff --git a/src/test/java/com/testingbot/testingbotrest/TestingbotRestMockTest.java b/src/test/java/com/testingbot/testingbotrest/TestingbotRestMockTest.java index 4b2af5c..0337d45 100644 --- a/src/test/java/com/testingbot/testingbotrest/TestingbotRestMockTest.java +++ b/src/test/java/com/testingbot/testingbotrest/TestingbotRestMockTest.java @@ -404,6 +404,12 @@ public void deleteStorageFile() { assertRequest("DELETE", "/v1/storage/xyz"); } + @Test + public void deleteStorageFileAcceptsAppUrl() { + api.deleteStorageFile("tb://xyz"); + assertRequest("DELETE", "/v1/storage/xyz"); + } + // ------------------------------------------------------------------ jobs / config @Test