ALAssetContext Class Reference

Inherits from NSObject
Declared in ALAssetContext.h

Overview

Asset context descriptor

  apiKey

The API key

@property NSString *apiKey

Declared In

ALAssetContext.h

  projectID

Project ID

@property NSString *projectID

Declared In

ALAssetContext.h

  stage

The stage the asset is in

@property NSString *stage

Declared In

ALAssetContext.h

  anylineVersion

The Anyline version targeted

@property NSString *anylineVersion

Declared In

ALAssetContext.h

  training

Training value

@property NSString *training

Declared In

ALAssetContext.h

  assetID

The asset ID

@property NSString *assetID

Declared In

ALAssetContext.h

  assetVersion

The asset version

@property NSString *assetVersion

Declared In

ALAssetContext.h

– asJSONString

Return the asset context as a JSON string

- (NSString *)asJSONString

Return Value

the asset context as a JSON string

Declared In

ALAssetContext.h

+ getProjectConfigWithContext:timeout:error:

Returns the project configuration from a trainer context.

+ (NSDictionary *_Nullable)getProjectConfigWithContext:(ALAssetContext *_Nonnull)context timeout:(NSTimeInterval)timeout error:(NSError *_Nullable *_Nullable)error

Parameters

context

An asset context with the appropriate projectId and apiKey set

timeout

Maximum of time (in seconds) to wait to get the result

error

This will be set to an NSError if there is a timeout or another problem with getting the configuration, or nil if there was no issue.

Return Value

the project configuration as a dictionary

Declared In

ALAssetContext.h

+ getAuthTokenWithContext:timeout:error:

Returns a temporary authorization token from a trainer context. The token will be cached until it expires. If there already exists a cached token which has not yet expired, it will be reused.

+ (NSString *_Nullable)getAuthTokenWithContext:(ALAssetContext *_Nonnull)context timeout:(NSTimeInterval)timeout error:(NSError *_Nullable *_Nullable)error

Parameters

context

An asset context with the appropriate projectId and apiKey set

timeout

Maximum of time (in seconds) to wait to get the token

error

This will be set to an NSError if there is a timeout or another problem with getting the token, or nil if there was no issue.

Return Value

the authentication token to use with the trainer session

Declared In

ALAssetContext.h