RAPP Platform API
Main Page
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
CognitiveGetHistory.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
CognitiveGetHistory
(CloudMsg):
12
""" Cognitive Get History Cloud Message object """
13
14
class
Request
(CloudRequest):
15
""" Cognitive Get History Cloud Request object.
16
17
CognitiveGetHistory.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_from
26
- @ref time_to
27
"""
28
29
## Cognitive Exercise test type. Can be one of:
30
# - 'ArithmeticCts'
31
# - 'AwarenessCts'
32
# - 'ReasoningCts'
33
# - ''
34
#
35
# If left empty, history of all test types will be returned.
36
self.
test_type
=
''
37
## Unix timestamp.
38
self.
time_from
= 0
39
## Unix timestamp.
40
self.
time_to
= 0
41
super(
CognitiveGetHistory.Request
, self).
__init__
(**kwargs)
42
43
44
def
make_payload
(self):
45
""" Create and return the Payload of the Request. """
46
return
Payload(
47
from_time=self.
time_from
,
48
to_time=self.
time_to
,
49
test_type=self.
test_type
)
50
51
52
def
make_files
(self):
53
""" Create and return Array of File objects of the Request. """
54
return
[]
55
56
57
class
Response
(CloudResponse):
58
""" Cognitive Get History Cloud Response object.
59
60
CognitiveGetHistory.Response
61
"""
62
def
__init__
(self, **kwargs):
63
"""!
64
Constructor
65
66
@param **kwargs - Keyword arguments. Apply values to the request attributes.
67
- @ref error
68
- @ref records
69
"""
70
71
## Error message
72
self.
error
=
''
73
## Users history records.
74
self.
records
= {}
75
super(
CognitiveGetHistory.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_from
85
- @ref Request.time_to
86
"""
87
88
# Create and hold the Request object for this CloudMsg
89
self.
req
=
CognitiveGetHistory.Request
()
90
# Create and hold the Response object for this CloudMsg
91
self.
resp
=
CognitiveGetHistory.Response
()
92
super(CognitiveGetHistory, self).
__init__
(
93
svcname=
'cognitive_get_history'
, **kwargs)
94
95
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.Response.error
error
Error message.
Definition:
CognitiveGetHistory.py:72
RappCloud.Objects
Definition:
__init__.py:1
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.__init__
def __init__
Constructor.
Definition:
CognitiveGetHistory.py:78
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.Request.time_from
time_from
Unix timestamp.
Definition:
CognitiveGetHistory.py:38
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory
Definition:
CognitiveGetHistory.py:11
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.Response
Definition:
CognitiveGetHistory.py:57
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.Request.test_type
test_type
Cognitive Exercise test type.
Definition:
CognitiveGetHistory.py:36
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.Response.records
records
Users history records.
Definition:
CognitiveGetHistory.py:74
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.resp
resp
Definition:
CognitiveGetHistory.py:91
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.req
req
Definition:
CognitiveGetHistory.py:89
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.Request
Definition:
CognitiveGetHistory.py:14
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.Request.__init__
def __init__
Constructor.
Definition:
CognitiveGetHistory.py:19
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.Request.time_to
time_to
Unix timestamp.
Definition:
CognitiveGetHistory.py:40
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.Request.make_files
def make_files
Definition:
CognitiveGetHistory.py:52
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.Response.__init__
def __init__
Constructor.
Definition:
CognitiveGetHistory.py:62
RappCloud.CloudMsgs.CognitiveGetHistory.CognitiveGetHistory.Request.make_payload
def make_payload
Definition:
CognitiveGetHistory.py:44
python
RappCloud
CloudMsgs
CognitiveGetHistory.py
Generated on Fri Jul 29 2016 18:45:01 for RAPP Platform API by
1.8.6