Skip to content

Commit 7153f37

Browse files
committed
documentation added for testBalance.
1 parent 89305cc commit 7153f37

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ $ webpagetest --help
5656
* **locations** _[options]_: list locations and the number of pending tests
5757
* **testers** _[options]_: list testers status and details
5858
* **test** _[options] \<url_or_script\>_: run test, _\<url_or_script\>_ can also be a path to a script file
59+
* **testBalance** _[options]_: get remaining tests for the account
5960
* **restart** _\<id\>_: restart test
6061
* **cancel** _\<id\>_: cancel running/pending test
6162
* **har** _\<id\>_: get the HTTP Archive (HAR) from test
@@ -159,7 +160,7 @@ _The default WPT server can also be specified via environment variable `WEBPAGET
159160
* **--timeout** _\<seconds\>_: timeout for polling and waiting results [no timeout]
160161
* **--lighthouse**: perform lighthouse test (Chrome only, Linux agent only)
161162

162-
#### API Key (works for **test**, **restart**,**locations** and **cancel** commands)
163+
#### API Key (works for **test**, **restart**,**locations**, **testBalance** and **cancel** commands)
163164
* **-k, --key** _\<api_key\>_:API key (if assigned). Contact the WebPageTest server administrator for a key if required or request an API key for limited testing at [webpagetest.org/getkey.php](https://www.webpagetest.org/getkey.php)
164165

165166
#### Request (works for **status**, **results**, **locations**, **testers** and **test** commands)
@@ -351,6 +352,18 @@ $ webpagetest waterfall 121025_PT_N8K --thumbnail --cached --uri
351352
}
352353
```
353354

355+
#### 7. Get remaining tests count for the account
356+
```bash
357+
$ webpagetest testBalance --key 1F2A3K4E5
358+
```
359+
```javascript
360+
{
361+
"data": {
362+
"remaining": 1175
363+
}
364+
}
365+
```
366+
354367
#### Run test on https://docs.webpagetest.org/api/integrations/ and poll results every 5 seconds timing out in 60 seconds
355368
```bash
356369
$ webpagetest test https://docs.webpagetest.org/api/integrations/ --poll 5 --timeout 60
@@ -390,6 +403,7 @@ Methods and options (including the one letter shorthands) are the same when usin
390403
* `getTestResults(id, options, callback)`
391404
* `getLocations(options, callback)`
392405
* `getTesters(options, callback)`
406+
* `getTestBalance(options, callback)`
393407
* `runTest(url_or_script, options, callback)`
394408
* `restartTest(id, options, callback)`
395409
* `cancelTest(id, options, callback)`

0 commit comments

Comments
 (0)