mushikago-sdk 0.2.3 → 0.3.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.
- data/README.md +9 -6
- data/autotest/discover.rb +1 -0
- data/doc/Mushikago.html +37 -21
- data/doc/Mushikago/Auth.html +8 -4
- data/doc/Mushikago/Auth/Signature.html +59 -32
- data/doc/Mushikago/Auth/Signer.html +81 -44
- data/doc/Mushikago/Config.html +41 -18
- data/doc/Mushikago/Hotaru.html +120 -0
- data/doc/Mushikago/Hotaru/Client.html +818 -0
- data/doc/Mushikago/Hotaru/Request.html +303 -0
- data/doc/Mushikago/Http.html +10 -6
- data/doc/Mushikago/Http/Client.html +107 -58
- data/doc/Mushikago/Http/MultipartRequest.html +366 -0
- data/doc/Mushikago/Http/Request.html +289 -167
- data/doc/Mushikago/Http/Response.html +153 -70
- data/doc/Mushikago/Mitsubachi.html +108 -0
- data/doc/Mushikago/Mitsubachi/Client.html +2923 -0
- data/doc/Mushikago/Mitsubachi/HttpFetchRequest.html +363 -0
- data/doc/Mushikago/Mitsubachi/HttpPushRequest.html +365 -0
- data/doc/Mushikago/Mitsubachi/MultipartRequest.html +332 -0
- data/doc/Mushikago/Mitsubachi/ProjectCreateRequest.html +361 -0
- data/doc/Mushikago/Mitsubachi/ProjectDeleteRequest.html +351 -0
- data/doc/Mushikago/Mitsubachi/ProjectDiscontinueRequest.html +349 -0
- data/doc/Mushikago/Mitsubachi/ProjectInfoRequest.html +302 -0
- data/doc/Mushikago/Mitsubachi/ProjectListRequest.html +304 -0
- data/doc/Mushikago/Mitsubachi/ProjectQueuesRequest.html +300 -0
- data/doc/Mushikago/Mitsubachi/ProjectUpdateRequest.html +359 -0
- data/doc/Mushikago/Mitsubachi/Request.html +307 -0
- data/doc/Mushikago/Mitsubachi/ResourceDeleteRequest.html +351 -0
- data/doc/Mushikago/Mitsubachi/ResourceGetRequest.html +302 -0
- data/doc/Mushikago/Mitsubachi/ResourceListRequest.html +306 -0
- data/doc/Mushikago/Mitsubachi/ResourceStoreRequest.html +390 -0
- data/doc/Mushikago/Mitsubachi/ScriptDeleteRequest.html +351 -0
- data/doc/Mushikago/Mitsubachi/ScriptDeployRequest.html +386 -0
- data/doc/Mushikago/Mitsubachi/ScriptGetRequest.html +302 -0
- data/doc/Mushikago/Mitsubachi/ScriptListRequest.html +306 -0
- data/doc/Mushikago/Tombo.html +8 -4
- data/doc/Mushikago/Tombo/CaptureRequest.html +90 -34
- data/doc/Mushikago/Tombo/CapturesRequest.html +68 -27
- data/doc/Mushikago/Tombo/Client.html +181 -75
- data/doc/Mushikago/Tombo/DeleteRequest.html +44 -24
- data/doc/Mushikago/Tombo/InfoRequest.html +32 -16
- data/doc/Mushikago/Tombo/Request.html +45 -15
- data/doc/_index.html +192 -9
- data/doc/class_list.html +1 -1
- data/doc/css/full_list.css +2 -0
- data/doc/css/style.css +12 -10
- data/doc/file.README.html +66 -60
- data/doc/frames.html +1 -1
- data/doc/index.html +66 -60
- data/doc/js/app.js +4 -4
- data/doc/js/full_list.js +23 -6
- data/doc/method_list.html +622 -62
- data/doc/top-level-namespace.html +3 -3
- data/lib/mushikago-sdk.rb +1 -0
- data/lib/mushikago.rb +3 -0
- data/lib/mushikago/auth.rb +1 -0
- data/lib/mushikago/auth/signature.rb +1 -0
- data/lib/mushikago/auth/signer.rb +1 -0
- data/lib/mushikago/configuration.rb +3 -2
- data/lib/mushikago/hotaru.rb +22 -0
- data/lib/mushikago/hotaru/client.rb +76 -0
- data/lib/mushikago/hotaru/request.rb +32 -0
- data/lib/mushikago/http.rb +2 -0
- data/lib/mushikago/http/client.rb +2 -1
- data/lib/mushikago/http/multipart_request.rb +62 -0
- data/lib/mushikago/http/request.rb +5 -2
- data/lib/mushikago/http/response.rb +1 -0
- data/lib/mushikago/mitsubachi.rb +33 -0
- data/lib/mushikago/mitsubachi/client.rb +256 -0
- data/lib/mushikago/mitsubachi/http_fetch_request.rb +33 -0
- data/lib/mushikago/mitsubachi/http_push_request.rb +36 -0
- data/lib/mushikago/mitsubachi/multipart_request.rb +33 -0
- data/lib/mushikago/mitsubachi/project_create_request.rb +32 -0
- data/lib/mushikago/mitsubachi/project_delete_request.rb +23 -0
- data/lib/mushikago/mitsubachi/project_discontinue_request.rb +22 -0
- data/lib/mushikago/mitsubachi/project_info_request.rb +17 -0
- data/lib/mushikago/mitsubachi/project_list_request.rb +21 -0
- data/lib/mushikago/mitsubachi/project_queues_request.rb +16 -0
- data/lib/mushikago/mitsubachi/project_update_request.rb +31 -0
- data/lib/mushikago/mitsubachi/request.rb +32 -0
- data/lib/mushikago/mitsubachi/resource_delete_request.rb +24 -0
- data/lib/mushikago/mitsubachi/resource_get_request.rb +19 -0
- data/lib/mushikago/mitsubachi/resource_list_request.rb +22 -0
- data/lib/mushikago/mitsubachi/resource_store_request.rb +33 -0
- data/lib/mushikago/mitsubachi/script_delete_request.rb +23 -0
- data/lib/mushikago/mitsubachi/script_deploy_request.rb +28 -0
- data/lib/mushikago/mitsubachi/script_get_request.rb +18 -0
- data/lib/mushikago/mitsubachi/script_list_request.rb +21 -0
- data/lib/mushikago/tombo.rb +1 -0
- data/lib/mushikago/tombo/capture_request.rb +2 -1
- data/lib/mushikago/tombo/captures_request.rb +2 -1
- data/lib/mushikago/tombo/client.rb +1 -0
- data/lib/mushikago/tombo/delete_request.rb +2 -1
- data/lib/mushikago/tombo/info_request.rb +2 -1
- data/lib/mushikago/tombo/request.rb +3 -2
- data/lib/mushikago/version.rb +2 -1
- data/spec/mushikago/auth/signature_spec.rb +1 -0
- data/spec/mushikago/auth/signer_spec.rb +1 -0
- data/spec/mushikago/configuration_spec.rb +7 -6
- data/spec/mushikago/http/client_spec.rb +3 -2
- data/spec/mushikago/http/request_spec.rb +3 -1
- data/spec/mushikago/http/response_spec.rb +1 -0
- data/spec/mushikago/tombo/capture_request_spec.rb +3 -2
- data/spec/mushikago/tombo/captures_request_spec.rb +3 -2
- data/spec/mushikago/tombo/client_spec.rb +91 -32
- data/spec/mushikago/tombo/delete_request_spec.rb +3 -2
- data/spec/mushikago/tombo/info_request_spec.rb +3 -2
- data/spec/mushikago/tombo/request_spec.rb +2 -1
- data/spec/spec_helper.rb +1 -0
- metadata +136 -115
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Class: Mushikago::Hotaru::Request
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.7.4
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
relpath = '../..';
|
|
19
|
+
if (relpath != '') relpath += '/';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</head>
|
|
28
|
+
<body>
|
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<div id="header">
|
|
34
|
+
<div id="menu">
|
|
35
|
+
|
|
36
|
+
<a href="../../_index.html">Index (R)</a> »
|
|
37
|
+
<span class='title'><span class='object_link'><a href="../../Mushikago.html" title="Mushikago (module)">Mushikago</a></span></span> » <span class='title'><span class='object_link'><a href="../Hotaru.html" title="Mushikago::Hotaru (module)">Hotaru</a></span></span>
|
|
38
|
+
»
|
|
39
|
+
<span class="title">Request</span>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div id="search">
|
|
46
|
+
|
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
|
48
|
+
|
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
|
50
|
+
|
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<div class="clear"></div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<iframe id="search_frame"></iframe>
|
|
58
|
+
|
|
59
|
+
<div id="content"><h1>Class: Mushikago::Hotaru::Request
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
</h1>
|
|
64
|
+
|
|
65
|
+
<dl class="box">
|
|
66
|
+
|
|
67
|
+
<dt class="r1">Inherits:</dt>
|
|
68
|
+
<dd class="r1">
|
|
69
|
+
<span class="inheritName"><span class='object_link'><a href="../Http/Request.html" title="Mushikago::Http::Request (class)">Mushikago::Http::Request</a></span></span>
|
|
70
|
+
|
|
71
|
+
<ul class="fullTree">
|
|
72
|
+
<li>Object</li>
|
|
73
|
+
|
|
74
|
+
<li class="next"><span class='object_link'><a href="../Http/Request.html" title="Mushikago::Http::Request (class)">Mushikago::Http::Request</a></span></li>
|
|
75
|
+
|
|
76
|
+
<li class="next">Mushikago::Hotaru::Request</li>
|
|
77
|
+
|
|
78
|
+
</ul>
|
|
79
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
80
|
+
|
|
81
|
+
</dd>
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
<dt class="r2">Includes:</dt>
|
|
89
|
+
<dd class="r2"><span class='object_link'><a href="../Auth/Signature.html" title="Mushikago::Auth::Signature (module)">Auth::Signature</a></span></dd>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<dt class="r1 last">Defined in:</dt>
|
|
96
|
+
<dd class="r1 last">lib/mushikago/hotaru/request.rb</dd>
|
|
97
|
+
|
|
98
|
+
</dl>
|
|
99
|
+
<div class="clear"></div>
|
|
100
|
+
|
|
101
|
+
<h2>Overview</h2><div class="docstring">
|
|
102
|
+
<div class="discussion">
|
|
103
|
+
<p>
|
|
104
|
+
Hotaruのリクエストを表す抽象クラス
|
|
105
|
+
</p>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="tags">
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<h2>Instance Attribute Summary</h2>
|
|
132
|
+
|
|
133
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Http/Request.html" title="Mushikago::Http::Request (class)">Mushikago::Http::Request</a></span></h3>
|
|
134
|
+
<p class="inherited"><span class='object_link'><a href="../Http/Request.html#headers-instance_method" title="Mushikago::Http::Request#headers (method)">headers</a></span>, <span class='object_link'><a href="../Http/Request.html#host-instance_method" title="Mushikago::Http::Request#host (method)">host</a></span>, <span class='object_link'><a href="../Http/Request.html#http_method-instance_method" title="Mushikago::Http::Request#http_method (method)">http_method</a></span>, <span class='object_link'><a href="../Http/Request.html#params-instance_method" title="Mushikago::Http::Request#params (method)">params</a></span>, <span class='object_link'><a href="../Http/Request.html#path-instance_method" title="Mushikago::Http::Request#path (method)">path</a></span>, <span class='object_link'><a href="../Http/Request.html#port-instance_method" title="Mushikago::Http::Request#port (method)">port</a></span></p>
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<h2>
|
|
139
|
+
Instance Method Summary
|
|
140
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
141
|
+
</h2>
|
|
142
|
+
|
|
143
|
+
<ul class="summary">
|
|
144
|
+
|
|
145
|
+
<li class="public ">
|
|
146
|
+
<span class="summary_signature">
|
|
147
|
+
|
|
148
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Request) <strong>initialize</strong>(options = {}) </a>
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
</span>
|
|
153
|
+
|
|
154
|
+
<span class="note title constructor">constructor</span>
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
<span class="summary_desc"><div class='inline'><p>
|
|
164
|
+
A new instance of Request.
|
|
165
|
+
</p>
|
|
166
|
+
</div></span>
|
|
167
|
+
|
|
168
|
+
</li>
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
</ul>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Auth/Signature.html" title="Mushikago::Auth::Signature (module)">Auth::Signature</a></span></h3>
|
|
183
|
+
<p class="inherited"><span class='object_link'><a href="../Auth/Signature.html#add_signature%21-instance_method" title="Mushikago::Auth::Signature#add_signature! (method)">#add_signature!</a></span>, <span class='object_link'><a href="../Auth/Signature.html#string_to_sign-instance_method" title="Mushikago::Auth::Signature#string_to_sign (method)">#string_to_sign</a></span></p>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Http/Request.html" title="Mushikago::Http::Request (class)">Mushikago::Http::Request</a></span></h3>
|
|
193
|
+
<p class="inherited"><span class='object_link'><a href="../Http/Request.html#%5B%5D-instance_method" title="Mushikago::Http::Request#[] (method)">#[]</a></span>, <span class='object_link'><a href="../Http/Request.html#%5B%5D%3D-instance_method" title="Mushikago::Http::Request#[]= (method)">#[]=</a></span>, <span class='object_link'><a href="../Http/Request.html#add_param-class_method" title="Mushikago::Http::Request.add_param (method)">add_param</a></span>, <span class='object_link'><a href="../Http/Request.html#to_http_request-instance_method" title="Mushikago::Http::Request#to_http_request (method)">#to_http_request</a></span>, <span class='object_link'><a href="../Http/Request.html#url_encoded_params-instance_method" title="Mushikago::Http::Request#url_encoded_params (method)">#url_encoded_params</a></span></p>
|
|
194
|
+
<div id="constructor_details" class="method_details_list">
|
|
195
|
+
<h2>Constructor Details</h2>
|
|
196
|
+
|
|
197
|
+
<div class="method_details first">
|
|
198
|
+
<p class="signature first" id="initialize-instance_method">
|
|
199
|
+
|
|
200
|
+
- (<tt><span class='object_link'><a href="" title="Mushikago::Hotaru::Request (class)">Request</a></span></tt>) <strong>initialize</strong>(options = {})
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
</p><div class="docstring">
|
|
205
|
+
<div class="discussion">
|
|
206
|
+
<p>
|
|
207
|
+
A new instance of Request
|
|
208
|
+
</p>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
<div class="tags">
|
|
214
|
+
<h3>Parameters:</h3>
|
|
215
|
+
<ul class="param">
|
|
216
|
+
|
|
217
|
+
<li>
|
|
218
|
+
|
|
219
|
+
<span class='name'>options</span>
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
—
|
|
229
|
+
<div class='inline'><p>
|
|
230
|
+
オプション
|
|
231
|
+
</p>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
</li>
|
|
235
|
+
|
|
236
|
+
</ul>
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
<h3>Options Hash (<tt>options</tt>):</h3>
|
|
242
|
+
<ul class="option">
|
|
243
|
+
|
|
244
|
+
<li>
|
|
245
|
+
<span class="name">:endpoint('hotaru.mushikago.org')</span>
|
|
246
|
+
<span class="type">(<tt>String</tt>)</span>
|
|
247
|
+
<span class="default">
|
|
248
|
+
|
|
249
|
+
</span>
|
|
250
|
+
— <div class='inline'><p>
|
|
251
|
+
Hotaruのエンドポイント
|
|
252
|
+
</p>
|
|
253
|
+
</div>
|
|
254
|
+
</li>
|
|
255
|
+
|
|
256
|
+
</ul>
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
</div><table class="source_code">
|
|
261
|
+
<tr>
|
|
262
|
+
<td>
|
|
263
|
+
<pre class="lines">
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
10
|
|
267
|
+
11
|
|
268
|
+
12
|
|
269
|
+
13
|
|
270
|
+
14
|
|
271
|
+
15
|
|
272
|
+
16
|
|
273
|
+
17</pre>
|
|
274
|
+
</td>
|
|
275
|
+
<td>
|
|
276
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/hotaru/request.rb', line 10</span>
|
|
277
|
+
|
|
278
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span>
|
|
279
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
|
280
|
+
<span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:endpoint</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>Mushikago</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_hotaru_endpoint'>hotaru_endpoint</span>
|
|
281
|
+
<span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_port'>port</span> <span class='op'>=</span> <span class='id identifier rubyid_endpoint'>endpoint</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>:</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
282
|
+
<span class='ivar'>@host</span> <span class='op'>=</span> <span class='id identifier rubyid_host'>host</span>
|
|
283
|
+
<span class='ivar'>@port</span> <span class='op'>=</span> <span class='id identifier rubyid_port'>port</span> <span class='kw'>if</span> <span class='id identifier rubyid_port'>port</span>
|
|
284
|
+
<span class='ivar'>@path</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_api_version'>api_version</span><span class='rbrace'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_method_name'>method_name</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
|
285
|
+
<span class='kw'>end</span></pre>
|
|
286
|
+
</td>
|
|
287
|
+
</tr>
|
|
288
|
+
</table>
|
|
289
|
+
</div>
|
|
290
|
+
|
|
291
|
+
</div>
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
</div>
|
|
295
|
+
|
|
296
|
+
<div id="footer">
|
|
297
|
+
Generated on Thu Jan 26 17:19:02 2012 by
|
|
298
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
299
|
+
0.7.4 (ruby-1.9.2).
|
|
300
|
+
</div>
|
|
301
|
+
|
|
302
|
+
</body>
|
|
303
|
+
</html>
|
data/doc/Mushikago/Http.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Mushikago::Http
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.7.
|
|
9
|
+
— Documentation by YARD 0.7.4
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
|
|
74
74
|
<dt class="r1 last">Defined in:</dt>
|
|
75
75
|
<dd class="r1 last">lib/mushikago/http.rb<span class="defines">,<br />
|
|
76
|
-
lib/mushikago/http/client.rb,<br /> lib/mushikago/http/request.rb,<br /> lib/mushikago/http/response.rb</span>
|
|
76
|
+
lib/mushikago/http/client.rb,<br /> lib/mushikago/http/request.rb,<br /> lib/mushikago/http/response.rb,<br /> lib/mushikago/http/multipart_request.rb</span>
|
|
77
77
|
</dd>
|
|
78
78
|
|
|
79
79
|
</dl>
|
|
@@ -81,19 +81,23 @@
|
|
|
81
81
|
|
|
82
82
|
<h2>Overview</h2><div class="docstring">
|
|
83
83
|
<div class="discussion">
|
|
84
|
-
<p>
|
|
84
|
+
<p>
|
|
85
|
+
MushikagoサービスへのHTTPリクエストを扱うモジュール
|
|
86
|
+
</p>
|
|
87
|
+
|
|
85
88
|
|
|
86
89
|
</div>
|
|
87
90
|
</div>
|
|
88
91
|
<div class="tags">
|
|
89
92
|
|
|
93
|
+
|
|
90
94
|
</div><h2>Defined Under Namespace</h2>
|
|
91
95
|
<p class="children">
|
|
92
96
|
|
|
93
97
|
|
|
94
98
|
|
|
95
99
|
|
|
96
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Http/Client.html" title="Mushikago::Http::Client (class)">Client</a></span>, <span class='object_link'><a href="Http/Request.html" title="Mushikago::Http::Request (class)">Request</a></span>, <span class='object_link'><a href="Http/Response.html" title="Mushikago::Http::Response (class)">Response</a></span>
|
|
100
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Http/Client.html" title="Mushikago::Http::Client (class)">Client</a></span>, <span class='object_link'><a href="Http/MultipartRequest.html" title="Mushikago::Http::MultipartRequest (class)">MultipartRequest</a></span>, <span class='object_link'><a href="Http/Request.html" title="Mushikago::Http::Request (class)">Request</a></span>, <span class='object_link'><a href="Http/Response.html" title="Mushikago::Http::Response (class)">Response</a></span>
|
|
97
101
|
|
|
98
102
|
|
|
99
103
|
</p>
|
|
@@ -107,9 +111,9 @@
|
|
|
107
111
|
</div>
|
|
108
112
|
|
|
109
113
|
<div id="footer">
|
|
110
|
-
Generated on Thu
|
|
114
|
+
Generated on Thu Jan 26 17:19:02 2012 by
|
|
111
115
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
112
|
-
0.7.
|
|
116
|
+
0.7.4 (ruby-1.9.2).
|
|
113
117
|
</div>
|
|
114
118
|
|
|
115
119
|
</body>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Mushikago::Http::Client
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.7.
|
|
9
|
+
— Documentation by YARD 0.7.4
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
@@ -94,15 +94,19 @@
|
|
|
94
94
|
|
|
95
95
|
<h2>Overview</h2><div class="docstring">
|
|
96
96
|
<div class="discussion">
|
|
97
|
-
<p>
|
|
97
|
+
<p>
|
|
98
|
+
Mushikagoサービスに接続するクライアント
|
|
99
|
+
</p>
|
|
100
|
+
|
|
98
101
|
|
|
99
102
|
</div>
|
|
100
103
|
</div>
|
|
101
104
|
<div class="tags">
|
|
102
105
|
|
|
106
|
+
|
|
103
107
|
</div><div id="subclasses">
|
|
104
108
|
<h2>Direct Known Subclasses</h2>
|
|
105
|
-
<p class="children"><span class='object_link'><a href="../Tombo/Client.html" title="Mushikago::Tombo::Client (class)">Tombo::Client</a></span></p>
|
|
109
|
+
<p class="children"><span class='object_link'><a href="../Hotaru/Client.html" title="Mushikago::Hotaru::Client (class)">Mushikago::Hotaru::Client</a></span>, <span class='object_link'><a href="../Mitsubachi/Client.html" title="Mushikago::Mitsubachi::Client (class)">Mitsubachi::Client</a></span>, <span class='object_link'><a href="../Tombo/Client.html" title="Mushikago::Tombo::Client (class)">Tombo::Client</a></span></p>
|
|
106
110
|
</div>
|
|
107
111
|
|
|
108
112
|
|
|
@@ -128,7 +132,10 @@
|
|
|
128
132
|
|
|
129
133
|
|
|
130
134
|
|
|
131
|
-
<span class="summary_desc"><div class='inline'><p>
|
|
135
|
+
<span class="summary_desc"><div class='inline'><p>
|
|
136
|
+
Api_key.
|
|
137
|
+
</p>
|
|
138
|
+
</div></span>
|
|
132
139
|
|
|
133
140
|
</li>
|
|
134
141
|
|
|
@@ -152,7 +159,10 @@
|
|
|
152
159
|
|
|
153
160
|
|
|
154
161
|
|
|
155
|
-
<span class="summary_desc"><div class='inline'><p>
|
|
162
|
+
<span class="summary_desc"><div class='inline'><p>
|
|
163
|
+
Signer.
|
|
164
|
+
</p>
|
|
165
|
+
</div></span>
|
|
156
166
|
|
|
157
167
|
</li>
|
|
158
168
|
|
|
@@ -188,7 +198,10 @@
|
|
|
188
198
|
|
|
189
199
|
|
|
190
200
|
|
|
191
|
-
<span class="summary_desc"><div class='inline'><p>
|
|
201
|
+
<span class="summary_desc"><div class='inline'><p>
|
|
202
|
+
A new instance of Client.
|
|
203
|
+
</p>
|
|
204
|
+
</div></span>
|
|
192
205
|
|
|
193
206
|
</li>
|
|
194
207
|
|
|
@@ -209,7 +222,10 @@
|
|
|
209
222
|
|
|
210
223
|
|
|
211
224
|
|
|
212
|
-
<span class="summary_desc"><div class='inline'><p>
|
|
225
|
+
<span class="summary_desc"><div class='inline'><p>
|
|
226
|
+
Response.
|
|
227
|
+
</p>
|
|
228
|
+
</div></span>
|
|
213
229
|
|
|
214
230
|
</li>
|
|
215
231
|
|
|
@@ -229,7 +245,10 @@
|
|
|
229
245
|
|
|
230
246
|
</p><div class="docstring">
|
|
231
247
|
<div class="discussion">
|
|
232
|
-
<p>
|
|
248
|
+
<p>
|
|
249
|
+
A new instance of Client
|
|
250
|
+
</p>
|
|
251
|
+
|
|
233
252
|
|
|
234
253
|
</div>
|
|
235
254
|
</div>
|
|
@@ -264,8 +283,11 @@
|
|
|
264
283
|
<span class="default">
|
|
265
284
|
|
|
266
285
|
</span>
|
|
267
|
-
— <div class='inline'><p>
|
|
268
|
-
|
|
286
|
+
— <div class='inline'><p>
|
|
287
|
+
value) APIキー
|
|
288
|
+
</p>
|
|
289
|
+
</div>
|
|
290
|
+
</li>
|
|
269
291
|
|
|
270
292
|
<li>
|
|
271
293
|
<span class="name">:secret_key(Configured</span>
|
|
@@ -273,25 +295,34 @@
|
|
|
273
295
|
<span class="default">
|
|
274
296
|
|
|
275
297
|
</span>
|
|
276
|
-
— <div class='inline'><p>
|
|
277
|
-
|
|
298
|
+
— <div class='inline'><p>
|
|
299
|
+
value) 秘密鍵
|
|
300
|
+
</p>
|
|
301
|
+
</div>
|
|
302
|
+
</li>
|
|
278
303
|
|
|
279
304
|
</ul>
|
|
280
305
|
|
|
281
306
|
|
|
307
|
+
|
|
282
308
|
</div><table class="source_code">
|
|
283
309
|
<tr>
|
|
284
310
|
<td>
|
|
285
311
|
<pre class="lines">
|
|
286
312
|
|
|
287
313
|
|
|
288
|
-
|
|
314
|
+
17
|
|
315
|
+
18
|
|
316
|
+
19
|
|
317
|
+
20</pre>
|
|
289
318
|
</td>
|
|
290
319
|
<td>
|
|
291
|
-
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line
|
|
320
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line 17</span>
|
|
292
321
|
|
|
293
|
-
<span class='
|
|
294
|
-
</
|
|
322
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span>
|
|
323
|
+
<span class='ivar'>@api_key</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:api_key</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>Mushikago</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_api_key'>api_key</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
|
324
|
+
<span class='ivar'>@signer</span> <span class='op'>=</span> <span class='const'>Mushikago</span><span class='op'>::</span><span class='const'>Auth</span><span class='op'>::</span><span class='const'>Signer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:secret_key</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>Mushikago</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_secret_key'>secret_key</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
|
325
|
+
<span class='kw'>end</span></pre>
|
|
295
326
|
</td>
|
|
296
327
|
</tr>
|
|
297
328
|
</table>
|
|
@@ -314,12 +345,16 @@
|
|
|
314
345
|
|
|
315
346
|
</p><div class="docstring">
|
|
316
347
|
<div class="discussion">
|
|
317
|
-
<p>
|
|
348
|
+
<p>
|
|
349
|
+
Api_key
|
|
350
|
+
</p>
|
|
351
|
+
|
|
318
352
|
|
|
319
353
|
</div>
|
|
320
354
|
</div>
|
|
321
355
|
<div class="tags">
|
|
322
|
-
|
|
356
|
+
|
|
357
|
+
<h3>Returns:</h3>
|
|
323
358
|
<ul class="return">
|
|
324
359
|
|
|
325
360
|
<li>
|
|
@@ -330,7 +365,10 @@
|
|
|
330
365
|
|
|
331
366
|
|
|
332
367
|
—
|
|
333
|
-
<div class='inline'><p>
|
|
368
|
+
<div class='inline'><p>
|
|
369
|
+
api_key
|
|
370
|
+
</p>
|
|
371
|
+
</div>
|
|
334
372
|
|
|
335
373
|
</li>
|
|
336
374
|
|
|
@@ -342,17 +380,16 @@
|
|
|
342
380
|
<pre class="lines">
|
|
343
381
|
|
|
344
382
|
|
|
345
|
-
8
|
|
346
383
|
9
|
|
347
|
-
10
|
|
384
|
+
10
|
|
385
|
+
11</pre>
|
|
348
386
|
</td>
|
|
349
387
|
<td>
|
|
350
|
-
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line
|
|
388
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line 9</span>
|
|
351
389
|
|
|
352
|
-
<span class='
|
|
353
|
-
<span class='
|
|
354
|
-
<span class='
|
|
355
|
-
</pre>
|
|
390
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_api_key'>api_key</span>
|
|
391
|
+
<span class='ivar'>@api_key</span>
|
|
392
|
+
<span class='kw'>end</span></pre>
|
|
356
393
|
</td>
|
|
357
394
|
</tr>
|
|
358
395
|
</table>
|
|
@@ -370,12 +407,16 @@
|
|
|
370
407
|
|
|
371
408
|
</p><div class="docstring">
|
|
372
409
|
<div class="discussion">
|
|
373
|
-
<p>
|
|
410
|
+
<p>
|
|
411
|
+
Signer
|
|
412
|
+
</p>
|
|
413
|
+
|
|
374
414
|
|
|
375
415
|
</div>
|
|
376
416
|
</div>
|
|
377
417
|
<div class="tags">
|
|
378
|
-
|
|
418
|
+
|
|
419
|
+
<h3>Returns:</h3>
|
|
379
420
|
<ul class="return">
|
|
380
421
|
|
|
381
422
|
<li>
|
|
@@ -386,7 +427,10 @@
|
|
|
386
427
|
|
|
387
428
|
|
|
388
429
|
—
|
|
389
|
-
<div class='inline'><p>
|
|
430
|
+
<div class='inline'><p>
|
|
431
|
+
signer
|
|
432
|
+
</p>
|
|
433
|
+
</div>
|
|
390
434
|
|
|
391
435
|
</li>
|
|
392
436
|
|
|
@@ -398,17 +442,16 @@
|
|
|
398
442
|
<pre class="lines">
|
|
399
443
|
|
|
400
444
|
|
|
401
|
-
11
|
|
402
445
|
12
|
|
403
|
-
13
|
|
446
|
+
13
|
|
447
|
+
14</pre>
|
|
404
448
|
</td>
|
|
405
449
|
<td>
|
|
406
|
-
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line
|
|
450
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line 12</span>
|
|
407
451
|
|
|
408
|
-
<span class='
|
|
409
|
-
<span class='
|
|
410
|
-
<span class='
|
|
411
|
-
</pre>
|
|
452
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_signer'>signer</span>
|
|
453
|
+
<span class='ivar'>@signer</span>
|
|
454
|
+
<span class='kw'>end</span></pre>
|
|
412
455
|
</td>
|
|
413
456
|
</tr>
|
|
414
457
|
</table>
|
|
@@ -430,7 +473,10 @@
|
|
|
430
473
|
|
|
431
474
|
</p><div class="docstring">
|
|
432
475
|
<div class="discussion">
|
|
433
|
-
<p>
|
|
476
|
+
<p>
|
|
477
|
+
Response
|
|
478
|
+
</p>
|
|
479
|
+
|
|
434
480
|
|
|
435
481
|
</div>
|
|
436
482
|
</div>
|
|
@@ -450,6 +496,7 @@
|
|
|
450
496
|
</li>
|
|
451
497
|
|
|
452
498
|
</ul>
|
|
499
|
+
|
|
453
500
|
<h3>Returns:</h3>
|
|
454
501
|
<ul class="return">
|
|
455
502
|
|
|
@@ -461,7 +508,10 @@
|
|
|
461
508
|
|
|
462
509
|
|
|
463
510
|
—
|
|
464
|
-
<div class='inline'><p>
|
|
511
|
+
<div class='inline'><p>
|
|
512
|
+
response
|
|
513
|
+
</p>
|
|
514
|
+
</div>
|
|
465
515
|
|
|
466
516
|
</li>
|
|
467
517
|
|
|
@@ -473,7 +523,6 @@
|
|
|
473
523
|
<pre class="lines">
|
|
474
524
|
|
|
475
525
|
|
|
476
|
-
23
|
|
477
526
|
24
|
|
478
527
|
25
|
|
479
528
|
26
|
|
@@ -485,25 +534,25 @@
|
|
|
485
534
|
32
|
|
486
535
|
33
|
|
487
536
|
34
|
|
488
|
-
35
|
|
537
|
+
35
|
|
538
|
+
36</pre>
|
|
489
539
|
</td>
|
|
490
540
|
<td>
|
|
491
|
-
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line
|
|
492
|
-
|
|
493
|
-
<span class='
|
|
494
|
-
<span class='comment
|
|
495
|
-
<span class='
|
|
496
|
-
<span class='
|
|
497
|
-
<span class='
|
|
498
|
-
|
|
499
|
-
<span class='comment
|
|
500
|
-
<span class='
|
|
501
|
-
<span class='
|
|
502
|
-
<span class='
|
|
503
|
-
<span class='
|
|
504
|
-
<span class='
|
|
505
|
-
<span class='
|
|
506
|
-
</pre>
|
|
541
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line 24</span>
|
|
542
|
+
|
|
543
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_send_request'>send_request</span> <span class='id identifier rubyid_request'>request</span>
|
|
544
|
+
<span class='comment'># add authorization
|
|
545
|
+
</span> <span class='id identifier rubyid_request'>request</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>api_key</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_api_key'>api_key</span>
|
|
546
|
+
<span class='id identifier rubyid_request'>request</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>timestamp</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='period'>.</span><span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%Y-%m-%dT%H:%M:%SZ</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
547
|
+
<span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_add_signature!'>add_signature!</span><span class='lparen'>(</span><span class='id identifier rubyid_signer'>signer</span><span class='rparen'>)</span>
|
|
548
|
+
|
|
549
|
+
<span class='comment'># send request
|
|
550
|
+
</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_http'>http</span><span class='op'>|</span>
|
|
551
|
+
<span class='id identifier rubyid_http_request'>http_request</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_to_http_request'>to_http_request</span>
|
|
552
|
+
<span class='id identifier rubyid_http_response'>http_response</span> <span class='op'>=</span> <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_http_request'>http_request</span><span class='rparen'>)</span>
|
|
553
|
+
<span class='kw'>return</span> <span class='const'>Mushikago</span><span class='op'>::</span><span class='const'>Http</span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</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_http_response'>http_response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
554
|
+
<span class='kw'>end</span>
|
|
555
|
+
<span class='kw'>end</span></pre>
|
|
507
556
|
</td>
|
|
508
557
|
</tr>
|
|
509
558
|
</table>
|
|
@@ -514,9 +563,9 @@
|
|
|
514
563
|
</div>
|
|
515
564
|
|
|
516
565
|
<div id="footer">
|
|
517
|
-
Generated on Thu
|
|
566
|
+
Generated on Thu Jan 26 17:19:02 2012 by
|
|
518
567
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
519
|
-
0.7.
|
|
568
|
+
0.7.4 (ruby-1.9.2).
|
|
520
569
|
</div>
|
|
521
570
|
|
|
522
571
|
</body>
|