From 2668202067a47df93df2ffc246c5bd4a3efde8ee Mon Sep 17 00:00:00 2001 From: Alexander Obuhovich Date: Sat, 14 Mar 2015 18:29:43 +0200 Subject: [PATCH] Adds the "deleteJob" call implementation for SauceLabs REST API --- lib/WebDriver/SauceLabs/SauceRest.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/WebDriver/SauceLabs/SauceRest.php b/lib/WebDriver/SauceLabs/SauceRest.php index 6e19e7b..270079e 100644 --- a/lib/WebDriver/SauceLabs/SauceRest.php +++ b/lib/WebDriver/SauceLabs/SauceRest.php @@ -59,7 +59,7 @@ public function __construct($userId, $accessKey) * @param string $requestMethod HTTP request method * @param string $url URL * @param mixed $parameters Parameters - * + * * @return mixed * * @see http://saucelabs.com/docs/saucerest @@ -226,6 +226,18 @@ public function stopJob($jobId) return $this->execute('PUT', $this->userId . '/jobs/' . $jobId . '/stop'); } + /** + * Delete job: /rest/v1/:userId/jobs/:jobId (DELETE) + * + * @param string $jobId + * + * @return array + */ + public function deleteJob($jobId) + { + return $this->execute('DELETE', $this->userId . '/jobs/' . $jobId); + } + /** * Get running tunnels for a given user: /rest/v1/:userId/tunnels (GET) *