class RipeAPI : BaseAPI, BrandAPI, BuildAPI, LocaleAPI, SizeAPI
The API class to be instantiated. Implements all the API interfaces.
RipeAPI(options: Map<String, Any>)
Builds a standalone API instance. RipeAPI(owner: Ripe)
Builds a RipeAPI instance with the provided Ripe instance as owner. |
var owner: Ripe
The Ripe instance that will use this API. |
open fun getConfigAsync(options: Map<String, Any> = HashMap()): Deferred<Map<String, Any>?>
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: |
|
open fun getDefaultsAsync(options: Map<String, Any> = HashMap()): Deferred<Map<String, Any>?>
Returns the default customization of a specific brand or model. If no model is provided then returns the defaults of the owner's current model. |
|
open fun getImageUrl(options: Map<String, Any> = HashMap()): String
Returns the url of a composition for the current configuration. |
|
open fun getLocaleModelAsync(options: Map<String, Any> = HashMap()): Deferred<Map<String, Any>?>
Retrieves the bundle of part, materials and colors translations of a specific brand and model If no model is defined the retrieves the bundle of the owner's current model. The options map accepts the following keys: |
|
open fun getPriceAsync(options: Map<String, Any> = HashMap()): Deferred<Map<String, Any>?>
Retrieves the price for current configuration. Returns a Deferred object that will be completed asynchronously. |
|
open fun getSizesAsync(options: Map<String, Any> = HashMap()): Deferred<Map<String, Any>?>
Provides a list of all the available size scales. This can be used to know what scales are available for size conversions. |
|
open fun getUrl(): String
Helper method that retrieves the base API URL from the owner's options. |
|
open fun localeAsync(value: String, locale: String, options: Map<String, Any>): Deferred<Map<String, Any>?>
Localizes a value to the provided locale. |
|
open fun localeMultipleAsync(values: List<String>, locale: String, options: Map<String, Any>): Deferred<Map<String, Any>?>
Localizes a list of values to the provided locale. |
|
open fun nativeToSizeAsync(scale: String, value: Int, gender: String, options: Map<String, Any> = HashMap()): Deferred<Map<String, Any>?>
Converts a size value in the specified scale to the corresponding native size. The available scales, genders and sizes can be obtained with the method getPriceAsync. |
|
open fun nativeToSizeBAsync(scales: List<String>, values: List<Int>, genders: List<String>, options: Map<String, Any> = HashMap()): Deferred<List<Map<String, Any>>?>
Converts multiple size values to the corresponding native size. The available scales, genders and sizes can be obtained with the method getPriceAsync. |
|
open fun sizeToNativeAsync(scale: String, value: Double, gender: String, options: Map<String, Any> = HashMap()): Deferred<Map<String, Any>?>
Converts a size value from the native scale to the corresponding value in the specified scale. The available scales, genders and sizes can be obtained with the method getSizesAsync. |
|
open fun sizeToNativeBAsync(scales: List<String>, values: List<Double>, genders: List<String>, options: Map<String, Any> = HashMap()): Deferred<List<Map<String, Any>>?>
Converts multiple size values from the native scale to the corresponding values in the specified scales. The available scales, genders and sizes can be obtained with the method getSizesAsync. |