Appearance
browserstack-client • Readme | API
browserstack-client / LocalTestingClient
Class: LocalTestingClient
Represents a client for interacting with the BrowserStack Local API.
Index
getBinaryInstances — Retrieves a list of recent Local binary instances from the server.
getBinaryInstance — Retrieves details of a Local binary instance from the server.
disconnectBinaryInstance — Disconnects a binary instance.
Extends
APIClient
Constructors
new LocalTestingClient(options)
new LocalTestingClient(
options?):LocalTestingClient
Constructs a new instance of the ScreenshotsClient class.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | LocalTestingOptions | Optional configuration options for the client. |
Returns
Overrides
APIClient.constructor
Source
Methods
getBinaryInstances()
getBinaryInstances(
query?,options?):Promise<Object[]>
Retrieves a list of recent Local binary instances from the server.
Parameters
| Parameter | Type | Description |
|---|---|---|
query? | Omit<Object, "auth_token"> | - |
options? | APIFetchOptions<Object> | The fetch options for the request. |
Returns
Promise<Object[]>
A promise that resolves to a fetch response containing the list of active Local instances.
Source
getBinaryInstance()
getBinaryInstance(
localInstanceId,query?,options?):Promise<Object>
Retrieves details of a Local binary instance from the server.
Parameters
| Parameter | Type | Description |
|---|---|---|
localInstanceId | string | The ID of the local binary instance to retrieve. |
query? | Omit<Object, "auth_token"> | Optional query parameters for the request. |
options? | APIFetchOptions<Object> | Optional fetch options for the request. |
Returns
Promise<Object>
A promise that resolves to the retrieved local binary instance.
Member Type Description idstringDescription
Unique identifier for the Local instance.
ExampleQUERTY1stringDescription
User account that started the Local instance.
Examplejohn@browserstack.comhostnamestringDescription
Hostname for the machine running the Local instance.
Examplemy-local-boxlastActiveOnstringDescription
Timestamp at which the Local instance was last active.
Example2013-03-14 16:25:45 UTCstartTimestringDescription
Timestamp at which the Local instance was started.
Example2013-03-14 16:25:45 UTCendTimestringDescription
Timestamp at which the Local instance was terminated.
Example2013-03-14 16:25:45 UTCdisconnectReasonstringDescription
Reason for termination of the Local instance.
ExampleUser terminated the instance.commandLineParamsstringDescription
Command line parameters used to start the Local instance.
Example--key <access_key> --enable-logging-for-api --local-identifier <local_identifier>localIdentifierstringDescription
Identifier for the Local instance.
Example4207442b2b0567368956dba064c22a3235a76214public-IPstringDescription
Public IP address of the machine running the Local instance.
Example8.8.4.4privateIPstring[]Example [ "127.0.0.1", "10.100.100.1" ]
Throws
If no local binary instance is found with the specified ID.
Source
disconnectBinaryInstance()
disconnectBinaryInstance(
localInstanceId,query?,options?):Promise<string>
Disconnects a binary instance.
Parameters
| Parameter | Type | Description |
|---|---|---|
localInstanceId | string | The ID of the local binary instance to disconnect. |
query? | Omit<Object, "auth_token"> | Optional query parameters for the request. |
options? | APIFetchOptions<Object> | Optional API fetch options. |
Returns
Promise<string>
A promise that resolves to a string representing the message from the server.