import GboxSDK from "gbox-sdk";const gboxSDK = new GboxSDK({ apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted});async function main() { // Create an Android box const box = await gboxSDK.create({ type: "android" }); // Get basic app information (metadata only) const androidAppListInfo = await box.app.listInfo(); console.log("App info:", androidAppListInfo); // Get app operators for interaction capabilities const androidAppList = await box.app.list(); // Iterate through each app operator and perform actions for (const app of androidAppList.operators) { console.log(`App data: ${JSON.stringify(app.data, null, 2)}`); // Open the app using the operator await app.open(); }}main();
import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"]) # This is the default and can be omitted
# Create an Android box
box = gbox_sdk.create(type="android")
# Get basic app information (metadata only)
android_app_list_info = box.app.list_info()
print("App info:", android_app_list_info)
# Get app operators for interaction capabilities
android_app_list = box.app.list()
# Iterate through each app operator and perform actions
for app in android_app_list.operators:
print(f"App data: {app.data}")
# Open the app using the operator
app.open()
if __name__ == "__main__":
main()
import GboxSDK from "gbox-sdk";const gboxSDK = new GboxSDK({ apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted});async function main() { // Create an Android box const box = await gboxSDK.create({ type: "android" }); // Get basic app information (metadata only) const androidAppListInfo = await box.app.listInfo(); console.log("App info:", androidAppListInfo); // Get app operators for interaction capabilities const androidAppList = await box.app.list(); // Iterate through each app operator and perform actions for (const app of androidAppList.operators) { console.log(`App data: ${JSON.stringify(app.data, null, 2)}`); // Open the app using the operator await app.open(); }}main();
import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"]) # This is the default and can be omitted
# Create an Android box
box = gbox_sdk.create(type="android")
# Get basic app information (metadata only)
android_app_list_info = box.app.list_info()
print("App info:", android_app_list_info)
# Get app operators for interaction capabilities
android_app_list = box.app.list()
# Iterate through each app operator and perform actions
for app in android_app_list.operators:
print(f"App data: {app.data}")
# Open the app using the operator
app.open()
if __name__ == "__main__":
main()