Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (50 sloc) 2.37 KB
NS_ASSUME_NONNULL_BEGIN
/**
* Protocol of the Brand API methods.
*/
@protocol BrandAPI <NSObject>
@optional
/**
* Returns the configuration information of the owner's current model.
* To retrieve the configuration of a specific model the method `-[BrandAPI getConfig:callback:]` should be used.
*
* @param callback A Block that will the receive the configuration as parameter.
*/
- (void)getConfig:(void (^)(NSDictionary *response))callback;
/**
* Returns the configuration information of a specific brand and model.
* If no model is provided then returns the information of the owner's current model.
* The **options** map accepts the following keys:
* - **brand** - The brand of the model.
* - **model** - The name of the model.
* - **country** - The country where the model will be provided, some materials/colors might not be available.
* - **flag** - A specific flag that may change the provided materials/colors available.
* - **filter** - If the configuration should be filtered by the country and/or flag (defaults `TRUE`).
*
* @param options A map with options.
* @param callback A Block that will the receive the configuration as parameter.
*/
- (void)getConfig:(NSDictionary * _Nullable)options callback:(void (^)(NSDictionary *response))callback;
/**
* Returns the configuration information of the owner's current model.
* To retrieve the configuration of a specific model the method `-[BrandAPI getConfigP:callback:]` should be used.
*
* @return A Promise that will be resolved with the configuration.
*/
- (Promise *)getConfigP;
/**
* Returns the configuration information of a specific brand and model. If no model is provided
* then returns the information of the owner's current model.
* The **options** map accepts the following keys:
* - **brand** - The brand of the model.
* - **model** - The name of the model.
* - **country** - The country where the model will be provided, some materials/colors might not be available.
* - **flag** - A specific flag that may change the provided materials/colors available.
* - **filter** - If the configuration should be filtered by the country and/or flag (defaults `TRUE`).
*
* @param options A map with options.
* @return A Promise that will be resolved with the configuration.
*/
- (Promise *)getConfigP:(NSDictionary *)options;
@end
NS_ASSUME_NONNULL_END
You can’t perform that action at this time.