Skip to content

Latest commit

 

History

History
276 lines (191 loc) · 9.49 KB

FlavorsApi.md

File metadata and controls

276 lines (191 loc) · 9.49 KB

corellium.FlavorsApi

Request timeouts

Every API method accepts _request_timeout in seconds: a positive float for the urllib3 total timeout, or a pair of positive floats (connect, read). This controls HTTP transport waiting, not how long the server operation may run. It is not a wall-clock deadline for the operation or for all retries combined.

Transport timeouts raise urllib3.exceptions.TimeoutError subclasses such as ReadTimeoutError and ConnectTimeoutError. When retries are exhausted, urllib3 can instead raise urllib3.exceptions.MaxRetryError; inspect its reason to distinguish a timeout from other connection failures. Retry behavior depends on the HTTP method and Configuration.retries. These are client-side exceptions, not HTTP response statuses or SDK ApiException responses.

A timeout does not guarantee cancellation or rollback of an operation accepted by the server. For example, after a start request times out, the instance may still be starting or may already be running; the timeout alone does not establish its state or mean it was stopped or destroyed. The request might not have reached the server at all, leaving the instance off. Treat the outcome as unknown and fetch the instance's current state before deciding whether to retry. If it has since been destroyed, that lookup may return not found; the timeout itself does not prove destruction. Do not blindly repeat a state-changing request.

Catch urllib3.exceptions.TimeoutError and urllib3.exceptions.MaxRetryError separately from the SDK ApiException. MaxRetryError is not a subclass of TimeoutError. With _with_http_info the same rules apply. With _without_preload_content, a read timeout may also occur later when reading the returned response body.

All URIs are relative to https://app.corellium.com/api

Method HTTP request Description
v3_get_frame GET /v3/flavors/{flavorId} Get the device frame layout for a model
v3_get_frame_image GET /v3/flavors/{flavorId}/image Get the device frame image for a model
v3_get_product_image GET /v3/flavors/{flavorId}/productimage Get the product image for a model

v3_get_frame

FlavorFrame v3_get_frame(flavor_id)

Get the device frame layout for a model

Returns the layout of the on-screen device frame (the picture of the phone drawn around the screen) for a model: its size, where the screen sits inside it, and where the home button is. Use it to draw a device image around a screenshot or live display. flavorId is a model flavor from GET /v3/models. Returns 404 if the model has no frame.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.flavor_frame import FlavorFrame
from corellium.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
    host = "https://app.corellium.com/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corellium.FlavorsApi(api_client)
    flavor_id = 'iphone8' # str | Flavor ID.

    try:
        # Get the device frame layout for a model
        api_response = api_instance.v3_get_frame(flavor_id)
        print("The response of FlavorsApi->v3_get_frame:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling FlavorsApi->v3_get_frame: %s\n" % e)

Parameters

Name Type Description Notes
flavor_id str Flavor ID.

Return type

FlavorFrame

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Frame for the flavor. -
404 No frame found for the given flavor ID. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

v3_get_frame_image

bytearray v3_get_frame_image(flavor_id)

Get the device frame image for a model

Downloads the picture of the device frame (the phone body drawn around the screen) for a model, to combine with the layout from v3GetFrame. Returns 404 if the model has no frame image.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
    host = "https://app.corellium.com/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corellium.FlavorsApi(api_client)
    flavor_id = 'iphone8' # str | Flavor ID.

    try:
        # Get the device frame image for a model
        api_response = api_instance.v3_get_frame_image(flavor_id)
        print("The response of FlavorsApi->v3_get_frame_image:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling FlavorsApi->v3_get_frame_image: %s\n" % e)

Parameters

Name Type Description Notes
flavor_id str Flavor ID.

Return type

bytearray

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream, application/json

HTTP response details

Status code Description Response headers
200 Frame image file. -
404 No frame image found for the given flavor ID. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

v3_get_product_image

bytearray v3_get_product_image(flavor_id)

Get the product image for a model

Downloads a product picture of the device model, for example to show in a model picker. Returns 404 if the model has no product image.

Example

  • Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
    host = "https://app.corellium.com/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = corellium.FlavorsApi(api_client)
    flavor_id = 'iphone8' # str | Flavor ID.

    try:
        # Get the product image for a model
        api_response = api_instance.v3_get_product_image(flavor_id)
        print("The response of FlavorsApi->v3_get_product_image:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling FlavorsApi->v3_get_product_image: %s\n" % e)

Parameters

Name Type Description Notes
flavor_id str Flavor ID.

Return type

bytearray

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream, application/json

HTTP response details

Status code Description Response headers
200 Product image file. -
404 No product image found for the given flavor ID. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]