npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

testingbot-api

v1.0.9

Published

A wrapper around TestingBot's REST API

Downloads

2,678

Readme

npm version npm downloads Tests

testingbot-api

Wrapper around the TestingBot REST API for Node.js.

Install

npm install testingbot-api

Credentials

You can use environment variables TESTINGBOT_KEY and TESTINGBOT_SECRET to pass your TestingBot key and secret to the API client. The key and secret can be obtained from TestingBot

Using the wrapper

var TestingBot = require('testingbot-api');

var tb = new TestingBot({
  api_key: "your-tb-key",
  api_secret: "your-tb-secret"
});

getBrowsers

Gets a list of browsers you can test on

api.getBrowsers(function(error, browsers) {});

getDevices

Gets a list of physical mobile devices you can test on

api.getDevices(function(error, devices) {});

getAvailableDevices

Gets a list of available physical mobile devices for your account

api.getAvailableDevices(function(error, availableDevices) {});

getDevice

Gets details for a specific physical device

api.getDevice(deviceId, function(error, deviceDetails) {});

getUserInfo

Gets your user information

api.getUserInfo(function(error, userInfo) {});

getTests

Gets list of your latest tests

api.getTests(function(error, tests) {}, offset, limit);

getTestDetails

Gets details for a single test, pass the WebDriver's SessionID

api.getTestDetails(sessionId, function(error, testDetails) {});

updateTest

Updates a single test. For example, update the passed state of a test (whether it was successful or not).

var testData = { "test[success]" : "1", "test[status_message]" : "test" };
api.updateTest(testData, sessionId, function(error, testDetails) {});

deleteTest

Deletes a single test, pass the WebDriver's SessionID

api.deleteTest(sessionId, function(error, success) {});

stopTest

Stops a single test, pass the WebDriver's SessionID

api.stopTest(sessionId, function(error, success) {});

getTunnelList

Gets list of active tunnels

api.getTunnelList(function(error, tunnelList) {});

deleteTunnel

Deletes a single Tunnel

api.deleteTunnel(tunnelId, function(error, success) {});

getBuilds

Retrieves the latest builds

api.getBuilds(function(error, builds) {}, offset, limit);

getTestsForBuild

Retrieves the tests for a single build

api.getTestsForBuild(buildId, function(error, tests) {});

deleteBuild

Deletes a single build

api.deleteBuild(buildId, function(error, success) {});

uploadFile

Uploads a local file to TestingBot Storage

api.uploadFile(localFilePath, function(error, appUrl) {});

uploadRemoteFile

Uploads a remote file to TestingBot Storage

api.uploadFile(remoteFileUrl, function(error, appUrl) {});

getStorageFile

Retrieve data from a previously uploaded file

api.getStorageFile(remoteFileUrl, function(error, fileDetails) {});

getStorageFiles

Retrieve list of previously uploaded files

api.getStorageFiles(function(error, fileDetails) {}, offset, limit);

deleteStorageFile

Delete a previously uploaded file

api.deleteStorageFile(appId, function(error, success) {});

getAuthenticationHashForSharing

Calculates the authentication hash for sharing, pass the WebDriver's SessionID. This is used to share a test's detail page on TestingBot

api.getAuthenticationHashForSharing(sessionId);

takeScreenshot

Takes screenshots for the specific browsers

api.getUserInfo(function(error, screenshots) {}, url, browsers, waitTime, resolution, fullPage, callbackURL);

retrieveScreenshots

Retrieves screenshots for a specific takeScreenshot call

api.getUserInfo(screenshotId, function(error, screenshots) {});

getScreenshotList

Retrieves all screenshots previously generate with your account

api.getScreenshotList(function(error, screenshots) {}, offset, limit);

getTeam

Retrieves team information

api.getTeam(function(error, data) {});

getUsersInTeam

Get all users in your team

api.getUsersInTeam(function(error, users) {});

getUserFromTeam

Retrieves information about a specific user in your team

api.getUserFromTeam(userId, function(error, user) {});

createUserInTeam

Add a user to your team. You need ADMIN rights for this.

api.createUserInTeam(user, function(error, result) {});

updateUserInTeam

Update a user in your team. You need ADMIN rights for this.

api.updateUserInTeam(userId, userData, function(error, result) {});

resetCredentials

Resets credentials for a specific user in your team. You need ADMIN rights for this.

api.resetCredentials(userId, function(error, result) {});

Tests

npm test

More documentation

Check out the TestingBot REST API for more information.