Apps Api¶
- class bsapi.app_automate.appium.apps.AppsApi¶
Class for interacting with the Apps REST endpoint
- classmethod delete_app(app_id)¶
Delete the app from BrowserStack
Example:
apps = AppsApi.uploaded_apps() if len(apps) > 0: app = apps[0] response = AppsApi.delete_app(app.app_id) if response: print("The app was deleted")
- Parameters
app_id (str) – App ID of the uploaded app
- Returns
True/False
- Return type
bool
- classmethod upload_app(file=None, url=None, custom_id=None)¶
Upload an application file to BrowserStack. File or url must be set but not both.
Example:
uploaded_app = AppsApi.upload_app("MyApp.apk", custom_id="MyApplication")
- Parameters
file (str) – The file to be uploaded to Browserstack
url (str) – Public url for the app to be uploaded from
custom_id (str) – Custom Identifier
- Returns
The response from the server including the app url, custom id, and shareable id
- Return type
bsapi.app.automate.appium.apps.UploadResponse- Raises
ValueError – file or url are required but not both
- classmethod uploaded_apps(custom_id=None)¶
Return all of the uploaded apps for a custom id. If no custom id is supplied all apps are returned
Example:
apps = AppsApi.uploaded_apps("MyApplication")
- Parameters
custom_id (str) – The custom id used with the app was uploaded
- Returns
A list of uploaded apps
- Return type
- classmethod uploaded_apps_by_group(limit=None)¶
Get the uploaded apps for your group
Example:
apps = AppsApi.uploaded_apps_by_group()
- Returns
Returns an list of uploaded apps
- Return type
- class bsapi.app_automate.appium.apps.UploadResponse(app_url=None, custom_id=None, shareable_id=None)¶
The response from uploading an app
- Variables
app_url (str) – The url for the app to use with appium
custom_id (str) – The custom id that was set during upload
shareable_id (str) – The shareable id for the app
- class bsapi.app_automate.appium.apps.UploadedApp(app_name=None, app_version=None, app_url=None, app_id=None, uploaded_at=None, custom_id=None, shareable_id=None)¶
An app that has been uploaded to BrowserStack
- Variables
app_name (str) – Filename of the app
app_version (str) – Version of the uploaded app
app_url (str) – The url for the app to use with appium
app_id (str) – Unique id for the app
uploaded_at (str) – When the app was uploaded
custom_id (str) – Custom ID that was defined for the app
shareable_id (str) – Shareable ID allows other users to test an app you uploaded