11[ ![ npm version] ( https://img.shields.io/npm/v/testingbot-api.svg?style=flat-square )] ( https://www.npmjs.com/package/testingbot-api )
22[ ![ npm downloads] ( https://img.shields.io/npm/dm/testingbot-api.svg?style=flat-square )] ( https://www.npmjs.com/package/testingbot-api )
33[ ![ Build Status] ( https://travis-ci.org/testingbot/testingbot-api.svg?branch=master )] ( https://travis-ci.org/testingbot/testingbot-api )
4- [ ![ dependencies Status] ( https://david-dm.org/testingbot/testingbot-api/status .svg )] ( https://david-dm.org/testingbot/testingbot-api )
5- [ ![ devDependencies Status] ( https://david-dm.org/testingbot/testingbot-api/dev-status .svg )] ( https://david-dm.org/testingbot/testingbot-api?type=dev )
4+ [ ![ dependencies Status] ( https://status. david-dm.org/gh/ testingbot/testingbot-api.svg )] ( https://david-dm.org/testingbot/testingbot-api )
5+ [ ![ devDependencies Status] ( https://status. david-dm.org/gh/ testingbot/testingbot-api.svg?type=dev )] ( https://david-dm.org/testingbot/testingbot-api?type=dev )
66
77# testingbot-api
88
9- Wrapper around the TestingBot REST API for [ Node.js] ( http ://nodejs.org/) .
9+ Wrapper around the TestingBot REST API for [ Node.js] ( https ://nodejs.org/) .
1010
1111## Install
1212
@@ -16,7 +16,7 @@ npm install testingbot-api
1616
1717## Credentials
1818You can use environment variables ` TESTINGBOT_KEY ` and ` TESTINGBOT_SECRET ` to pass your TestingBot key and secret to the API client.
19- The key and secret can be obtained from [ TestingBot] ( https://testingbot.com/members/user/edit ) .
19+ The key and secret can be obtained from [ TestingBot] ( https://testingbot.com/members/user/edit )
2020
2121## Using the wrapper
2222
@@ -36,6 +36,27 @@ Gets a list of browsers you can test on
3636api .getBrowsers (function (error , browsers ) {});
3737```
3838
39+ ### getDevices
40+ Gets a list of physical mobile devices you can test on
41+
42+ ``` javascript
43+ api .getDevices (function (error , devices ) {});
44+ ```
45+
46+ ### getAvailableDevices
47+ Gets a list of available physical mobile devices for your account
48+
49+ ``` javascript
50+ api .getAvailableDevices (function (error , availableDevices ) {});
51+ ```
52+
53+ ### getDevice
54+ Gets details for a specific physical device
55+
56+ ``` javascript
57+ api .getDevice (deviceId, function (error , deviceDetails ) {});
58+ ```
59+
3960
4061### getUserInfo
4162Gets your user information
@@ -129,6 +150,27 @@ Uploads a remote file to TestingBot Storage
129150api .uploadFile (remoteFileUrl, function (error , appUrl ) {});
130151```
131152
153+ ### getStorageFile
154+ Retrieve data from a previously uploaded file
155+
156+ ``` javascript
157+ api .getStorageFile (remoteFileUrl, function (error , fileDetails ) {});
158+ ```
159+
160+ ### getStorageFiles
161+ Retrieve list of previously uploaded files
162+
163+ ``` javascript
164+ api .getStorageFiles (function (error , fileDetails ) {}, offset, limit);
165+ ```
166+
167+ ### deleteStorageFile
168+ Delete a previously uploaded file
169+
170+ ``` javascript
171+ api .deleteStorageFile (appId, function (error , success ) {});
172+ ```
173+
132174### getAuthenticationHashForSharing
133175Calculates the authentication hash for sharing, pass the WebDriver's SessionID.
134176This is used to [ share a test's detail page on TestingBot] ( https://testingbot.com/support/other/sharing )
@@ -137,34 +179,31 @@ This is used to [share a test's detail page on TestingBot](https://testingbot.co
137179api .getAuthenticationHashForSharing (sessionId);
138180```
139181
140- ## Tests
182+ ### takeScreenshot
183+ Takes screenshots for the specific browsers
141184
142- `` npm test ``
185+ ``` javascript
186+ api .getUserInfo (function (error , screenshots ) {}, url, browsers, waitTime, resolution, fullPage, callbackURL);
187+ ```
143188
144- ## More documentation
189+ ### retrieveScreenshots
190+ Retrieves screenshots for a specific ` takeScreenshot ` call
145191
146- Check out the [ TestingBot REST API] ( https://testingbot.com/support/api ) for more information.
192+ ``` javascript
193+ api .getUserInfo (screenshotId, function (error , screenshots ) {});
194+ ```
147195
148- ## License
196+ ### getScreenshotList
197+ Retrieves all screenshots previously generate with your account
149198
150- The MIT License (MIT)
199+ ``` javascript
200+ api .getScreenshotList (function (error , screenshots ) {}, offset, limit);
201+ ```
151202
152- Copyright (c) TestingBot.com
203+ ## Tests
153204
154- Permission is hereby granted, free of charge, to any person obtaining a copy
155- of this software and associated documentation files (the "Software"), to deal
156- in the Software without restriction, including without limitation the rights
157- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
158- copies of the Software, and to permit persons to whom the Software is
159- furnished to do so, subject to the following conditions:
205+ `` npm test ``
160206
161- The above copyright notice and this permission notice shall be included in
162- all copies or substantial portions of the Software.
207+ ## More documentation
163208
164- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
165- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
166- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
167- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
168- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
169- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
170- THE SOFTWARE.
209+ Check out the [ TestingBot REST API] ( https://testingbot.com/support/api ) for more information.
0 commit comments