RAPP Platform API
Main Page
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
CognitiveGetScores.py
Go to the documentation of this file.
1
from
RappCloud.Objects
import
(
2
File,
3
Payload)
4
5
from
Cloud
import
(
6
CloudMsg,
7
CloudRequest,
8
CloudResponse)
9
10
11
class
CognitiveGetScores
(CloudMsg):
12
""" Cognitive Get Scores Cloud Message object """
13
14
class
Request
(CloudRequest):
15
""" Cognitive Get Scores Cloud Request object.
16
17
CognitiveGetScores.Request
18
"""
19
def
__init__
(self, **kwargs):
20
"""!
21
Constructor
22
23
@param **kwargs - Keyword arguments. Apply values to the request attributes.
24
- @ref test_type
25
- @ref time_to
26
"""
27
28
## Cognitive Exercise test type. Can be one of:
29
# - 'ArithmeticCts'
30
# - 'AwarenessCts'
31
# - 'ReasoningCts'
32
# - ''
33
#
34
# If left empty, history of all test types will be returned.
35
self.
test_type
=
''
36
## Unix timestamp. Retrieve scores up to this timestamp value.
37
self.
time_to
= 0
38
super(
CognitiveGetScores.Request
, self).
__init__
(**kwargs)
39
40
41
def
make_payload
(self):
42
""" Create and return the Payload of the Request. """
43
return
Payload(
44
up_to_time=self.
time_to
,
45
test_type=self.
test_type
)
46
47
48
def
make_files
(self):
49
""" Create and return Array of File objects of the Request. """
50
return
[]
51
52
53
class
Response
(CloudResponse):
54
""" Cognitive Get Scores Cloud Response object.
55
56
CognitiveGetScores.Response
57
"""
58
def
__init__
(self, **kwargs):
59
"""!
60
Constructor
61
62
@param **kwargs - Keyword arguments. Apply values to the request attributes.
63
- @ref error
64
- @ref test_classes
65
- @ref scores
66
"""
67
68
## Error message
69
self.
error
=
''
70
## Array of the test classes indexes.
71
self.
test_classes
= []
72
## Array of scores. Each array index corresponds to the test class
73
# in @ref test_classes
74
self.
scores
= []
75
super(
CognitiveGetScores.Response
, self).
__init__
(**kwargs)
76
77
78
def
__init__
(self, **kwargs):
79
"""!
80
Constructor
81
82
@param **kwargs - Keyword argumen.ts. Apply values to the request attributes.
83
- @ref Request.test_type
84
- @ref Request.time_to
85
"""
86
87
# Create and hold the Request object for this CloudMsg
88
self.
req
=
CognitiveGetScores.Request
()
89
# Create and hold the Response object for this CloudMsg
90
self.
resp
=
CognitiveGetScores.Response
()
91
super(CognitiveGetScores, self).
__init__
(
92
svcname=
'cognitive_get_scores'
, **kwargs)
93
94
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores
Definition:
CognitiveGetScores.py:11
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.Response.test_classes
test_classes
Array of the test classes indexes.
Definition:
CognitiveGetScores.py:71
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.Request.time_to
time_to
Unix timestamp.
Definition:
CognitiveGetScores.py:37
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.Request
Definition:
CognitiveGetScores.py:14
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.Request.test_type
test_type
Cognitive Exercise test type.
Definition:
CognitiveGetScores.py:35
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.Response.__init__
def __init__
Constructor.
Definition:
CognitiveGetScores.py:58
RappCloud.Objects
Definition:
__init__.py:1
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.Request.__init__
def __init__
Constructor.
Definition:
CognitiveGetScores.py:19
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.Request.make_files
def make_files
Definition:
CognitiveGetScores.py:48
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.Response.scores
scores
Array of scores.
Definition:
CognitiveGetScores.py:74
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.Response
Definition:
CognitiveGetScores.py:53
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.resp
resp
Definition:
CognitiveGetScores.py:90
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.__init__
def __init__
Constructor.
Definition:
CognitiveGetScores.py:78
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.Response.error
error
Error message.
Definition:
CognitiveGetScores.py:69
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.req
req
Definition:
CognitiveGetScores.py:88
RappCloud.CloudMsgs.CognitiveGetScores.CognitiveGetScores.Request.make_payload
def make_payload
Definition:
CognitiveGetScores.py:41
python
RappCloud
CloudMsgs
CognitiveGetScores.py
Generated on Fri Jul 29 2016 18:45:01 for RAPP Platform API by
1.8.6