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" }); // List all Android packages installed on the box (simple info) const androidPkgSimpleList = await box.pkg.listSimpleInfo(); console.log(`Android Pkg List: ${JSON.stringify(androidPkgSimpleList, null, 2)}`);}main();
import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])
# Create an Android box
box = gbox_sdk.create(type="android")
# List all Android packages installed on the box (simple info)
android_pkg_simple_list = box.pkg.list_simple_info()
print(f"Android Pkg List: {android_pkg_simple_list}")
if __name__ == "__main__":
main()
A faster endpoint to quickly retrieve basic pkg information. This API provides better performance for scenarios where you need to get essential pkg details quickly.
GET
/
boxes
/
{boxId}
/
android
/
packages
/
simple
JavaScript
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" }); // List all Android packages installed on the box (simple info) const androidPkgSimpleList = await box.pkg.listSimpleInfo(); console.log(`Android Pkg List: ${JSON.stringify(androidPkgSimpleList, null, 2)}`);}main();
import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])
# Create an Android box
box = gbox_sdk.create(type="android")
# List all Android packages installed on the box (simple info)
android_pkg_simple_list = box.pkg.list_simple_info()
print(f"Android Pkg List: {android_pkg_simple_list}")
if __name__ == "__main__":
main()