world_time_api 0.1.3 → 0.1.5
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/README.md +10 -6
- data/doc/WorldTimeApi/Request.html +177 -0
- data/doc/WorldTimeApi.html +314 -0
- data/doc/_index.html +122 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +497 -0
- data/doc/file.README.html +125 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +125 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +51 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/world_time_api/error.rb +11 -0
- data/lib/world_time_api/request.rb +32 -0
- data/lib/world_time_api/response.rb +13 -0
- data/lib/world_time_api/version.rb +4 -1
- data/lib/world_time_api.rb +21 -31
- metadata +23 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1caefbff303c95164ef8362c0f17875fdc9de8d1d9e7cae5ca82149cf331519
|
4
|
+
data.tar.gz: 14fc08778ed1ebf48cdc920b1dbcf48b86aa903f84f5d12abc7ac042069cd1ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5bce2eee4fddce4edda4394270bcde59402b679f740b867f8b4adbef99864bae4339cc182fdb015aca3ceb4e250e66640283788e9e4500c4f99ade512fe328a
|
7
|
+
data.tar.gz: a906439a67b6bb5f73c36c596dcf33d5437537de954b85d99d5da38f00aab366dbac9a734d2d71e01ac7def7669fc561b97a106855a9ac53122902fecb8b653c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# WorldTimeApi
|
2
2
|
|
3
|
+
[](https://badge.fury.io/rb/world_time_api)
|
4
|
+
|
3
5
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/world_time_api`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
6
|
|
5
7
|
## Installation
|
@@ -12,24 +14,26 @@ gem 'world_time_api'
|
|
12
14
|
|
13
15
|
And then execute:
|
14
16
|
|
15
|
-
```
|
16
|
-
|
17
|
+
```bash
|
18
|
+
bundle install
|
17
19
|
```
|
18
20
|
|
19
21
|
Or install it yourself as:
|
20
22
|
|
21
|
-
```
|
22
|
-
|
23
|
+
```bash
|
24
|
+
gem install world_time_api
|
23
25
|
```
|
24
26
|
|
25
27
|
## Usage
|
26
28
|
|
27
29
|
```ruby
|
28
|
-
WorldTimeApi.
|
30
|
+
WorldTimeApi::Timezones.call # list timezones
|
29
31
|
|
30
|
-
WorldTimeApi.
|
32
|
+
WorldTimeApi::Time.call(time_zone) # get datetime of the timezone
|
31
33
|
|
34
|
+
WorldTimeApi::ClientIp.call # get datetime by your client ip
|
32
35
|
|
36
|
+
WorldTimeApi::ClientIp.call(ip_address) # get datatime by ip address
|
33
37
|
```
|
34
38
|
|
35
39
|
## Development
|
@@ -0,0 +1,177 @@
|
|
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: WorldTimeApi::Request
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.28
|
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 = "WorldTimeApi::Request";
|
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 (R)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Request</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: WorldTimeApi::Request
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
<dl>
|
75
|
+
<dt>Includes:</dt>
|
76
|
+
<dd>HTTParty</dd>
|
77
|
+
</dl>
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
<dl>
|
85
|
+
<dt>Defined in:</dt>
|
86
|
+
<dd>lib/world_time_api/request.rb</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<h2>Overview</h2><div class="docstring">
|
92
|
+
<div class="discussion">
|
93
|
+
|
94
|
+
<p>The Request module contains methods for making HTTP requests to the World Time API.</p>
|
95
|
+
|
96
|
+
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
<div class="tags">
|
100
|
+
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>
|
105
|
+
Constant Summary
|
106
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
107
|
+
</h2>
|
108
|
+
|
109
|
+
<dl class="constants">
|
110
|
+
|
111
|
+
<dt id="Call-constant" class="">Call =
|
112
|
+
<div class="docstring">
|
113
|
+
<div class="discussion">
|
114
|
+
|
115
|
+
<p>Makes an HTTP GET request to the specified URL and returns the response as a hash.</p>
|
116
|
+
|
117
|
+
|
118
|
+
</div>
|
119
|
+
</div>
|
120
|
+
<div class="tags">
|
121
|
+
|
122
|
+
<p class="tag_title">Returns:</p>
|
123
|
+
<ul class="return">
|
124
|
+
|
125
|
+
<li>
|
126
|
+
|
127
|
+
|
128
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
—
|
133
|
+
<div class='inline'>
|
134
|
+
<p>A hash representing the response body, or an error hash if there was a problem with the request.</p>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
</li>
|
138
|
+
|
139
|
+
</ul>
|
140
|
+
|
141
|
+
</div>
|
142
|
+
</dt>
|
143
|
+
<dd><pre class="code"><span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span> <span class='tlambeg'>{</span>
|
144
|
+
<span class='kw'>begin</span>
|
145
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
|
146
|
+
|
147
|
+
<span class='kw'>return</span> <span class='const'><span class='object_link'><a href="../WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../WorldTimeApi.html#Error-constant" title="WorldTimeApi::Error (constant)">Error</a></span></span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Invalid timezone</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span> <span class='op'>!=</span> <span class='int'>200</span>
|
148
|
+
|
149
|
+
<span class='const'><span class='object_link'><a href="../WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../WorldTimeApi.html#Response-constant" title="WorldTimeApi::Response (constant)">Response</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_response'>response</span><span class='rbracket'>]</span>
|
150
|
+
<span class='kw'>rescue</span> <span class='const'>StandardError</span>
|
151
|
+
<span class='const'><span class='object_link'><a href="../WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../WorldTimeApi.html#Error-constant" title="WorldTimeApi::Error (constant)">Error</a></span></span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Connection error</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
152
|
+
<span class='kw'>end</span>
|
153
|
+
<span class='rbrace'>}</span></pre></dd>
|
154
|
+
|
155
|
+
</dl>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
</div>
|
168
|
+
|
169
|
+
<div id="footer">
|
170
|
+
Generated on Thu Feb 23 15:07:23 2023 by
|
171
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
172
|
+
0.9.28 (ruby-3.2.0).
|
173
|
+
</div>
|
174
|
+
|
175
|
+
</div>
|
176
|
+
</body>
|
177
|
+
</html>
|
@@ -0,0 +1,314 @@
|
|
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: WorldTimeApi
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.28
|
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 = "WorldTimeApi";
|
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 (W)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">WorldTimeApi</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: WorldTimeApi
|
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/world_time_api.rb<span class="defines">,<br />
|
82
|
+
lib/world_time_api/error.rb,<br /> lib/world_time_api/request.rb,<br /> lib/world_time_api/version.rb,<br /> lib/world_time_api/response.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 WorldTimeApi module contains methods for making requests to the World Time 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
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
</p>
|
109
|
+
|
110
|
+
|
111
|
+
<h2>
|
112
|
+
Constant Summary
|
113
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
114
|
+
</h2>
|
115
|
+
|
116
|
+
<dl class="constants">
|
117
|
+
|
118
|
+
<dt id="Timezones-constant" class="">Timezones =
|
119
|
+
<div class="docstring">
|
120
|
+
<div class="discussion">
|
121
|
+
|
122
|
+
<p>Returns a list of all timezones supported by the World Time API.</p>
|
123
|
+
|
124
|
+
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
<div class="tags">
|
128
|
+
|
129
|
+
<p class="tag_title">Returns:</p>
|
130
|
+
<ul class="return">
|
131
|
+
|
132
|
+
<li>
|
133
|
+
|
134
|
+
|
135
|
+
<span class='type'>(<tt><span class='object_link'><a href="#Response-constant" title="WorldTimeApi::Response (constant)">WorldTimeApi::Response</a></span></tt>)</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
—
|
140
|
+
<div class='inline'>
|
141
|
+
<p>The API response.</p>
|
142
|
+
</div>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
</ul>
|
147
|
+
|
148
|
+
</div>
|
149
|
+
</dt>
|
150
|
+
<dd><pre class="code"><span class='tlambda'>-></span> <span class='tlambeg'>{</span> <span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html#Call-constant" title="WorldTimeApi::Request::Call (constant)">Call</a></span></span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/timezone</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre></dd>
|
151
|
+
|
152
|
+
<dt id="Time-constant" class="">Time =
|
153
|
+
<div class="docstring">
|
154
|
+
<div class="discussion">
|
155
|
+
|
156
|
+
<p>Returns the current time for the specified timezone.</p>
|
157
|
+
|
158
|
+
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
<div class="tags">
|
162
|
+
|
163
|
+
<p class="tag_title">Returns:</p>
|
164
|
+
<ul class="return">
|
165
|
+
|
166
|
+
<li>
|
167
|
+
|
168
|
+
|
169
|
+
<span class='type'>(<tt><span class='object_link'><a href="#Response-constant" title="WorldTimeApi::Response (constant)">WorldTimeApi::Response</a></span></tt>)</span>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
—
|
174
|
+
<div class='inline'>
|
175
|
+
<p>The API response.</p>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
</li>
|
179
|
+
|
180
|
+
</ul>
|
181
|
+
|
182
|
+
</div>
|
183
|
+
</dt>
|
184
|
+
<dd><pre class="code"><span class='tlambda'>-></span> <span class='lparen'>(</span><span class='id identifier rubyid_timezone'>timezone</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html#Call-constant" title="WorldTimeApi::Request::Call (constant)">Call</a></span></span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/timezone/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_timezone'>timezone</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre></dd>
|
185
|
+
|
186
|
+
<dt id="ClientIp-constant" class="">ClientIp =
|
187
|
+
<div class="docstring">
|
188
|
+
<div class="discussion">
|
189
|
+
|
190
|
+
<p>Returns the current time for the client’s IP address, or for the specified IP address if provided.</p>
|
191
|
+
|
192
|
+
|
193
|
+
</div>
|
194
|
+
</div>
|
195
|
+
<div class="tags">
|
196
|
+
|
197
|
+
<p class="tag_title">Returns:</p>
|
198
|
+
<ul class="return">
|
199
|
+
|
200
|
+
<li>
|
201
|
+
|
202
|
+
|
203
|
+
<span class='type'>(<tt><span class='object_link'><a href="#Response-constant" title="WorldTimeApi::Response (constant)">WorldTimeApi::Response</a></span></tt>)</span>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
—
|
208
|
+
<div class='inline'>
|
209
|
+
<p>The API response.</p>
|
210
|
+
</div>
|
211
|
+
|
212
|
+
</li>
|
213
|
+
|
214
|
+
</ul>
|
215
|
+
|
216
|
+
</div>
|
217
|
+
</dt>
|
218
|
+
<dd><pre class="code"><span class='tlambda'>-></span> <span class='lparen'>(</span><span class='id identifier rubyid_ip'>ip</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html#Call-constant" title="WorldTimeApi::Request::Call (constant)">Call</a></span></span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/ip</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ip'>ip</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ip'>ip</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre></dd>
|
219
|
+
|
220
|
+
<dt id="Error-constant" class="">Error =
|
221
|
+
<div class="docstring">
|
222
|
+
<div class="discussion">
|
223
|
+
|
224
|
+
<p>Creates an error object with the specified message.</p>
|
225
|
+
|
226
|
+
|
227
|
+
</div>
|
228
|
+
</div>
|
229
|
+
<div class="tags">
|
230
|
+
|
231
|
+
<p class="tag_title">Returns:</p>
|
232
|
+
<ul class="return">
|
233
|
+
|
234
|
+
<li>
|
235
|
+
|
236
|
+
|
237
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
—
|
242
|
+
<div class='inline'>
|
243
|
+
<p>A hash with a single key ‘“error”` containing the error message.</p>
|
244
|
+
</div>
|
245
|
+
|
246
|
+
</li>
|
247
|
+
|
248
|
+
</ul>
|
249
|
+
|
250
|
+
</div>
|
251
|
+
</dt>
|
252
|
+
<dd><pre class="code"><span class='tlambda'>-></span> <span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='lbrace'>{</span> <span class='label'>error:</span> <span class='id identifier rubyid_message'>message</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span></pre></dd>
|
253
|
+
|
254
|
+
<dt id="VERSION-constant" class="">VERSION =
|
255
|
+
|
256
|
+
</dt>
|
257
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.1.4</span><span class='tstring_end'>"</span></span></pre></dd>
|
258
|
+
|
259
|
+
<dt id="Response-constant" class="">Response =
|
260
|
+
<div class="docstring">
|
261
|
+
<div class="discussion">
|
262
|
+
|
263
|
+
<p>Converts the HTTParty response object into a hash.</p>
|
264
|
+
|
265
|
+
|
266
|
+
</div>
|
267
|
+
</div>
|
268
|
+
<div class="tags">
|
269
|
+
|
270
|
+
<p class="tag_title">Returns:</p>
|
271
|
+
<ul class="return">
|
272
|
+
|
273
|
+
<li>
|
274
|
+
|
275
|
+
|
276
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
—
|
281
|
+
<div class='inline'>
|
282
|
+
<p>A hash representation of the response body.</p>
|
283
|
+
</div>
|
284
|
+
|
285
|
+
</li>
|
286
|
+
|
287
|
+
</ul>
|
288
|
+
|
289
|
+
</div>
|
290
|
+
</dt>
|
291
|
+
<dd><pre class="code"><span class='tlambda'>-></span> <span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span> <span class='rbrace'>}</span></pre></dd>
|
292
|
+
|
293
|
+
</dl>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
</div>
|
305
|
+
|
306
|
+
<div id="footer">
|
307
|
+
Generated on Thu Feb 23 15:07:23 2023 by
|
308
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
309
|
+
0.9.28 (ruby-3.2.0).
|
310
|
+
</div>
|
311
|
+
|
312
|
+
</div>
|
313
|
+
</body>
|
314
|
+
</html>
|
data/doc/_index.html
ADDED
@@ -0,0 +1,122 @@
|
|
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
|
+
Documentation by YARD 0.9.28
|
8
|
+
|
9
|
+
</title>
|
10
|
+
|
11
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
14
|
+
|
15
|
+
<script type="text/javascript">
|
16
|
+
pathId = null;
|
17
|
+
relpath = '';
|
18
|
+
</script>
|
19
|
+
|
20
|
+
|
21
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
24
|
+
|
25
|
+
|
26
|
+
</head>
|
27
|
+
<body>
|
28
|
+
<div class="nav_wrap">
|
29
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
30
|
+
<div id="resizer"></div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div id="main" tabindex="-1">
|
34
|
+
<div id="header">
|
35
|
+
<div id="menu">
|
36
|
+
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search">
|
40
|
+
|
41
|
+
<a class="full_list_link" id="class_list_link"
|
42
|
+
href="class_list.html">
|
43
|
+
|
44
|
+
<svg width="24" height="24">
|
45
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
46
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
47
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
48
|
+
</svg>
|
49
|
+
</a>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
<div class="clear"></div>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.28</h1>
|
56
|
+
<div id="listing">
|
57
|
+
<h1 class="alphaindex">Alphabetic Index</h1>
|
58
|
+
|
59
|
+
<h2>File Listing</h2>
|
60
|
+
<ul id="files" class="index_inline_list">
|
61
|
+
|
62
|
+
|
63
|
+
<li class="r1"><a href="index.html" title="README">README</a></li>
|
64
|
+
|
65
|
+
|
66
|
+
</ul>
|
67
|
+
|
68
|
+
<div class="clear"></div>
|
69
|
+
<h2>Namespace Listing A-Z</h2>
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
<table>
|
75
|
+
<tr>
|
76
|
+
<td valign='top' width="33%">
|
77
|
+
|
78
|
+
|
79
|
+
<ul id="alpha_R" class="alpha">
|
80
|
+
<li class="letter">R</li>
|
81
|
+
<ul>
|
82
|
+
|
83
|
+
<li>
|
84
|
+
<span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span>
|
85
|
+
|
86
|
+
<small>(WorldTimeApi)</small>
|
87
|
+
|
88
|
+
</li>
|
89
|
+
|
90
|
+
</ul>
|
91
|
+
</ul>
|
92
|
+
|
93
|
+
|
94
|
+
<ul id="alpha_W" class="alpha">
|
95
|
+
<li class="letter">W</li>
|
96
|
+
<ul>
|
97
|
+
|
98
|
+
<li>
|
99
|
+
<span class='object_link'><a href="WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span>
|
100
|
+
|
101
|
+
</li>
|
102
|
+
|
103
|
+
</ul>
|
104
|
+
</ul>
|
105
|
+
|
106
|
+
</td>
|
107
|
+
</tr>
|
108
|
+
</table>
|
109
|
+
|
110
|
+
</div>
|
111
|
+
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<div id="footer">
|
115
|
+
Generated on Thu Feb 23 15:07:22 2023 by
|
116
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
117
|
+
0.9.28 (ruby-3.2.0).
|
118
|
+
</div>
|
119
|
+
|
120
|
+
</div>
|
121
|
+
</body>
|
122
|
+
</html>
|