linchpinagency / browserstack
Client library for Browserstack Screenshot API forked from alexschwarz89/browserstack
Installs: 49
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
pkg:composer/linchpinagency/browserstack
Requires
- php: >=5.3.3
- tzfrs/curl: 1.0
Requires (Dev)
- phpunit/phpunit: 4.4.0
This package is auto-updated.
Last update: 2025-09-30 23:28:50 UTC
README
An easy-to-use PHP library for the Browserstack Screenshots API forked from alexschwarz89/browserstack.
Working examples included.
Install
Install via composer:
{ "require": { "linchpinagency/browserstack": "0.0.3" } }
Run composer install
.
Example usage
Get an array of available browsers
use Linchpin\Browserstack\Screenshots\ScreenshotsAPI; $screenshots_api = new ScreenshotsAPI( 'username', 'password' ); $browser_list = $api->get_browsers();
Generate a screenshot
use Linchpin\Browserstack\Screenshots\ScreenshotsAPI; use Linchpin\Browserstack\Screenshots\Request; $screenshots_api = new ScreenshotsAPI( 'account', 'password' ); $request = Request::build_request( 'http://www.example.org', 'Windows', '8.1', 'ie', '11.0' ); $response = $screenshots_api->send_request( $request ); $job_ID = $response->job_ID;
Query information about the request
$status = $api->get_job_status( 'browserstack_jobID' ); if ( $status->is_finished() ) { foreach ( $status->finished_screenshots as $screenshot ) { print $screenshot->image_url ."\n"; } }