Cortex Android
 All Classes Namespaces Functions Variables
nl.sense_os.cortex.coaching.backend.MessageAPI Class Reference
Inheritance diagram for nl.sense_os.cortex.coaching.backend.MessageAPI:
nl.sense_os.cortex.coaching.backend.CoachingAPI

Public Member Functions

List< MessagegetAllMessages (Coach.TYPE coachType, long startTime, long endTime)
 
boolean uploadMessage (Message message)
 

Static Public Member Functions

static MessageAPI getInstance (SensePlatform sensePlatform)
 

Protected Attributes

final String MESSAGES_END_POINT_PREFIX = "/users/self/coaches/<coach_type>/messages"
 
- Protected Attributes inherited from nl.sense_os.cortex.coaching.backend.CoachingAPI
final String RESPONSE_CODE = "http response code"
 
final String RESPONSE_CONTENT = "content"
 
String secret_code
 
SensePlatform mSensePlatform
 
SharedPreferences mAuthPrefs
 
CoachingEngine coachingEngine
 

Static Protected Attributes

static final String TAG = "MessageAPI"
 
static String KEY_COACH_TYPE = "coach_type"
 
static String KEY_TASK_TYPE = "task_type"
 
static String KEY_TASK_START_TIME = "task_start_time"
 
static String KEY_GENERATION_TIME = "generation_time"
 
static String KEY_TRIGGER_TIME = "trigger_time"
 
static String KEY_MSG_TYPE = "msg_type"
 
static String KEY_VALUE = "value"
 
static String KEY_TARGET = "target"
 
static String KEY_STYLE = "style"
 
static String KEY_STYLE_MSG_ID = "motivation_id"
 
static String KEY_ADVICE_ID = "advice_id"
 
static String KEY_TITLE = "title"
 
static String KEY_NOTIFICATION_TEXT = "notification"
 
static String KEY_TEXT = "text"
 
static MessageAPI instance
 
- Static Protected Attributes inherited from nl.sense_os.cortex.coaching.backend.CoachingAPI
static String BASE_URL_STAGING = "http://coaching-api.staging.sense-os.nl"
 
static String BASE_URL_TESTING = "http://coaching-api.dev.sense-os.nl"
 
static final String RESPONSE_OK = "200"
 
static final String RESPONSE_CREATED = "201"
 
static final String RESPONSE_NO_CONENT = "204"
 
static final String REQUEST_METHOD_PUT = "PUT"
 
static final String REQUEST_METHOD_DELETE = "DELETE"
 

Additional Inherited Members

- Static Public Attributes inherited from nl.sense_os.cortex.coaching.backend.CoachingAPI
static final String BASE_URL_PRODUCTION = "https://coaching-api.sense-os.nl"
 
- Protected Member Functions inherited from nl.sense_os.cortex.coaching.backend.CoachingAPI
 CoachingAPI (SensePlatform sensePlatform)
 
Map< String, String > request (String endPoint, JSONObject content) throws IOException, RuntimeException
 
BACKEND_RELEASE getBackendRelease ()
 
Map< String, String > request (String endPoint, JSONObject content, String requestMethod) throws IOException, RuntimeException
 

Member Function Documentation

List<Message> nl.sense_os.cortex.coaching.backend.MessageAPI.getAllMessages ( Coach.TYPE  coachType,
long  startTime,
long  endTime 
)

Get all the Messages

Returns
A list of all the messages
boolean nl.sense_os.cortex.coaching.backend.MessageAPI.uploadMessage ( Message  message)

Upload a new message

Parameters
messageThe message object to upload
Returns
True if it was successful false otherwise

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