Drag[en]gine Script Module DragonScript  1.23
Dragengine.Services.BaseServiceConversions Class Reference

Helper functions for common conversion tasks. More...

Inheritance diagram for Dragengine.Services.BaseServiceConversions:

Public Member Functions

ServiceUserFeatures.AuthTokenProvider convertAuthTokenProvider (ServiceObject so)
 Convert service user features auth token provider. More...
 
bool convertBool (ServiceObject so, String key, bool defaultValue)
 Convert service object boolean value. More...
 
float convertFloat (ServiceObject so, String key, float defaultValue)
 Convert service object float value. More...
 
Float convertFloatObject (ServiceObject so, String key)
 Convert service object Float object value. More...
 
int convertInteger (ServiceObject so, String key, int defaultValue)
 Convert service object integer value. More...
 
ServiceModsFeatures convertModsFeatures (ServiceObject so)
 Convert service mods features. More...
 
ServiceObject convertReport (ServiceModReport report)
 Convert report to service object. More...
 
ServiceObject convertReport (ServiceUserReport report)
 Convert report to service object. More...
 
String convertString (ServiceObject so, String key)
 Convert service object string value. More...
 
String convertString (ServiceObject so, String key, String defaultValue)
 Convert service object string value. More...
 
Dictionary convertStringDict (ServiceObject so, String key)
 Convert service object string dictionary value. More...
 
Array convertStringList (ServiceObject so, String key)
 Convert service object string list value. More...
 
Set convertStringSet (ServiceObject so, String key)
 Convert service object string set value. More...
 
TimeDate convertTimeDate (ServiceObject so, String key)
 Convert service object TimeDate value. More...
 
ServiceUserFeatures convertUserFeatures (ServiceObject so)
 Convert service user features. More...
 
ServiceException createException (Service service, ServiceObject error)
 Create exception from response. More...
 
BaseServiceConversions new ()
 Create base conversion helper instance. More...
 

Public Attributes

Dictionary mapErrorCategory
 Map from int error category to Enumeration constant. More...
 
Dictionary mapErrorCode
 Map from int error code to Enumeration constant. More...
 

Detailed Description

Helper functions for common conversion tasks.

Version
1.23

Member Function Documentation

◆ convertAuthTokenProvider()

ServiceUserFeatures.AuthTokenProvider Dragengine.Services.BaseServiceConversions.convertAuthTokenProvider ( ServiceObject  so)

Convert service user features auth token provider.

◆ convertBool()

bool Dragengine.Services.BaseServiceConversions.convertBool ( ServiceObject  so,
String  key,
bool  defaultValue 
)

Convert service object boolean value.

◆ convertFloat()

float Dragengine.Services.BaseServiceConversions.convertFloat ( ServiceObject  so,
String  key,
float  defaultValue 
)

Convert service object float value.

◆ convertFloatObject()

Float Dragengine.Services.BaseServiceConversions.convertFloatObject ( ServiceObject  so,
String  key 
)

Convert service object Float object value.

◆ convertInteger()

int Dragengine.Services.BaseServiceConversions.convertInteger ( ServiceObject  so,
String  key,
int  defaultValue 
)

Convert service object integer value.

◆ convertModsFeatures()

ServiceModsFeatures Dragengine.Services.BaseServiceConversions.convertModsFeatures ( ServiceObject  so)

Convert service mods features.

◆ convertReport() [1/2]

ServiceObject Dragengine.Services.BaseServiceConversions.convertReport ( ServiceModReport  report)

Convert report to service object.

◆ convertReport() [2/2]

ServiceObject Dragengine.Services.BaseServiceConversions.convertReport ( ServiceUserReport  report)

Convert report to service object.

◆ convertString() [1/2]

String Dragengine.Services.BaseServiceConversions.convertString ( ServiceObject  so,
String  key 
)

Convert service object string value.

◆ convertString() [2/2]

String Dragengine.Services.BaseServiceConversions.convertString ( ServiceObject  so,
String  key,
String  defaultValue 
)

Convert service object string value.

◆ convertStringDict()

Dictionary Dragengine.Services.BaseServiceConversions.convertStringDict ( ServiceObject  so,
String  key 
)

Convert service object string dictionary value.

◆ convertStringList()

Array Dragengine.Services.BaseServiceConversions.convertStringList ( ServiceObject  so,
String  key 
)

Convert service object string list value.

◆ convertStringSet()

Set Dragengine.Services.BaseServiceConversions.convertStringSet ( ServiceObject  so,
String  key 
)

Convert service object string set value.

◆ convertTimeDate()

TimeDate Dragengine.Services.BaseServiceConversions.convertTimeDate ( ServiceObject  so,
String  key 
)

Convert service object TimeDate value.

◆ convertUserFeatures()

ServiceUserFeatures Dragengine.Services.BaseServiceConversions.convertUserFeatures ( ServiceObject  so)

Convert service user features.

◆ createException()

ServiceException Dragengine.Services.BaseServiceConversions.createException ( Service  service,
ServiceObject  error 
)

Create exception from response.

◆ new()

BaseServiceConversions Dragengine.Services.BaseServiceConversions.new ( )

Create base conversion helper instance.

Member Data Documentation

◆ mapErrorCategory

Dictionary Dragengine.Services.BaseServiceConversions.mapErrorCategory

Map from int error category to Enumeration constant.

◆ mapErrorCode

Dictionary Dragengine.Services.BaseServiceConversions.mapErrorCode

Map from int error code to Enumeration constant.


The documentation for this class was generated from the following file: