@@ -24,6 +24,7 @@ var paths = {
2424 testResults : 'jsonResult.php' ,
2525 locations : 'getLocations.php' ,
2626 testers : 'getTesters.php' ,
27+ testBalance : 'testBalance.php' ,
2728 test : 'runtest.php' ,
2829 gzip : 'getgzip.php' ,
2930 har : 'export.php' ,
@@ -315,6 +316,17 @@ function getTesters(options, callback) {
315316 return api . call ( this , paths . testers , callback , query , options ) ;
316317}
317318
319+ function getTestBalance ( options , callback ) {
320+ callback = callback || options ;
321+ options = options === callback ? undefined : options ;
322+
323+ var query = helper . setQuery ( mapping . commands . testBalance , options ) ;
324+ if ( ! query . k && this . config . key ) {
325+ query . k = this . config . key ;
326+ }
327+ return api . call ( this , paths . testBalance , callback , query , options ) ;
328+ }
329+
318330function runTest ( what , options , callback ) {
319331 var query = { } ;
320332
@@ -778,6 +790,7 @@ WebPageTest.prototype = {
778790 restartTest : restartTest ,
779791 cancelTest : cancelTest ,
780792 getPageSpeedData : getPageSpeedData ,
793+ getTestBalance : getTestBalance ,
781794 getHARData : getHARData ,
782795 getUtilizationData : getUtilizationData ,
783796 getRequestData : getRequestData ,
0 commit comments