Skip to content

Commit b502ac1

Browse files
committed
add missing API calls
1 parent b95c141 commit b502ac1

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,26 @@ Gets a list of browsers you can test on
4343
$api->getBrowsers();
4444
```
4545

46+
### getDevices
47+
Gets a list of devices you can test on
48+
49+
```php
50+
$api->getDevices();
51+
```
52+
53+
### getAvailableDevices
54+
Gets a list of available devices you can test on
55+
56+
```php
57+
$api->getAvailableDevices();
58+
```
59+
60+
### getDevice
61+
Gets information for a specific device
62+
63+
```php
64+
$api->getDevice($deviceID);
65+
```
4666

4767
### getUserInfo
4868
Gets your user information
@@ -108,13 +128,27 @@ Gets a build from TestingBot (a group of tests)
108128
$api->getBuild($buildIdentifier);
109129
```
110130

131+
### deleteBuild
132+
Deletes a build from TestingBot.
133+
134+
```php
135+
$api->deleteBuild($buildIdentifier);
136+
```
137+
111138
### getTunnels
112139
Gets a list of active tunnels for your account.
113140

114141
```php
115142
$api->getTunnels();
116143
```
117144

145+
### deleteTunnel
146+
Deletes an active tunnel.
147+
148+
```php
149+
$api->deleteTunnel($tunnelID);
150+
```
151+
118152
### uploadLocalFileToStorage
119153
Uploads a local file (.apk, .ipa, .zip) to TestingBot Storage.
120154

src/TestingBot/TestingBotAPI.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,26 @@ public function getBuild($buildID)
130130
return $this->_doRequest("builds/" . $buildID, "GET");
131131
}
132132

133+
public function deleteBuild($buildID)
134+
{
135+
if (empty($buildID))
136+
{
137+
throw new \Exception("Please use a valid buildID");
138+
}
139+
140+
return $this->_doRequest("builds/" . $buildID, "DELETE");
141+
}
142+
133143
public function getTunnels()
134144
{
135145
return $this->_doRequest("tunnel/list", "GET");
136146
}
137147

148+
public function deleteTunnel($tunnelID)
149+
{
150+
return $this->_doRequest("tunnel/" . $tunnelID, "DELETE");
151+
}
152+
138153
public function getUserInfo()
139154
{
140155
return $this->_doRequest("user", "GET");
@@ -145,6 +160,21 @@ public function getBrowsers()
145160
return $this->_doRequest("browsers", "GET");
146161
}
147162

163+
public function getDevices()
164+
{
165+
return $this->_doRequest("devices", "GET");
166+
}
167+
168+
public function getAvailableDevices()
169+
{
170+
return $this->_doRequest("devices/available", "GET");
171+
}
172+
173+
public function getDevice($deviceID)
174+
{
175+
return $this->_doRequest("devices/" . $deviceID, "GET");
176+
}
177+
148178
public function updateUserInfo(array $details)
149179
{
150180
$data = array();

0 commit comments

Comments
 (0)