mushikago-sdk 0.4.3 → 2.0.0
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 +3 -1
- data/Rakefile +1 -0
- data/lib/mushikago/hanamgri/client.rb +264 -0
- data/lib/mushikago/hanamgri/create_domain_request.rb +25 -0
- data/lib/mushikago/hanamgri/delete_dictionary_request.rb +14 -0
- data/lib/mushikago/hanamgri/delete_domain_request.rb +16 -0
- data/lib/mushikago/hanamgri/delete_knowledge_request.rb +15 -0
- data/lib/mushikago/hanamgri/field.rb +20 -0
- data/lib/mushikago/hanamgri/get_analysis_request.rb +16 -0
- data/lib/mushikago/hanamgri/get_information_request.rb +14 -0
- data/lib/mushikago/hanamgri/get_queue_size_request.rb +14 -0
- data/lib/mushikago/hanamgri/list_analyses_request.rb +24 -0
- data/lib/mushikago/hanamgri/list_dictionaries_request.rb +17 -0
- data/lib/mushikago/hanamgri/list_domains_request.rb +20 -0
- data/lib/mushikago/hanamgri/list_knowledges_request.rb +20 -0
- data/lib/mushikago/hanamgri/request_analysis_request.rb +21 -0
- data/lib/mushikago/hanamgri/save_dictionary_request.rb +18 -0
- data/lib/mushikago/hanamgri/save_knowledge_request.rb +19 -0
- data/lib/mushikago/hanamgri/schema.rb +28 -0
- data/lib/mushikago/hanamgri/search_schema_request.rb +19 -0
- data/lib/mushikago/hanamgri/train_request.rb +21 -0
- data/lib/mushikago/hanamgri/training_data.rb +27 -0
- data/lib/mushikago/hanamgri/update_domain_request.rb +18 -0
- data/lib/mushikago/hanamgri.rb +30 -0
- data/lib/mushikago/version.rb +1 -1
- data/lib/mushikago.rb +1 -0
- data/spec/mushikago/hanamgri/client_spec.rb +61 -0
- data/spec/mushikago/hanamgri/create_domain_spec.rb +34 -0
- data/spec/mushikago/hanamgri/delete_dictionary_spec.rb +11 -0
- data/spec/mushikago/hanamgri/delete_domain_spec.rb +12 -0
- data/spec/mushikago/hanamgri/delete_knowledge_request_spec.rb +11 -0
- data/spec/mushikago/hanamgri/field_spec.rb +44 -0
- data/spec/mushikago/hanamgri/get_analysis_request_spec.rb +12 -0
- data/spec/mushikago/hanamgri/get_information_request_spec.rb +14 -0
- data/spec/mushikago/hanamgri/get_queue_size_request_spec.rb +10 -0
- data/spec/mushikago/hanamgri/list_analyses_spec.rb +25 -0
- data/spec/mushikago/hanamgri/list_dictionaries_spec.rb +19 -0
- data/spec/mushikago/hanamgri/list_domains_spec.rb +19 -0
- data/spec/mushikago/hanamgri/list_knowledges_request_spec.rb +20 -0
- data/spec/mushikago/hanamgri/request_analysis_request_spec.rb +21 -0
- data/spec/mushikago/hanamgri/save_dictionary_request_spec.rb +22 -0
- data/spec/mushikago/hanamgri/save_knowledge_request_spec.rb +22 -0
- data/spec/mushikago/hanamgri/schema_spec.rb +53 -0
- data/spec/mushikago/hanamgri/search_schema_request_spec.rb +22 -0
- data/spec/mushikago/hanamgri/train_spec.rb +31 -0
- data/spec/mushikago/hanamgri/update_domain_spec.rb +22 -0
- metadata +95 -109
- data/doc/Mushikago/Auth/Signature.html +0 -312
- data/doc/Mushikago/Auth/Signer.html +0 -465
- data/doc/Mushikago/Auth.html +0 -122
- data/doc/Mushikago/Config.html +0 -285
- data/doc/Mushikago/Hotaru/ClassifierJudgeRequest.html +0 -307
- data/doc/Mushikago/Hotaru/Client.html +0 -4174
- data/doc/Mushikago/Hotaru/CollocationCreateRequest.html +0 -375
- data/doc/Mushikago/Hotaru/CollocationDeleteRequest.html +0 -307
- data/doc/Mushikago/Hotaru/CollocationDownloadRequest.html +0 -307
- data/doc/Mushikago/Hotaru/CollocationGetRequest.html +0 -309
- data/doc/Mushikago/Hotaru/CollocationListRequest.html +0 -313
- data/doc/Mushikago/Hotaru/CollocationWordlistRequest.html +0 -313
- data/doc/Mushikago/Hotaru/DictionaryDeleteRequest.html +0 -305
- data/doc/Mushikago/Hotaru/DictionaryListRequest.html +0 -309
- data/doc/Mushikago/Hotaru/DictionaryPutRequest.html +0 -342
- data/doc/Mushikago/Hotaru/DomainCreateRequest.html +0 -313
- data/doc/Mushikago/Hotaru/DomainDeleteRequest.html +0 -305
- data/doc/Mushikago/Hotaru/DomainInfoRequest.html +0 -307
- data/doc/Mushikago/Hotaru/DomainListRequest.html +0 -311
- data/doc/Mushikago/Hotaru/TagDeleteRequest.html +0 -307
- data/doc/Mushikago/Hotaru/TagListRequest.html +0 -307
- data/doc/Mushikago/Hotaru/TagPutRequest.html +0 -307
- data/doc/Mushikago/Hotaru/TextDeleteRequest.html +0 -309
- data/doc/Mushikago/Hotaru/TextGetRequest.html +0 -307
- data/doc/Mushikago/Hotaru/TextListRequest.html +0 -315
- data/doc/Mushikago/Hotaru/TextPutRequest.html +0 -311
- data/doc/Mushikago/Hotaru/TextTagsetRequest.html +0 -311
- data/doc/Mushikago/Hotaru/WordGetRequest.html +0 -307
- data/doc/Mushikago/Hotaru/WordListRequest.html +0 -311
- data/doc/Mushikago/Hotaru.html +0 -120
- data/doc/Mushikago/Http/Client.html +0 -673
- data/doc/Mushikago/Http/DeleteRequest.html +0 -240
- data/doc/Mushikago/Http/GetRequest.html +0 -240
- data/doc/Mushikago/Http/MultipartPostRequest.html +0 -265
- data/doc/Mushikago/Http/MultipartPutRequest.html +0 -265
- data/doc/Mushikago/Http/MultipartRequest.html +0 -362
- data/doc/Mushikago/Http/PostRequest.html +0 -240
- data/doc/Mushikago/Http/PutRequest.html +0 -240
- data/doc/Mushikago/Http/Request.html +0 -1223
- data/doc/Mushikago/Http/Response.html +0 -840
- data/doc/Mushikago/Http.html +0 -120
- data/doc/Mushikago/Mitsubachi/Client.html +0 -3232
- data/doc/Mushikago/Mitsubachi/HttpFetchRequest.html +0 -319
- data/doc/Mushikago/Mitsubachi/HttpPushRequest.html +0 -321
- data/doc/Mushikago/Mitsubachi/Project.html +0 -742
- data/doc/Mushikago/Mitsubachi/ProjectCreateRequest.html +0 -317
- data/doc/Mushikago/Mitsubachi/ProjectDeleteRequest.html +0 -307
- data/doc/Mushikago/Mitsubachi/ProjectDiscontinueRequest.html +0 -305
- data/doc/Mushikago/Mitsubachi/ProjectInfoRequest.html +0 -307
- data/doc/Mushikago/Mitsubachi/ProjectListRequest.html +0 -309
- data/doc/Mushikago/Mitsubachi/ProjectQueuesRequest.html +0 -305
- data/doc/Mushikago/Mitsubachi/ProjectUpdateRequest.html +0 -315
- data/doc/Mushikago/Mitsubachi/Projects.html +0 -474
- data/doc/Mushikago/Mitsubachi/Resource.html +0 -569
- data/doc/Mushikago/Mitsubachi/ResourceDeleteRequest.html +0 -307
- data/doc/Mushikago/Mitsubachi/ResourceGetRequest.html +0 -307
- data/doc/Mushikago/Mitsubachi/ResourceListRequest.html +0 -311
- data/doc/Mushikago/Mitsubachi/ResourceStoreRequest.html +0 -346
- data/doc/Mushikago/Mitsubachi/Resources.html +0 -546
- data/doc/Mushikago/Mitsubachi/Script.html +0 -569
- data/doc/Mushikago/Mitsubachi/ScriptDeleteRequest.html +0 -307
- data/doc/Mushikago/Mitsubachi/ScriptDeployRequest.html +0 -342
- data/doc/Mushikago/Mitsubachi/ScriptGetRequest.html +0 -307
- data/doc/Mushikago/Mitsubachi/ScriptListRequest.html +0 -311
- data/doc/Mushikago/Mitsubachi/Scripts.html +0 -546
- data/doc/Mushikago/Mitsubachi.html +0 -120
- data/doc/Mushikago/Tombo/CaptureRequest.html +0 -454
- data/doc/Mushikago/Tombo/CapturesRequest.html +0 -417
- data/doc/Mushikago/Tombo/Client.html +0 -830
- data/doc/Mushikago/Tombo/DeleteRequest.html +0 -357
- data/doc/Mushikago/Tombo/InfoRequest.html +0 -338
- data/doc/Mushikago/Tombo.html +0 -120
- data/doc/Mushikago.html +0 -246
- data/doc/_index.html +0 -701
- data/doc/class_list.html +0 -47
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -55
- data/doc/css/style.css +0 -322
- data/doc/file.README.html +0 -250
- data/doc/file_list.html +0 -49
- data/doc/frames.html +0 -13
- data/doc/index.html +0 -250
- data/doc/js/app.js +0 -205
- data/doc/js/full_list.js +0 -167
- data/doc/js/jquery.js +0 -16
- data/doc/method_list.html +0 -1806
- data/doc/top-level-namespace.html +0 -103
@@ -1,362 +0,0 @@
|
|
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::Http::MultipartRequest
|
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 (M)</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="../Http.html" title="Mushikago::Http (module)">Http</a></span></span>
|
38
|
-
»
|
39
|
-
<span class="title">MultipartRequest</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::Http::MultipartRequest
|
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="Request.html" title="Mushikago::Http::Request (class)">Request</a></span></span>
|
70
|
-
|
71
|
-
<ul class="fullTree">
|
72
|
-
<li>Object</li>
|
73
|
-
|
74
|
-
<li class="next"><span class='object_link'><a href="Request.html" title="Mushikago::Http::Request (class)">Request</a></span></li>
|
75
|
-
|
76
|
-
<li class="next">Mushikago::Http::MultipartRequest</li>
|
77
|
-
|
78
|
-
</ul>
|
79
|
-
<a href="#" class="inheritanceTree">show all</a>
|
80
|
-
|
81
|
-
</dd>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
<dt class="r2 last">Defined in:</dt>
|
92
|
-
<dd class="r2 last">lib/mushikago/http/multipart.rb</dd>
|
93
|
-
|
94
|
-
</dl>
|
95
|
-
<div class="clear"></div>
|
96
|
-
|
97
|
-
<div id="subclasses">
|
98
|
-
<h2>Direct Known Subclasses</h2>
|
99
|
-
<p class="children"><span class='object_link'><a href="MultipartPostRequest.html" title="Mushikago::Http::MultipartPostRequest (class)">MultipartPostRequest</a></span>, <span class='object_link'><a href="MultipartPutRequest.html" title="Mushikago::Http::MultipartPutRequest (class)">MultipartPutRequest</a></span></p>
|
100
|
-
</div>
|
101
|
-
|
102
|
-
<h2>Constant Summary</h2>
|
103
|
-
|
104
|
-
<dl class="constants">
|
105
|
-
|
106
|
-
<dt id="CR-constant" class="">CR =
|
107
|
-
|
108
|
-
</dt>
|
109
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\015</span><span class='tstring_end'>"</span></span></pre></dd>
|
110
|
-
|
111
|
-
<dt id="LF-constant" class="">LF =
|
112
|
-
|
113
|
-
</dt>
|
114
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\012</span><span class='tstring_end'>"</span></span></pre></dd>
|
115
|
-
|
116
|
-
<dt id="EOL-constant" class="">EOL =
|
117
|
-
|
118
|
-
</dt>
|
119
|
-
<dd><pre class="code"><span class='const'>CR</span><span class='op'>+</span><span class='const'>LF</span></pre></dd>
|
120
|
-
|
121
|
-
</dl>
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
<h2>Instance Attribute Summary</h2>
|
135
|
-
|
136
|
-
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Request.html" title="Mushikago::Http::Request (class)">Request</a></span></h3>
|
137
|
-
<p class="inherited"><span class='object_link'><a href="Request.html#headers-instance_method" title="Mushikago::Http::Request#headers (method)">headers</a></span>, <span class='object_link'><a href="Request.html#host-instance_method" title="Mushikago::Http::Request#host (method)">host</a></span>, <span class='object_link'><a href="Request.html#params-instance_method" title="Mushikago::Http::Request#params (method)">params</a></span>, <span class='object_link'><a href="Request.html#path-instance_method" title="Mushikago::Http::Request#path (method)">path</a></span>, <span class='object_link'><a href="Request.html#port-instance_method" title="Mushikago::Http::Request#port (method)">port</a></span></p>
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
<h2>
|
142
|
-
Instance Method Summary
|
143
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
144
|
-
</h2>
|
145
|
-
|
146
|
-
<ul class="summary">
|
147
|
-
|
148
|
-
<li class="public ">
|
149
|
-
<span class="summary_signature">
|
150
|
-
|
151
|
-
<a href="#multipart_body-instance_method" title="#multipart_body (instance method)">- (Object) <strong>multipart_body</strong>(boundary = 'boundary') </a>
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
</span>
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
165
|
-
|
166
|
-
</li>
|
167
|
-
|
168
|
-
|
169
|
-
<li class="public ">
|
170
|
-
<span class="summary_signature">
|
171
|
-
|
172
|
-
<a href="#to_http_request-instance_method" title="#to_http_request (instance method)">- (Object) <strong>to_http_request</strong> </a>
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
</span>
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
186
|
-
|
187
|
-
</li>
|
188
|
-
|
189
|
-
|
190
|
-
</ul>
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Request.html" title="Mushikago::Http::Request (class)">Request</a></span></h3>
|
202
|
-
<p class="inherited"><span class='object_link'><a href="Request.html#%5B%5D-instance_method" title="Mushikago::Http::Request#[] (method)">#[]</a></span>, <span class='object_link'><a href="Request.html#%5B%5D%3D-instance_method" title="Mushikago::Http::Request#[]= (method)">#[]=</a></span>, <span class='object_link'><a href="Request.html#add_param-class_method" title="Mushikago::Http::Request.add_param (method)">add_param</a></span>, <span class='object_link'><a href="Request.html#initialize-instance_method" title="Mushikago::Http::Request#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Request.html#url_encoded_params-instance_method" title="Mushikago::Http::Request#url_encoded_params (method)">#url_encoded_params</a></span></p>
|
203
|
-
<div id="constructor_details" class="method_details_list">
|
204
|
-
<h2>Constructor Details</h2>
|
205
|
-
|
206
|
-
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Request.html#initialize-instance_method" title="Mushikago::Http::Request#initialize (method)">Mushikago::Http::Request</a></span></p>
|
207
|
-
|
208
|
-
</div>
|
209
|
-
|
210
|
-
|
211
|
-
<div id="instance_method_details" class="method_details_list">
|
212
|
-
<h2>Instance Method Details</h2>
|
213
|
-
|
214
|
-
|
215
|
-
<div class="method_details first">
|
216
|
-
<p class="signature first" id="multipart_body-instance_method">
|
217
|
-
|
218
|
-
- (<tt>Object</tt>) <strong>multipart_body</strong>(boundary = 'boundary')
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
</p><table class="source_code">
|
223
|
-
<tr>
|
224
|
-
<td>
|
225
|
-
<pre class="lines">
|
226
|
-
|
227
|
-
|
228
|
-
22
|
229
|
-
23
|
230
|
-
24
|
231
|
-
25
|
232
|
-
26
|
233
|
-
27
|
234
|
-
28
|
235
|
-
29
|
236
|
-
30
|
237
|
-
31
|
238
|
-
32
|
239
|
-
33
|
240
|
-
34
|
241
|
-
35
|
242
|
-
36
|
243
|
-
37
|
244
|
-
38
|
245
|
-
39
|
246
|
-
40
|
247
|
-
41
|
248
|
-
42
|
249
|
-
43
|
250
|
-
44
|
251
|
-
45
|
252
|
-
46
|
253
|
-
47
|
254
|
-
48
|
255
|
-
49
|
256
|
-
50
|
257
|
-
51
|
258
|
-
52
|
259
|
-
53
|
260
|
-
54
|
261
|
-
55
|
262
|
-
56</pre>
|
263
|
-
</td>
|
264
|
-
<td>
|
265
|
-
<pre class="code"><span class="info file"># File 'lib/mushikago/http/multipart.rb', line 22</span>
|
266
|
-
|
267
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_multipart_body'>multipart_body</span> <span class='id identifier rubyid_boundary'>boundary</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>boundary</span><span class='tstring_end'>'</span></span>
|
268
|
-
<span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
269
|
-
|
270
|
-
<span class='id identifier rubyid_files'>files</span><span class='comma'>,</span> <span class='id identifier rubyid_parameters'>parameters</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_partition'>partition</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>File</span><span class='rparen'>)</span><span class='rbrace'>}</span>
|
271
|
-
<span class='id identifier rubyid_parameters'>parameters</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
|
272
|
-
<span class='id identifier rubyid_content'>content</span> <span class='op'><<</span> <span class='lbracket'>[</span>
|
273
|
-
<span class='tstring'><span class='tstring_beg'>%Q|</span><span class='tstring_content'>--</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_boundary'>boundary</span><span class='rbrace'>}</span><span class='tstring_end'>|</span></span><span class='comma'>,</span>
|
274
|
-
<span class='tstring'><span class='tstring_beg'>%Q|</span><span class='tstring_content'>Content-Disposition: form-data; name="</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_k'>k</span><span class='rbrace'>}</span><span class='tstring_content'>"</span><span class='tstring_end'>|</span></span><span class='comma'>,</span>
|
275
|
-
<span class='tstring'><span class='tstring_beg'>%Q|</span><span class='tstring_end'>|</span></span><span class='comma'>,</span>
|
276
|
-
<span class='tstring'><span class='tstring_beg'>%Q|</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_v'>v</span><span class='rbrace'>}</span><span class='tstring_end'>|</span></span>
|
277
|
-
<span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='const'>EOL</span><span class='rparen'>)</span>
|
278
|
-
<span class='id identifier rubyid_content'>content</span> <span class='op'><<</span> <span class='const'>EOL</span>
|
279
|
-
<span class='kw'>end</span>
|
280
|
-
|
281
|
-
<span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
|
282
|
-
<span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_rewind'>rewind</span>
|
283
|
-
<span class='id identifier rubyid_content_type'>content_type</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
284
|
-
<span class='kw'>begin</span>
|
285
|
-
<span class='id identifier rubyid_content_type'>content_type</span> <span class='op'>=</span> <span class='const'>MIME</span><span class='op'>::</span><span class='const'>Types</span><span class='period'>.</span><span class='id identifier rubyid_of'>of</span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
286
|
-
<span class='kw'>rescue</span> <span class='const'>NameError</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
287
|
-
<span class='kw'>ensure</span>
|
288
|
-
<span class='id identifier rubyid_content_type'>content_type</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>application/octet-stream</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_content_type'>content_type</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
289
|
-
<span class='kw'>end</span>
|
290
|
-
<span class='id identifier rubyid_content'>content</span> <span class='op'><<</span> <span class='lbracket'>[</span>
|
291
|
-
<span class='tstring'><span class='tstring_beg'>%Q|</span><span class='tstring_content'>--</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_boundary'>boundary</span><span class='rbrace'>}</span><span class='tstring_end'>|</span></span><span class='comma'>,</span>
|
292
|
-
<span class='tstring'><span class='tstring_beg'>%Q|</span><span class='tstring_content'>Content-Disposition: form-data; name="</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_k'>k</span><span class='rbrace'>}</span><span class='tstring_content'>"; filename="</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='op'>::</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>"</span><span class='tstring_end'>|</span></span><span class='comma'>,</span>
|
293
|
-
<span class='tstring'><span class='tstring_beg'>%Q|</span><span class='tstring_content'>Content-Type: "</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_content_type'>content_type</span><span class='rbrace'>}</span><span class='tstring_content'>"</span><span class='tstring_end'>|</span></span><span class='comma'>,</span>
|
294
|
-
<span class='tstring'><span class='tstring_beg'>%Q|</span><span class='tstring_end'>|</span></span><span class='comma'>,</span>
|
295
|
-
<span class='tstring'><span class='tstring_beg'>%Q|</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='rbrace'>}</span><span class='tstring_end'>|</span></span>
|
296
|
-
<span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='const'>EOL</span><span class='rparen'>)</span>
|
297
|
-
<span class='kw'>end</span>
|
298
|
-
<span class='id identifier rubyid_content'>content</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>%Q|</span><span class='tstring_content'>--</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_boundary'>boundary</span><span class='rbrace'>}</span><span class='tstring_content'>--</span><span class='tstring_end'>|</span></span>
|
299
|
-
<span class='id identifier rubyid_content'>content</span> <span class='op'><<</span> <span class='const'>EOL</span>
|
300
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_content'>content</span>
|
301
|
-
<span class='kw'>end</span></pre>
|
302
|
-
</td>
|
303
|
-
</tr>
|
304
|
-
</table>
|
305
|
-
</div>
|
306
|
-
|
307
|
-
<div class="method_details ">
|
308
|
-
<p class="signature " id="to_http_request-instance_method">
|
309
|
-
|
310
|
-
- (<tt>Object</tt>) <strong>to_http_request</strong>
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
</p><table class="source_code">
|
315
|
-
<tr>
|
316
|
-
<td>
|
317
|
-
<pre class="lines">
|
318
|
-
|
319
|
-
|
320
|
-
10
|
321
|
-
11
|
322
|
-
12
|
323
|
-
13
|
324
|
-
14
|
325
|
-
15
|
326
|
-
16
|
327
|
-
17
|
328
|
-
18
|
329
|
-
19
|
330
|
-
20</pre>
|
331
|
-
</td>
|
332
|
-
<td>
|
333
|
-
<pre class="code"><span class="info file"># File 'lib/mushikago/http/multipart.rb', line 10</span>
|
334
|
-
|
335
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_to_http_request'>to_http_request</span>
|
336
|
-
<span class='id identifier rubyid_http_request'>http_request</span> <span class='op'>=</span> <span class='id identifier rubyid_new_http_request'>new_http_request</span>
|
337
|
-
<span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
|
338
|
-
<span class='id identifier rubyid_http_request'>http_request</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
|
339
|
-
<span class='kw'>end</span>
|
340
|
-
<span class='id identifier rubyid_boundary'>boundary</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>----------------38117</span><span class='tstring_end'>'</span></span>
|
341
|
-
<span class='id identifier rubyid_http_request'>http_request</span><span class='period'>.</span><span class='id identifier rubyid_set_content_type'>set_content_type</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>multipart/form-data; boundary=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_boundary'>boundary</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
342
|
-
<span class='id identifier rubyid_http_request'>http_request</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_multipart_body'>multipart_body</span><span class='lparen'>(</span><span class='id identifier rubyid_boundary'>boundary</span><span class='rparen'>)</span>
|
343
|
-
<span class='id identifier rubyid_http_request'>http_request</span><span class='period'>.</span><span class='id identifier rubyid_content_length'>content_length</span> <span class='op'>=</span> <span class='id identifier rubyid_http_request'>http_request</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
|
344
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_http_request'>http_request</span>
|
345
|
-
<span class='kw'>end</span></pre>
|
346
|
-
</td>
|
347
|
-
</tr>
|
348
|
-
</table>
|
349
|
-
</div>
|
350
|
-
|
351
|
-
</div>
|
352
|
-
|
353
|
-
</div>
|
354
|
-
|
355
|
-
<div id="footer">
|
356
|
-
Generated on Thu Apr 26 10:56:48 2012 by
|
357
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
358
|
-
0.7.4 (ruby-1.9.2).
|
359
|
-
</div>
|
360
|
-
|
361
|
-
</body>
|
362
|
-
</html>
|
@@ -1,240 +0,0 @@
|
|
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::Http::PostRequest
|
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 (P)</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="../Http.html" title="Mushikago::Http (module)">Http</a></span></span>
|
38
|
-
»
|
39
|
-
<span class="title">PostRequest</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::Http::PostRequest
|
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="Request.html" title="Mushikago::Http::Request (class)">Request</a></span></span>
|
70
|
-
|
71
|
-
<ul class="fullTree">
|
72
|
-
<li>Object</li>
|
73
|
-
|
74
|
-
<li class="next"><span class='object_link'><a href="Request.html" title="Mushikago::Http::Request (class)">Request</a></span></li>
|
75
|
-
|
76
|
-
<li class="next">Mushikago::Http::PostRequest</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/http/request/post.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
|
-
MushikagoのPOSTリクエストを表す抽象クラス
|
105
|
-
</p>
|
106
|
-
|
107
|
-
|
108
|
-
</div>
|
109
|
-
</div>
|
110
|
-
<div class="tags">
|
111
|
-
|
112
|
-
|
113
|
-
</div><div id="subclasses">
|
114
|
-
<h2>Direct Known Subclasses</h2>
|
115
|
-
<p class="children"><span class='object_link'><a href="../Hotaru/ClassifierJudgeRequest.html" title="Mushikago::Hotaru::ClassifierJudgeRequest (class)">Mushikago::Hotaru::ClassifierJudgeRequest</a></span>, <span class='object_link'><a href="../Hotaru/CollocationCreateRequest.html" title="Mushikago::Hotaru::CollocationCreateRequest (class)">Mushikago::Hotaru::CollocationCreateRequest</a></span>, <span class='object_link'><a href="../Hotaru/DomainCreateRequest.html" title="Mushikago::Hotaru::DomainCreateRequest (class)">Mushikago::Hotaru::DomainCreateRequest</a></span>, <span class='object_link'><a href="../Hotaru/TextTagsetRequest.html" title="Mushikago::Hotaru::TextTagsetRequest (class)">Mushikago::Hotaru::TextTagsetRequest</a></span>, <span class='object_link'><a href="../Mitsubachi/HttpFetchRequest.html" title="Mushikago::Mitsubachi::HttpFetchRequest (class)">Mitsubachi::HttpFetchRequest</a></span>, <span class='object_link'><a href="../Mitsubachi/HttpPushRequest.html" title="Mushikago::Mitsubachi::HttpPushRequest (class)">Mitsubachi::HttpPushRequest</a></span>, <span class='object_link'><a href="../Mitsubachi/ProjectCreateRequest.html" title="Mushikago::Mitsubachi::ProjectCreateRequest (class)">Mitsubachi::ProjectCreateRequest</a></span>, <span class='object_link'><a href="../Mitsubachi/ProjectDiscontinueRequest.html" title="Mushikago::Mitsubachi::ProjectDiscontinueRequest (class)">Mitsubachi::ProjectDiscontinueRequest</a></span>, <span class='object_link'><a href="../Mitsubachi/ProjectUpdateRequest.html" title="Mushikago::Mitsubachi::ProjectUpdateRequest (class)">Mitsubachi::ProjectUpdateRequest</a></span>, <span class='object_link'><a href="../Tombo/CaptureRequest.html" title="Mushikago::Tombo::CaptureRequest (class)">Tombo::CaptureRequest</a></span></p>
|
116
|
-
</div>
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
<h2>Instance Attribute Summary</h2>
|
136
|
-
|
137
|
-
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Request.html" title="Mushikago::Http::Request (class)">Request</a></span></h3>
|
138
|
-
<p class="inherited"><span class='object_link'><a href="Request.html#headers-instance_method" title="Mushikago::Http::Request#headers (method)">headers</a></span>, <span class='object_link'><a href="Request.html#host-instance_method" title="Mushikago::Http::Request#host (method)">host</a></span>, <span class='object_link'><a href="Request.html#params-instance_method" title="Mushikago::Http::Request#params (method)">params</a></span>, <span class='object_link'><a href="Request.html#path-instance_method" title="Mushikago::Http::Request#path (method)">path</a></span>, <span class='object_link'><a href="Request.html#port-instance_method" title="Mushikago::Http::Request#port (method)">port</a></span></p>
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
<h2>
|
143
|
-
Instance Method Summary
|
144
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
145
|
-
</h2>
|
146
|
-
|
147
|
-
<ul class="summary">
|
148
|
-
|
149
|
-
<li class="public ">
|
150
|
-
<span class="summary_signature">
|
151
|
-
|
152
|
-
<a href="#http_method-instance_method" title="#http_method (instance method)">- (Object) <strong>http_method</strong> </a>
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
</span>
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
166
|
-
|
167
|
-
</li>
|
168
|
-
|
169
|
-
|
170
|
-
</ul>
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
<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>
|
182
|
-
<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>
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Request.html" title="Mushikago::Http::Request (class)">Request</a></span></h3>
|
192
|
-
<p class="inherited"><span class='object_link'><a href="Request.html#%5B%5D-instance_method" title="Mushikago::Http::Request#[] (method)">#[]</a></span>, <span class='object_link'><a href="Request.html#%5B%5D%3D-instance_method" title="Mushikago::Http::Request#[]= (method)">#[]=</a></span>, <span class='object_link'><a href="Request.html#add_param-class_method" title="Mushikago::Http::Request.add_param (method)">add_param</a></span>, <span class='object_link'><a href="Request.html#initialize-instance_method" title="Mushikago::Http::Request#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="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="Request.html#url_encoded_params-instance_method" title="Mushikago::Http::Request#url_encoded_params (method)">#url_encoded_params</a></span></p>
|
193
|
-
<div id="constructor_details" class="method_details_list">
|
194
|
-
<h2>Constructor Details</h2>
|
195
|
-
|
196
|
-
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Request.html#initialize-instance_method" title="Mushikago::Http::Request#initialize (method)">Mushikago::Http::Request</a></span></p>
|
197
|
-
|
198
|
-
</div>
|
199
|
-
|
200
|
-
|
201
|
-
<div id="instance_method_details" class="method_details_list">
|
202
|
-
<h2>Instance Method Details</h2>
|
203
|
-
|
204
|
-
|
205
|
-
<div class="method_details first">
|
206
|
-
<p class="signature first" id="http_method-instance_method">
|
207
|
-
|
208
|
-
- (<tt>Object</tt>) <strong>http_method</strong>
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
</p><table class="source_code">
|
213
|
-
<tr>
|
214
|
-
<td>
|
215
|
-
<pre class="lines">
|
216
|
-
|
217
|
-
|
218
|
-
6</pre>
|
219
|
-
</td>
|
220
|
-
<td>
|
221
|
-
<pre class="code"><span class="info file"># File 'lib/mushikago/http/request/post.rb', line 6</span>
|
222
|
-
|
223
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_http_method'>http_method</span><span class='semicolon'>;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>POST</span><span class='tstring_end'>'</span></span> <span class='kw'>end</span></pre>
|
224
|
-
</td>
|
225
|
-
</tr>
|
226
|
-
</table>
|
227
|
-
</div>
|
228
|
-
|
229
|
-
</div>
|
230
|
-
|
231
|
-
</div>
|
232
|
-
|
233
|
-
<div id="footer">
|
234
|
-
Generated on Thu Apr 26 10:56:48 2012 by
|
235
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
236
|
-
0.7.4 (ruby-1.9.2).
|
237
|
-
</div>
|
238
|
-
|
239
|
-
</body>
|
240
|
-
</html>
|