purple_air_api 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,128 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: PurpleAirApi::V1
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "PurpleAirApi::V1";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (V)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../PurpleAirApi.html" title="PurpleAirApi (module)">PurpleAirApi</a></span></span>
41
+ &raquo;
42
+ <span class="title">V1</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: PurpleAirApi::V1
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/purple_air_api/V1/client.rb<span class="defines">,<br />
82
+ lib/purple_air_api/V1/errors.rb,<br /> lib/purple_air_api/V1/sensors/errors.rb,<br /> lib/purple_air_api/V1/sensors/get_sensor.rb,<br /> lib/purple_air_api/V1/sensors/get_sensors.rb,<br /> lib/purple_air_api/V1/raise_http_exception.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Overview</h2><div class="docstring">
89
+ <div class="discussion">
90
+
91
+ <p>The V1 API Module for namespacing the PurpleAir V1 API</p>
92
+
93
+
94
+ </div>
95
+ </div>
96
+ <div class="tags">
97
+
98
+
99
+ </div><h2>Defined Under Namespace</h2>
100
+ <p class="children">
101
+
102
+
103
+
104
+
105
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="V1/ApiError.html" title="PurpleAirApi::V1::ApiError (class)">ApiError</a></span>, <span class='object_link'><a href="V1/ApiKeyError.html" title="PurpleAirApi::V1::ApiKeyError (class)">ApiKeyError</a></span>, <span class='object_link'><a href="V1/BaseError.html" title="PurpleAirApi::V1::BaseError (class)">BaseError</a></span>, <span class='object_link'><a href="V1/Client.html" title="PurpleAirApi::V1::Client (class)">Client</a></span>, <span class='object_link'><a href="V1/GetSensor.html" title="PurpleAirApi::V1::GetSensor (class)">GetSensor</a></span>, <span class='object_link'><a href="V1/GetSensors.html" title="PurpleAirApi::V1::GetSensors (class)">GetSensors</a></span>, <span class='object_link'><a href="V1/MissingJsonPayloadError.html" title="PurpleAirApi::V1::MissingJsonPayloadError (class)">MissingJsonPayloadError</a></span>, <span class='object_link'><a href="V1/NotFoundError.html" title="PurpleAirApi::V1::NotFoundError (class)">NotFoundError</a></span>, <span class='object_link'><a href="V1/OptionsError.html" title="PurpleAirApi::V1::OptionsError (class)">OptionsError</a></span>, <span class='object_link'><a href="V1/RaiseHttpException.html" title="PurpleAirApi::V1::RaiseHttpException (class)">RaiseHttpException</a></span>, <span class='object_link'><a href="V1/ServerError.html" title="PurpleAirApi::V1::ServerError (class)">ServerError</a></span>
106
+
107
+
108
+ </p>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+ </div>
119
+
120
+ <div id="footer">
121
+ Generated on Fri Mar 12 10:06:10 2021 by
122
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
123
+ 0.9.26 (ruby-3.0.0).
124
+ </div>
125
+
126
+ </div>
127
+ </body>
128
+ </html>
@@ -0,0 +1,159 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Exception: PurpleAirApi::V1::ApiError
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "PurpleAirApi::V1::ApiError";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (A)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../PurpleAirApi.html" title="PurpleAirApi (module)">PurpleAirApi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../V1.html" title="PurpleAirApi::V1 (module)">V1</a></span></span>
41
+ &raquo;
42
+ <span class="title">ApiError</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Exception: PurpleAirApi::V1::ApiError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="BaseError.html" title="PurpleAirApi::V1::BaseError (class)">BaseError</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="BaseError.html" title="PurpleAirApi::V1::BaseError (class)">BaseError</a></span></li>
80
+
81
+ <li class="next">PurpleAirApi::V1::ApiError</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/purple_air_api/V1/errors.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>Raised when the PurpleAir API returns the HTTP status code 400. Use the message and error_type on the Error object to determine additional information regarding the error.</p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+
117
+ </div>
118
+
119
+
120
+
121
+
122
+
123
+ <h2>Instance Attribute Summary</h2>
124
+
125
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="BaseError.html" title="PurpleAirApi::V1::BaseError (class)">BaseError</a></span></h3>
126
+ <p class="inherited"><span class='object_link'><a href="BaseError.html#error_type-instance_method" title="PurpleAirApi::V1::BaseError#error_type (method)">#error_type</a></span>, <span class='object_link'><a href="BaseError.html#response_object-instance_method" title="PurpleAirApi::V1::BaseError#response_object (method)">#response_object</a></span></p>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <h2>Method Summary</h2>
137
+
138
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseError.html" title="PurpleAirApi::V1::BaseError (class)">BaseError</a></span></h3>
139
+ <p class="inherited"><span class='object_link'><a href="BaseError.html#initialize-instance_method" title="PurpleAirApi::V1::BaseError#initialize (method)">#initialize</a></span></p>
140
+
141
+ <div id="constructor_details" class="method_details_list">
142
+ <h2>Constructor Details</h2>
143
+
144
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="BaseError.html#initialize-instance_method" title="PurpleAirApi::V1::BaseError#initialize (method)">PurpleAirApi::V1::BaseError</a></span></p>
145
+
146
+ </div>
147
+
148
+
149
+ </div>
150
+
151
+ <div id="footer">
152
+ Generated on Fri Mar 12 10:06:11 2021 by
153
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
154
+ 0.9.26 (ruby-3.0.0).
155
+ </div>
156
+
157
+ </div>
158
+ </body>
159
+ </html>
@@ -0,0 +1,159 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Exception: PurpleAirApi::V1::ApiKeyError
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "PurpleAirApi::V1::ApiKeyError";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (A)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../PurpleAirApi.html" title="PurpleAirApi (module)">PurpleAirApi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../V1.html" title="PurpleAirApi::V1 (module)">V1</a></span></span>
41
+ &raquo;
42
+ <span class="title">ApiKeyError</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Exception: PurpleAirApi::V1::ApiKeyError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="BaseError.html" title="PurpleAirApi::V1::BaseError (class)">BaseError</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="BaseError.html" title="PurpleAirApi::V1::BaseError (class)">BaseError</a></span></li>
80
+
81
+ <li class="next">PurpleAirApi::V1::ApiKeyError</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/purple_air_api/V1/errors.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>Raised when the PurpleAir API returns the HTTP status code 403</p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+
117
+ </div>
118
+
119
+
120
+
121
+
122
+
123
+ <h2>Instance Attribute Summary</h2>
124
+
125
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="BaseError.html" title="PurpleAirApi::V1::BaseError (class)">BaseError</a></span></h3>
126
+ <p class="inherited"><span class='object_link'><a href="BaseError.html#error_type-instance_method" title="PurpleAirApi::V1::BaseError#error_type (method)">#error_type</a></span>, <span class='object_link'><a href="BaseError.html#response_object-instance_method" title="PurpleAirApi::V1::BaseError#response_object (method)">#response_object</a></span></p>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <h2>Method Summary</h2>
137
+
138
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseError.html" title="PurpleAirApi::V1::BaseError (class)">BaseError</a></span></h3>
139
+ <p class="inherited"><span class='object_link'><a href="BaseError.html#initialize-instance_method" title="PurpleAirApi::V1::BaseError#initialize (method)">#initialize</a></span></p>
140
+
141
+ <div id="constructor_details" class="method_details_list">
142
+ <h2>Constructor Details</h2>
143
+
144
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="BaseError.html#initialize-instance_method" title="PurpleAirApi::V1::BaseError#initialize (method)">PurpleAirApi::V1::BaseError</a></span></p>
145
+
146
+ </div>
147
+
148
+
149
+ </div>
150
+
151
+ <div id="footer">
152
+ Generated on Fri Mar 12 10:06:11 2021 by
153
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
154
+ 0.9.26 (ruby-3.0.0).
155
+ </div>
156
+
157
+ </div>
158
+ </body>
159
+ </html>
@@ -0,0 +1,431 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Exception: PurpleAirApi::V1::BaseError
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "PurpleAirApi::V1::BaseError";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (B)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../PurpleAirApi.html" title="PurpleAirApi (module)">PurpleAirApi</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../V1.html" title="PurpleAirApi::V1 (module)">V1</a></span></span>
41
+ &raquo;
42
+ <span class="title">BaseError</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Exception: PurpleAirApi::V1::BaseError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">StandardError</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next">PurpleAirApi::V1::BaseError</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/purple_air_api/V1/errors.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>A custom error class for rescuing from all PurpleAir API errors</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div><div id="subclasses">
116
+ <h2>Direct Known Subclasses</h2>
117
+ <p class="children"><span class='object_link'><a href="ApiError.html" title="PurpleAirApi::V1::ApiError (class)">ApiError</a></span>, <span class='object_link'><a href="ApiKeyError.html" title="PurpleAirApi::V1::ApiKeyError (class)">ApiKeyError</a></span>, <span class='object_link'><a href="MissingJsonPayloadError.html" title="PurpleAirApi::V1::MissingJsonPayloadError (class)">MissingJsonPayloadError</a></span>, <span class='object_link'><a href="NotFoundError.html" title="PurpleAirApi::V1::NotFoundError (class)">NotFoundError</a></span>, <span class='object_link'><a href="ServerError.html" title="PurpleAirApi::V1::ServerError (class)">ServerError</a></span></p>
118
+ </div>
119
+
120
+
121
+
122
+
123
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
124
+ <ul class="summary">
125
+
126
+ <li class="public ">
127
+ <span class="summary_signature">
128
+
129
+ <a href="#error_type-instance_method" title="#error_type (instance method)">#<strong>error_type</strong> &#x21d2; Object </a>
130
+
131
+
132
+
133
+ </span>
134
+
135
+
136
+
137
+
138
+ <span class="note title readonly">readonly</span>
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <span class="summary_desc"><div class='inline'>
149
+ <p>Returns the value of attribute error_type.</p>
150
+ </div></span>
151
+
152
+ </li>
153
+
154
+
155
+ <li class="public ">
156
+ <span class="summary_signature">
157
+
158
+ <a href="#response_object-instance_method" title="#response_object (instance method)">#<strong>response_object</strong> &#x21d2; Object </a>
159
+
160
+
161
+
162
+ </span>
163
+
164
+
165
+
166
+
167
+ <span class="note title readonly">readonly</span>
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+ <span class="summary_desc"><div class='inline'>
178
+ <p>Returns the value of attribute response_object.</p>
179
+ </div></span>
180
+
181
+ </li>
182
+
183
+
184
+ </ul>
185
+
186
+
187
+
188
+
189
+
190
+ <h2>
191
+ Instance Method Summary
192
+ <small><a href="#" class="summary_toggle">collapse</a></small>
193
+ </h2>
194
+
195
+ <ul class="summary">
196
+
197
+ <li class="public ">
198
+ <span class="summary_signature">
199
+
200
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(message, error_type, response_object) &#x21d2; BaseError </a>
201
+
202
+
203
+
204
+ </span>
205
+
206
+
207
+ <span class="note title constructor">constructor</span>
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+ <span class="summary_desc"><div class='inline'>
217
+ <p>Initialize the error object with error_type and the Faraday response object.</p>
218
+ </div></span>
219
+
220
+ </li>
221
+
222
+
223
+ </ul>
224
+
225
+
226
+
227
+ <div id="constructor_details" class="method_details_list">
228
+ <h2>Constructor Details</h2>
229
+
230
+ <div class="method_details first">
231
+ <h3 class="signature first" id="initialize-instance_method">
232
+
233
+ #<strong>initialize</strong>(message, error_type, response_object) &#x21d2; <tt><span class='object_link'><a href="" title="PurpleAirApi::V1::BaseError (class)">BaseError</a></span></tt>
234
+
235
+
236
+
237
+
238
+
239
+ </h3><div class="docstring">
240
+ <div class="discussion">
241
+
242
+ <p>Initialize the error object with error_type and the Faraday response object. PurpleAir returns a human friendly error message and type which is added here. You can also reference the response to view the raw response from PurpleAir.</p>
243
+
244
+
245
+ </div>
246
+ </div>
247
+ <div class="tags">
248
+ <p class="tag_title">Parameters:</p>
249
+ <ul class="param">
250
+
251
+ <li>
252
+
253
+ <span class='name'>message</span>
254
+
255
+
256
+ <span class='type'>(<tt>String</tt>)</span>
257
+
258
+
259
+
260
+ &mdash;
261
+ <div class='inline'>
262
+ <p>the message you want displayed when the error is raised</p>
263
+ </div>
264
+
265
+ </li>
266
+
267
+ <li>
268
+
269
+ <span class='name'>error_type</span>
270
+
271
+
272
+ <span class='type'>(<tt>String</tt>)</span>
273
+
274
+
275
+
276
+ &mdash;
277
+ <div class='inline'>
278
+ <p>the error type that PurpleAir includes in the JSON response</p>
279
+ </div>
280
+
281
+ </li>
282
+
283
+ <li>
284
+
285
+ <span class='name'>response_object</span>
286
+
287
+
288
+ <span class='type'>(<tt>Faraday::Env</tt>)</span>
289
+
290
+
291
+
292
+ &mdash;
293
+ <div class='inline'>
294
+ <p>the Faraday response object</p>
295
+ </div>
296
+
297
+ </li>
298
+
299
+ </ul>
300
+
301
+
302
+ </div><table class="source_code">
303
+ <tr>
304
+ <td>
305
+ <pre class="lines">
306
+
307
+
308
+ 16
309
+ 17
310
+ 18
311
+ 19
312
+ 20</pre>
313
+ </td>
314
+ <td>
315
+ <pre class="code"><span class="info file"># File 'lib/purple_air_api/V1/errors.rb', line 16</span>
316
+
317
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_error_type'>error_type</span><span class='comma'>,</span> <span class='id identifier rubyid_response_object'>response_object</span><span class='rparen'>)</span>
318
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
319
+ <span class='ivar'>@error_type</span> <span class='op'>=</span> <span class='id identifier rubyid_error_type'>error_type</span>
320
+ <span class='ivar'>@response_object</span> <span class='op'>=</span> <span class='id identifier rubyid_response_object'>response_object</span>
321
+ <span class='kw'>end</span></pre>
322
+ </td>
323
+ </tr>
324
+ </table>
325
+ </div>
326
+
327
+ </div>
328
+
329
+ <div id="instance_attr_details" class="attr_details">
330
+ <h2>Instance Attribute Details</h2>
331
+
332
+
333
+ <span id=""></span>
334
+ <div class="method_details first">
335
+ <h3 class="signature first" id="error_type-instance_method">
336
+
337
+ #<strong>error_type</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
338
+
339
+
340
+
341
+
342
+
343
+ </h3><div class="docstring">
344
+ <div class="discussion">
345
+
346
+ <p>Returns the value of attribute error_type.</p>
347
+
348
+
349
+ </div>
350
+ </div>
351
+ <div class="tags">
352
+
353
+
354
+ </div><table class="source_code">
355
+ <tr>
356
+ <td>
357
+ <pre class="lines">
358
+
359
+
360
+ 7
361
+ 8
362
+ 9</pre>
363
+ </td>
364
+ <td>
365
+ <pre class="code"><span class="info file"># File 'lib/purple_air_api/V1/errors.rb', line 7</span>
366
+
367
+ <span class='kw'>def</span> <span class='id identifier rubyid_error_type'>error_type</span>
368
+ <span class='ivar'>@error_type</span>
369
+ <span class='kw'>end</span></pre>
370
+ </td>
371
+ </tr>
372
+ </table>
373
+ </div>
374
+
375
+
376
+ <span id=""></span>
377
+ <div class="method_details ">
378
+ <h3 class="signature " id="response_object-instance_method">
379
+
380
+ #<strong>response_object</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
381
+
382
+
383
+
384
+
385
+
386
+ </h3><div class="docstring">
387
+ <div class="discussion">
388
+
389
+ <p>Returns the value of attribute response_object.</p>
390
+
391
+
392
+ </div>
393
+ </div>
394
+ <div class="tags">
395
+
396
+
397
+ </div><table class="source_code">
398
+ <tr>
399
+ <td>
400
+ <pre class="lines">
401
+
402
+
403
+ 7
404
+ 8
405
+ 9</pre>
406
+ </td>
407
+ <td>
408
+ <pre class="code"><span class="info file"># File 'lib/purple_air_api/V1/errors.rb', line 7</span>
409
+
410
+ <span class='kw'>def</span> <span class='id identifier rubyid_response_object'>response_object</span>
411
+ <span class='ivar'>@response_object</span>
412
+ <span class='kw'>end</span></pre>
413
+ </td>
414
+ </tr>
415
+ </table>
416
+ </div>
417
+
418
+ </div>
419
+
420
+
421
+ </div>
422
+
423
+ <div id="footer">
424
+ Generated on Fri Mar 12 10:06:11 2021 by
425
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
426
+ 0.9.26 (ruby-3.0.0).
427
+ </div>
428
+
429
+ </div>
430
+ </body>
431
+ </html>