RAPP Platform API
Main Page
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
WeatherReportCurrent.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
WeatherReportCurrent
(CloudMsg):
12
""" Weather Report Current Cloud Message object """
13
14
class
Request
(CloudRequest):
15
""" Weather Report Current Cloud Request object.
16
17
WeatherReportCurrent.Request
18
"""
19
def
__init__
(self, **kwargs):
20
"""!
21
Constructor
22
23
@param **kwargs - Keyword arguments. Apply values to the request attributes.
24
- @ref city
25
- @ref weather_reporter
26
- @ref metric
27
"""
28
29
## The desired city
30
self.
city
=
''
31
## The weather API to use. Defaults to "yweather" .
32
self.
weather_reporter
=
''
33
## The return value units.
34
self.
metric
= 0
35
super(
WeatherReportCurrent.Request
, self).
__init__
(**kwargs)
36
37
38
def
make_payload
(self):
39
""" Create and return the Payload of the Request. """
40
return
Payload(
41
city=self.
city
,
42
weather_reporter=self.
weather_reporter
,
43
metric=self.
metric
44
)
45
46
47
def
make_files
(self):
48
""" Create and return Array of File objects of the Request. """
49
return
[]
50
51
52
class
Response
(CloudResponse):
53
""" Weather Report Current Cloud Response object.
54
55
WeatherReportCurrent.Response
56
"""
57
def
__init__
(self, **kwargs):
58
"""!
59
Constructor
60
61
@param **kwargs - Keyword arguments. Apply values to the request attributes.
62
- @ref error
63
- @ref date
64
- @ref temperature
65
- @ref weather_description
66
- @ref humidity
67
- @ref visibility
68
- @ref pressure
69
- @ref wind_speed
70
- @ref wind_temperature
71
- @ref wind_direction
72
"""
73
74
## Error message
75
self.
error
=
''
76
## Current date
77
self.
date
=
''
78
## Current temperature
79
self.
temperature
=
''
80
## A brief description of the current weather
81
self.
weather_description
=
''
82
## Current humidity
83
self.
humidity
=
''
84
## Current vilibility
85
self.
visibility
=
''
86
## Current pressure
87
self.
pressure
=
''
88
## Current speed of the wind
89
self.
wind_speed
=
''
90
## Current temperature of the wind
91
self.
wind_temperature
=
''
92
## Current wind direction
93
self.
wind_direction
=
''
94
super(
WeatherReportCurrent.Response
, self).
__init__
(**kwargs)
95
96
97
def
__init__
(self, **kwargs):
98
"""!
99
Constructor
100
101
@param **kwargs - Keyword argumen.ts. Apply values to the request attributes.
102
- @ref Request.city
103
- @ref Request.weather_reporter
104
- @ref Request.metric
105
"""
106
107
# Create and hold the Request object for this CloudMsg
108
self.
req
=
WeatherReportCurrent.Request
()
109
# Create and hold the Response object for this CloudMsg
110
self.
resp
=
WeatherReportCurrent.Response
()
111
super(WeatherReportCurrent, self).
__init__
(
112
svcname=
'weather_report_current'
, **kwargs)
113
114
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Request
Definition:
WeatherReportCurrent.py:14
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.resp
resp
Definition:
WeatherReportCurrent.py:110
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Request.__init__
def __init__
Constructor.
Definition:
WeatherReportCurrent.py:19
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response.wind_speed
wind_speed
Current speed of the wind.
Definition:
WeatherReportCurrent.py:89
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response.pressure
pressure
Current pressure.
Definition:
WeatherReportCurrent.py:87
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response.weather_description
weather_description
A brief description of the current weather.
Definition:
WeatherReportCurrent.py:81
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response.humidity
humidity
Current humidity.
Definition:
WeatherReportCurrent.py:83
RappCloud.Objects
Definition:
__init__.py:1
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response
Definition:
WeatherReportCurrent.py:52
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Request.metric
metric
The return value units.
Definition:
WeatherReportCurrent.py:34
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response.__init__
def __init__
Constructor.
Definition:
WeatherReportCurrent.py:57
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Request.weather_reporter
weather_reporter
The weather API to use.
Definition:
WeatherReportCurrent.py:32
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.__init__
def __init__
Constructor.
Definition:
WeatherReportCurrent.py:97
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Request.make_files
def make_files
Definition:
WeatherReportCurrent.py:47
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response.visibility
visibility
Current vilibility.
Definition:
WeatherReportCurrent.py:85
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent
Definition:
WeatherReportCurrent.py:11
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response.wind_temperature
wind_temperature
Current temperature of the wind.
Definition:
WeatherReportCurrent.py:91
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Request.make_payload
def make_payload
Definition:
WeatherReportCurrent.py:38
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Request.city
city
The desired city.
Definition:
WeatherReportCurrent.py:30
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response.wind_direction
wind_direction
Current wind direction.
Definition:
WeatherReportCurrent.py:93
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.req
req
Definition:
WeatherReportCurrent.py:108
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response.date
date
Current date.
Definition:
WeatherReportCurrent.py:77
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response.error
error
Error message.
Definition:
WeatherReportCurrent.py:75
RappCloud.CloudMsgs.WeatherReportCurrent.WeatherReportCurrent.Response.temperature
temperature
Current temperature.
Definition:
WeatherReportCurrent.py:79
python
RappCloud
CloudMsgs
WeatherReportCurrent.py
Generated on Fri Jul 29 2016 18:45:01 for RAPP Platform API by
1.8.6