mushikago-sdk 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README +125 -0
- data/autotest/discover.rb +7 -0
- data/doc/Mushikago.html +243 -0
- data/doc/Mushikago/Auth.html +120 -0
- data/doc/Mushikago/Auth/Signature.html +305 -0
- data/doc/Mushikago/Auth/Signer.html +452 -0
- data/doc/Mushikago/Config.html +272 -0
- data/doc/Mushikago/Http.html +118 -0
- data/doc/Mushikago/Http/Client.html +551 -0
- data/doc/Mushikago/Http/Request.html +1264 -0
- data/doc/Mushikago/Http/Response.html +706 -0
- data/doc/Mushikago/Tombo.html +118 -0
- data/doc/Mushikago/Tombo/CaptureRequest.html +446 -0
- data/doc/Mushikago/Tombo/CapturesRequest.html +389 -0
- data/doc/Mushikago/Tombo/Client.html +770 -0
- data/doc/Mushikago/Tombo/DeleteRequest.html +391 -0
- data/doc/Mushikago/Tombo/InfoRequest.html +325 -0
- data/doc/Mushikago/Tombo/Request.html +287 -0
- data/doc/_index.html +278 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +53 -0
- data/doc/css/style.css +320 -0
- data/doc/file.README.html +201 -0
- data/doc/file_list.html +49 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +201 -0
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +150 -0
- data/doc/js/jquery.js +16 -0
- data/doc/method_list.html +398 -0
- data/doc/top-level-namespace.html +103 -0
- data/lib/mushikago/tombo/capture_request.rb +1 -1
- data/lib/mushikago/tombo/client.rb +1 -1
- data/lib/mushikago/version.rb +1 -1
- data/spec/mushikago/tombo/capture_request_spec.rb +3 -3
- metadata +34 -3
@@ -0,0 +1,272 @@
|
|
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::Config
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.2
|
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 (C)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../Mushikago.html" title="Mushikago (module)">Mushikago</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Config</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::Config
|
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">Object</span>
|
70
|
+
|
71
|
+
<ul class="fullTree">
|
72
|
+
<li>Object</li>
|
73
|
+
|
74
|
+
<li class="next">Mushikago::Config</li>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
<a href="#" class="inheritanceTree">show all</a>
|
78
|
+
|
79
|
+
</dd>
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
<dt class="r2">Includes:</dt>
|
87
|
+
<dd class="r2">Singleton</dd>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<dt class="r1 last">Defined in:</dt>
|
94
|
+
<dd class="r1 last">lib/mushikago/configuration.rb</dd>
|
95
|
+
|
96
|
+
</dl>
|
97
|
+
<div class="clear"></div>
|
98
|
+
|
99
|
+
<h2>Overview</h2><div class="docstring">
|
100
|
+
<div class="discussion">
|
101
|
+
|
102
|
+
<p>Mushikago SDK for Rubyの各設定</p>
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
<div class="tags">
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<h2>
|
118
|
+
Instance Method Summary
|
119
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
120
|
+
</h2>
|
121
|
+
|
122
|
+
<ul class="summary">
|
123
|
+
|
124
|
+
<li class="public ">
|
125
|
+
<span class="summary_signature">
|
126
|
+
|
127
|
+
<a href="#load-instance_method" title="#load (instance method)">- (Object) <strong>load</strong>(options = {}) </a>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
</span>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
141
|
+
|
142
|
+
</li>
|
143
|
+
|
144
|
+
|
145
|
+
</ul>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
<div id="instance_method_details" class="method_details_list">
|
152
|
+
<h2>Instance Method Details</h2>
|
153
|
+
|
154
|
+
|
155
|
+
<div class="method_details first">
|
156
|
+
<p class="signature first" id="load-instance_method">
|
157
|
+
|
158
|
+
- (<tt>Object</tt>) <strong>load</strong>(options = {})
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
</p><div class="docstring">
|
163
|
+
<div class="discussion">
|
164
|
+
|
165
|
+
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
<div class="tags">
|
169
|
+
|
170
|
+
<div class="examples">
|
171
|
+
<h3>Examples:</h3>
|
172
|
+
|
173
|
+
<h4><div class='inline'></div></h4>
|
174
|
+
<pre class="example code"><span class='Mushikago constant id'>Mushikago</span><span class='dot token'>.</span><span class='config identifier id'>config</span><span class='dot token'>.</span><span class='load identifier id'>load</span><span class='lparen token'>(</span><span class='symbol val'>:api_key</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>'ABCDEFG'</span><span class='comma token'>,</span> <span class='symbol val'>:secret_key</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>'HIJKLMN'</span><span class='rparen token'>)</span>
|
175
|
+
</pre>
|
176
|
+
|
177
|
+
</div>
|
178
|
+
<h3>Parameters:</h3>
|
179
|
+
<ul class="param">
|
180
|
+
|
181
|
+
<li>
|
182
|
+
|
183
|
+
<span class='name'>options</span>
|
184
|
+
|
185
|
+
|
186
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
187
|
+
|
188
|
+
|
189
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
190
|
+
|
191
|
+
|
192
|
+
—
|
193
|
+
<div class='inline'>
|
194
|
+
<p>optionsをロードします</p>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
</li>
|
198
|
+
|
199
|
+
</ul>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
<h3>Options Hash (<tt>options</tt>):</h3>
|
205
|
+
<ul class="option">
|
206
|
+
|
207
|
+
<li>
|
208
|
+
<span class="name">:api_key(ENV['MUSHIKAGO_API_KEY'])</span>
|
209
|
+
<span class="type">(<tt>String</tt>)</span>
|
210
|
+
<span class="default">
|
211
|
+
|
212
|
+
</span>
|
213
|
+
— <div class='inline'>
|
214
|
+
<p>発行されたAPIKeyを設定する</p>
|
215
|
+
</div>
|
216
|
+
</tr>
|
217
|
+
|
218
|
+
<li>
|
219
|
+
<span class="name">:secret_key(ENV['MUSHIKAGO_SECRET_KEY'])</span>
|
220
|
+
<span class="type">(<tt>String</tt>)</span>
|
221
|
+
<span class="default">
|
222
|
+
|
223
|
+
</span>
|
224
|
+
— <div class='inline'>
|
225
|
+
<p>発行されたSecretKeyを設定する</p>
|
226
|
+
</div>
|
227
|
+
</tr>
|
228
|
+
|
229
|
+
<li>
|
230
|
+
<span class="name">:tombo_endpoint('tombo.mushikago.org')</span>
|
231
|
+
<span class="type">(<tt>String</tt>)</span>
|
232
|
+
<span class="default">
|
233
|
+
|
234
|
+
</span>
|
235
|
+
— <div class='inline'>
|
236
|
+
<p>tomboサービスのエンドポイントを設定する</p>
|
237
|
+
</div>
|
238
|
+
</tr>
|
239
|
+
|
240
|
+
</ul>
|
241
|
+
|
242
|
+
|
243
|
+
</div><table class="source_code">
|
244
|
+
<tr>
|
245
|
+
<td>
|
246
|
+
<pre class="lines">
|
247
|
+
|
248
|
+
|
249
|
+
13</pre>
|
250
|
+
</td>
|
251
|
+
<td>
|
252
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/configuration.rb', line 13</span>
|
253
|
+
|
254
|
+
<span class='def def kw'>def</span> <span class='load identifier id'>load</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span>
|
255
|
+
</pre>
|
256
|
+
</td>
|
257
|
+
</tr>
|
258
|
+
</table>
|
259
|
+
</div>
|
260
|
+
|
261
|
+
</div>
|
262
|
+
|
263
|
+
</div>
|
264
|
+
|
265
|
+
<div id="footer">
|
266
|
+
Generated on Tue Sep 6 18:23:00 2011 by
|
267
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
268
|
+
0.7.2 (ruby-1.8.7).
|
269
|
+
</div>
|
270
|
+
|
271
|
+
</body>
|
272
|
+
</html>
|
@@ -0,0 +1,118 @@
|
|
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
|
+
Module: Mushikago::Http
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.2
|
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 (H)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../Mushikago.html" title="Mushikago (module)">Mushikago</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Http</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>Module: Mushikago::Http
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
<dt class="r1 last">Defined in:</dt>
|
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>
|
77
|
+
</dd>
|
78
|
+
|
79
|
+
</dl>
|
80
|
+
<div class="clear"></div>
|
81
|
+
|
82
|
+
<h2>Overview</h2><div class="docstring">
|
83
|
+
<div class="discussion">
|
84
|
+
|
85
|
+
<p>MushikagoサービスへのHTTPリクエストを扱うモジュール</p>
|
86
|
+
|
87
|
+
|
88
|
+
</div>
|
89
|
+
</div>
|
90
|
+
<div class="tags">
|
91
|
+
|
92
|
+
</div><h2>Defined Under Namespace</h2>
|
93
|
+
<p class="children">
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<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>
|
99
|
+
|
100
|
+
|
101
|
+
</p>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
<div id="footer">
|
112
|
+
Generated on Tue Sep 6 18:23:00 2011 by
|
113
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
114
|
+
0.7.2 (ruby-1.8.7).
|
115
|
+
</div>
|
116
|
+
|
117
|
+
</body>
|
118
|
+
</html>
|
@@ -0,0 +1,551 @@
|
|
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::Client
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.2
|
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 (C)</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">Client</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::Client
|
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">Object</span>
|
70
|
+
|
71
|
+
<ul class="fullTree">
|
72
|
+
<li>Object</li>
|
73
|
+
|
74
|
+
<li class="next">Mushikago::Http::Client</li>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
<a href="#" class="inheritanceTree">show all</a>
|
78
|
+
|
79
|
+
</dd>
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<dt class="r2 last">Defined in:</dt>
|
90
|
+
<dd class="r2 last">lib/mushikago/http/client.rb</dd>
|
91
|
+
|
92
|
+
</dl>
|
93
|
+
<div class="clear"></div>
|
94
|
+
|
95
|
+
<h2>Overview</h2><div class="docstring">
|
96
|
+
<div class="discussion">
|
97
|
+
|
98
|
+
<p>Mushikagoサービスに接続するクライアント</p>
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
<div class="tags">
|
104
|
+
|
105
|
+
</div><div id="subclasses">
|
106
|
+
<h2>Direct Known Subclasses</h2>
|
107
|
+
<p class="children"><span class='object_link'><a href="../Tombo/Client.html" title="Mushikago::Tombo::Client (class)">Tombo::Client</a></span></p>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
|
111
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
112
|
+
<ul class="summary">
|
113
|
+
|
114
|
+
<li class="public ">
|
115
|
+
<span class="summary_signature">
|
116
|
+
|
117
|
+
<a href="#api_key-instance_method" title="#api_key (instance method)">- (String) <strong>api_key</strong> </a>
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
</span>
|
122
|
+
|
123
|
+
|
124
|
+
<span class="note title readonly">readonly</span>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<span class="summary_desc"><div class='inline'>
|
134
|
+
<p>Api_key.</p>
|
135
|
+
</div></span>
|
136
|
+
|
137
|
+
</li>
|
138
|
+
|
139
|
+
|
140
|
+
<li class="public ">
|
141
|
+
<span class="summary_signature">
|
142
|
+
|
143
|
+
<a href="#signer-instance_method" title="#signer (instance method)">- (Signer) <strong>signer</strong> </a>
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
</span>
|
148
|
+
|
149
|
+
|
150
|
+
<span class="note title readonly">readonly</span>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
<span class="summary_desc"><div class='inline'>
|
160
|
+
<p>Signer.</p>
|
161
|
+
</div></span>
|
162
|
+
|
163
|
+
</li>
|
164
|
+
|
165
|
+
|
166
|
+
</ul>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
<h2>
|
173
|
+
Instance Method Summary
|
174
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
175
|
+
</h2>
|
176
|
+
|
177
|
+
<ul class="summary">
|
178
|
+
|
179
|
+
<li class="public ">
|
180
|
+
<span class="summary_signature">
|
181
|
+
|
182
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Client) <strong>initialize</strong>(options = {}) </a>
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
</span>
|
187
|
+
|
188
|
+
<span class="note title constructor">constructor</span>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<span class="summary_desc"><div class='inline'>
|
198
|
+
<p>A new instance of Client.</p>
|
199
|
+
</div></span>
|
200
|
+
|
201
|
+
</li>
|
202
|
+
|
203
|
+
|
204
|
+
<li class="public ">
|
205
|
+
<span class="summary_signature">
|
206
|
+
|
207
|
+
<a href="#send_request-instance_method" title="#send_request (instance method)">- (Mushikago::Http::Response) <strong>send_request</strong>(request) </a>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
</span>
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
<span class="summary_desc"><div class='inline'>
|
221
|
+
<p>Response.</p>
|
222
|
+
</div></span>
|
223
|
+
|
224
|
+
</li>
|
225
|
+
|
226
|
+
|
227
|
+
</ul>
|
228
|
+
|
229
|
+
|
230
|
+
<div id="constructor_details" class="method_details_list">
|
231
|
+
<h2>Constructor Details</h2>
|
232
|
+
|
233
|
+
<div class="method_details first">
|
234
|
+
<p class="signature first" id="initialize-instance_method">
|
235
|
+
|
236
|
+
- (<tt><span class='object_link'><a href="" title="Mushikago::Http::Client (class)">Client</a></span></tt>) <strong>initialize</strong>(options = {})
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
</p><div class="docstring">
|
241
|
+
<div class="discussion">
|
242
|
+
|
243
|
+
<p>A new instance of Client</p>
|
244
|
+
|
245
|
+
|
246
|
+
</div>
|
247
|
+
</div>
|
248
|
+
<div class="tags">
|
249
|
+
<h3>Parameters:</h3>
|
250
|
+
<ul class="param">
|
251
|
+
|
252
|
+
<li>
|
253
|
+
|
254
|
+
<span class='name'>options</span>
|
255
|
+
|
256
|
+
|
257
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
258
|
+
|
259
|
+
|
260
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
261
|
+
|
262
|
+
|
263
|
+
</li>
|
264
|
+
|
265
|
+
</ul>
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
<h3>Options Hash (<tt>options</tt>):</h3>
|
271
|
+
<ul class="option">
|
272
|
+
|
273
|
+
<li>
|
274
|
+
<span class="name">:api_key(Configured</span>
|
275
|
+
<span class="type">(<tt>String</tt>)</span>
|
276
|
+
<span class="default">
|
277
|
+
|
278
|
+
</span>
|
279
|
+
— <div class='inline'>
|
280
|
+
<p>value) APIキー</p>
|
281
|
+
</div>
|
282
|
+
</tr>
|
283
|
+
|
284
|
+
<li>
|
285
|
+
<span class="name">:secret_key(Configured</span>
|
286
|
+
<span class="type">(<tt>String</tt>)</span>
|
287
|
+
<span class="default">
|
288
|
+
|
289
|
+
</span>
|
290
|
+
— <div class='inline'>
|
291
|
+
<p>value) 秘密鍵</p>
|
292
|
+
</div>
|
293
|
+
</tr>
|
294
|
+
|
295
|
+
</ul>
|
296
|
+
|
297
|
+
|
298
|
+
</div><table class="source_code">
|
299
|
+
<tr>
|
300
|
+
<td>
|
301
|
+
<pre class="lines">
|
302
|
+
|
303
|
+
|
304
|
+
16</pre>
|
305
|
+
</td>
|
306
|
+
<td>
|
307
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line 16</span>
|
308
|
+
|
309
|
+
<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span>
|
310
|
+
</pre>
|
311
|
+
</td>
|
312
|
+
</tr>
|
313
|
+
</table>
|
314
|
+
</div>
|
315
|
+
|
316
|
+
</div>
|
317
|
+
|
318
|
+
<div id="instance_attr_details" class="attr_details">
|
319
|
+
<h2>Instance Attribute Details</h2>
|
320
|
+
|
321
|
+
|
322
|
+
<span id=""></span>
|
323
|
+
<span id="api_key-instance_method"></span>
|
324
|
+
<div class="method_details first">
|
325
|
+
<p class="signature first" id="api_key-instance_method">
|
326
|
+
|
327
|
+
- (<tt>String</tt>) <strong>api_key</strong> <span class="extras">(readonly)</span>
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
</p><div class="docstring">
|
332
|
+
<div class="discussion">
|
333
|
+
|
334
|
+
<p>Api_key</p>
|
335
|
+
|
336
|
+
|
337
|
+
</div>
|
338
|
+
</div>
|
339
|
+
<div class="tags">
|
340
|
+
<h3>Returns:</h3>
|
341
|
+
<ul class="return">
|
342
|
+
|
343
|
+
<li>
|
344
|
+
|
345
|
+
|
346
|
+
<span class='type'>(<tt>String</tt>)</span>
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
—
|
351
|
+
<div class='inline'>
|
352
|
+
<p>api_key</p>
|
353
|
+
</div>
|
354
|
+
|
355
|
+
</li>
|
356
|
+
|
357
|
+
</ul>
|
358
|
+
|
359
|
+
</div><table class="source_code">
|
360
|
+
<tr>
|
361
|
+
<td>
|
362
|
+
<pre class="lines">
|
363
|
+
|
364
|
+
|
365
|
+
8
|
366
|
+
9
|
367
|
+
10</pre>
|
368
|
+
</td>
|
369
|
+
<td>
|
370
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line 8</span>
|
371
|
+
|
372
|
+
<span class='def def kw'>def</span> <span class='api_key identifier id'>api_key</span>
|
373
|
+
<span class='@api_key ivar id'>@api_key</span>
|
374
|
+
<span class='end end kw'>end</span>
|
375
|
+
</pre>
|
376
|
+
</td>
|
377
|
+
</tr>
|
378
|
+
</table>
|
379
|
+
</div>
|
380
|
+
|
381
|
+
|
382
|
+
<span id=""></span>
|
383
|
+
<span id="signer-instance_method"></span>
|
384
|
+
<div class="method_details ">
|
385
|
+
<p class="signature " id="signer-instance_method">
|
386
|
+
|
387
|
+
- (<tt>Signer</tt>) <strong>signer</strong> <span class="extras">(readonly)</span>
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
</p><div class="docstring">
|
392
|
+
<div class="discussion">
|
393
|
+
|
394
|
+
<p>Signer</p>
|
395
|
+
|
396
|
+
|
397
|
+
</div>
|
398
|
+
</div>
|
399
|
+
<div class="tags">
|
400
|
+
<h3>Returns:</h3>
|
401
|
+
<ul class="return">
|
402
|
+
|
403
|
+
<li>
|
404
|
+
|
405
|
+
|
406
|
+
<span class='type'>(<tt>Signer</tt>)</span>
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
—
|
411
|
+
<div class='inline'>
|
412
|
+
<p>signer</p>
|
413
|
+
</div>
|
414
|
+
|
415
|
+
</li>
|
416
|
+
|
417
|
+
</ul>
|
418
|
+
|
419
|
+
</div><table class="source_code">
|
420
|
+
<tr>
|
421
|
+
<td>
|
422
|
+
<pre class="lines">
|
423
|
+
|
424
|
+
|
425
|
+
11
|
426
|
+
12
|
427
|
+
13</pre>
|
428
|
+
</td>
|
429
|
+
<td>
|
430
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line 11</span>
|
431
|
+
|
432
|
+
<span class='def def kw'>def</span> <span class='signer identifier id'>signer</span>
|
433
|
+
<span class='@signer ivar id'>@signer</span>
|
434
|
+
<span class='end end kw'>end</span>
|
435
|
+
</pre>
|
436
|
+
</td>
|
437
|
+
</tr>
|
438
|
+
</table>
|
439
|
+
</div>
|
440
|
+
|
441
|
+
</div>
|
442
|
+
|
443
|
+
|
444
|
+
<div id="instance_method_details" class="method_details_list">
|
445
|
+
<h2>Instance Method Details</h2>
|
446
|
+
|
447
|
+
|
448
|
+
<div class="method_details first">
|
449
|
+
<p class="signature first" id="send_request-instance_method">
|
450
|
+
|
451
|
+
- (<tt><span class='object_link'><a href="Response.html" title="Mushikago::Http::Response (class)">Mushikago::Http::Response</a></span></tt>) <strong>send_request</strong>(request)
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
</p><div class="docstring">
|
456
|
+
<div class="discussion">
|
457
|
+
|
458
|
+
<p>Response</p>
|
459
|
+
|
460
|
+
|
461
|
+
</div>
|
462
|
+
</div>
|
463
|
+
<div class="tags">
|
464
|
+
<h3>Parameters:</h3>
|
465
|
+
<ul class="param">
|
466
|
+
|
467
|
+
<li>
|
468
|
+
|
469
|
+
<span class='name'>request</span>
|
470
|
+
|
471
|
+
|
472
|
+
<span class='type'>(<tt><span class='object_link'><a href="Request.html" title="Mushikago::Http::Request (class)">Mushikago::Http::Request</a></span></tt>)</span>
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
</li>
|
477
|
+
|
478
|
+
</ul>
|
479
|
+
<h3>Returns:</h3>
|
480
|
+
<ul class="return">
|
481
|
+
|
482
|
+
<li>
|
483
|
+
|
484
|
+
|
485
|
+
<span class='type'>(<tt><span class='object_link'><a href="Response.html" title="Mushikago::Http::Response (class)">Mushikago::Http::Response</a></span></tt>)</span>
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
—
|
490
|
+
<div class='inline'>
|
491
|
+
<p>response</p>
|
492
|
+
</div>
|
493
|
+
|
494
|
+
</li>
|
495
|
+
|
496
|
+
</ul>
|
497
|
+
|
498
|
+
</div><table class="source_code">
|
499
|
+
<tr>
|
500
|
+
<td>
|
501
|
+
<pre class="lines">
|
502
|
+
|
503
|
+
|
504
|
+
23
|
505
|
+
24
|
506
|
+
25
|
507
|
+
26
|
508
|
+
27
|
509
|
+
28
|
510
|
+
29
|
511
|
+
30
|
512
|
+
31
|
513
|
+
32
|
514
|
+
33
|
515
|
+
34
|
516
|
+
35</pre>
|
517
|
+
</td>
|
518
|
+
<td>
|
519
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/http/client.rb', line 23</span>
|
520
|
+
|
521
|
+
<span class='def def kw'>def</span> <span class='send_request identifier id'>send_request</span> <span class='request identifier id'>request</span>
|
522
|
+
<span class='comment val'># add authorization</span>
|
523
|
+
<span class='request identifier id'>request</span><span class='dot token'>.</span><span class='set_param identifier id'>set_param</span><span class='lparen token'>(</span><span class='string val'>'api_key'</span><span class='comma token'>,</span> <span class='api_key identifier id'>api_key</span><span class='rparen token'>)</span>
|
524
|
+
<span class='request identifier id'>request</span><span class='dot token'>.</span><span class='set_param identifier id'>set_param</span><span class='lparen token'>(</span><span class='string val'>'timestamp'</span><span class='comma token'>,</span> <span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='now identifier id'>now</span><span class='dot token'>.</span><span class='utc identifier id'>utc</span><span class='dot token'>.</span><span class='strftime identifier id'>strftime</span><span class='lparen token'>(</span><span class='string val'>'%Y-%m-%dT%H:%M:%SZ'</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
525
|
+
<span class='request identifier id'>request</span><span class='dot token'>.</span><span class='add_signature! fid id'>add_signature!</span><span class='lparen token'>(</span><span class='signer identifier id'>signer</span><span class='rparen token'>)</span>
|
526
|
+
|
527
|
+
<span class='comment val'># send request</span>
|
528
|
+
<span class='Net constant id'>Net</span><span class='colon2 op'>::</span><span class='HTTP constant id'>HTTP</span><span class='dot token'>.</span><span class='start identifier id'>start</span><span class='lparen token'>(</span><span class='request identifier id'>request</span><span class='dot token'>.</span><span class='host identifier id'>host</span><span class='comma token'>,</span> <span class='request identifier id'>request</span><span class='dot token'>.</span><span class='port identifier id'>port</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='http identifier id'>http</span><span class='bitor op'>|</span>
|
529
|
+
<span class='http_request identifier id'>http_request</span> <span class='assign token'>=</span> <span class='request identifier id'>request</span><span class='dot token'>.</span><span class='to_http_request identifier id'>to_http_request</span>
|
530
|
+
<span class='http_response identifier id'>http_response</span> <span class='assign token'>=</span> <span class='http identifier id'>http</span><span class='dot token'>.</span><span class='request identifier id'>request</span><span class='lparen token'>(</span><span class='http_request identifier id'>http_request</span><span class='rparen token'>)</span>
|
531
|
+
<span class='return return kw'>return</span> <span class='Mushikago constant id'>Mushikago</span><span class='colon2 op'>::</span><span class='Http constant id'>Http</span><span class='colon2 op'>::</span><span class='Response constant id'>Response</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='JSON constant id'>JSON</span><span class='dot token'>.</span><span class='parse identifier id'>parse</span><span class='lparen token'>(</span><span class='http_response identifier id'>http_response</span><span class='dot token'>.</span><span class='body identifier id'>body</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
532
|
+
<span class='end end kw'>end</span>
|
533
|
+
<span class='end end kw'>end</span>
|
534
|
+
</pre>
|
535
|
+
</td>
|
536
|
+
</tr>
|
537
|
+
</table>
|
538
|
+
</div>
|
539
|
+
|
540
|
+
</div>
|
541
|
+
|
542
|
+
</div>
|
543
|
+
|
544
|
+
<div id="footer">
|
545
|
+
Generated on Tue Sep 6 18:23:00 2011 by
|
546
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
547
|
+
0.7.2 (ruby-1.8.7).
|
548
|
+
</div>
|
549
|
+
|
550
|
+
</body>
|
551
|
+
</html>
|