Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
====================
Expand Down Expand Up @@ -36,7 +36,7 @@ Retrieves collection of available browsers


```java
ArrayList<TestingbotBrowser> devices = restApi.getBrowsers();
ArrayList<TestingbotBrowser> browsers = restApi.getBrowsers();
```

### getDevices
Expand All @@ -45,7 +45,7 @@ Retrieves collection of available devices


```java
ArrayList<TestingbotDevice> devices = restApi.getDevices();
List<TestingbotDevice> devices = restApi.getDevices(int offset, int count);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional. This README documents each method in signature style, e.g. getDevice(int deviceId), stopTest(String sessionId), getTests(int offset, int count) and getStorageFiles(int offset, int count), and this line now follows that convention. The bug fixed here is that the zero-arg getDevices() it showed does not exist at all. Converting the whole README to runnable snippets is out of scope for this PR.

```

### getAvailableDevices
Expand All @@ -54,7 +54,7 @@ Retrieves collection of available devices


```java
ArrayList<TestingbotDevice> devices = restApi.getAvailableDevices();
List<TestingbotDevice> devices = restApi.getAvailableDevices();
```

### getDevice
Expand Down Expand Up @@ -150,7 +150,7 @@ Updates information about the current user


```java
TestingbotUser user = restApi.updateUserInfo(TestingBotUser);
boolean success = restApi.updateUserInfo(TestingbotUser user);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: signature-style documentation, consistent with the rest of the README (e.g. updateTest(TestingbotTest test)). The fix is the return type (boolean, not TestingbotUser) and the class-name casing (TestingbotUser).

```

### getTunnels
Expand Down Expand Up @@ -406,8 +406,8 @@ Maven
<dependency>
<groupId>com.testingbot</groupId>
<artifactId>testingbotrest</artifactId>
<version>1.0.8</version>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
</dependencies
</dependencies>
```
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading