mushikago-sdk 0.3.1 → 0.3.2
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 +36 -5
- data/doc/Mushikago.html +2 -2
- data/doc/Mushikago/Auth.html +1 -1
- data/doc/Mushikago/Auth/Signature.html +1 -1
- data/doc/Mushikago/Auth/Signer.html +1 -1
- data/doc/Mushikago/Config.html +1 -1
- data/doc/Mushikago/Hotaru.html +1 -1
- data/doc/Mushikago/Hotaru/Client.html +1 -1
- data/doc/Mushikago/Hotaru/Request.html +1 -1
- data/doc/Mushikago/Http.html +1 -1
- data/doc/Mushikago/Http/Client.html +1 -1
- data/doc/Mushikago/Http/MultipartRequest.html +1 -1
- data/doc/Mushikago/Http/Request.html +1 -1
- data/doc/Mushikago/Http/Response.html +1 -1
- data/doc/Mushikago/Mitsubachi.html +14 -2
- data/doc/Mushikago/Mitsubachi/Client.html +315 -137
- data/doc/Mushikago/Mitsubachi/HttpFetchRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/HttpPushRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/MultipartRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ProjectCreateRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ProjectDeleteRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ProjectDiscontinueRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ProjectInfoRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ProjectListRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ProjectQueuesRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ProjectUpdateRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/Request.html +1 -1
- data/doc/Mushikago/Mitsubachi/ResourceDeleteRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ResourceGetRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ResourceListRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ResourceStoreRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ScriptDeleteRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ScriptDeployRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ScriptGetRequest.html +1 -1
- data/doc/Mushikago/Mitsubachi/ScriptListRequest.html +1 -1
- data/doc/Mushikago/Tombo.html +1 -1
- data/doc/Mushikago/Tombo/CaptureRequest.html +1 -1
- data/doc/Mushikago/Tombo/CapturesRequest.html +1 -1
- data/doc/Mushikago/Tombo/Client.html +1 -1
- data/doc/Mushikago/Tombo/DeleteRequest.html +1 -1
- data/doc/Mushikago/Tombo/InfoRequest.html +1 -1
- data/doc/Mushikago/Tombo/Request.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +36 -6
- data/doc/index.html +36 -6
- data/doc/top-level-namespace.html +1 -1
- data/lib/mushikago/mitsubachi.rb +1 -0
- data/lib/mushikago/mitsubachi/client.rb +81 -29
- data/lib/mushikago/version.rb +1 -1
- metadata +17 -17
@@ -354,7 +354,7 @@ A new instance of HttpFetchRequest
|
|
354
354
|
</div>
|
355
355
|
|
356
356
|
<div id="footer">
|
357
|
-
Generated on Thu Jan 26
|
357
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
358
358
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
359
359
|
0.7.4 (ruby-1.9.2).
|
360
360
|
</div>
|
@@ -356,7 +356,7 @@ A new instance of HttpPushRequest
|
|
356
356
|
</div>
|
357
357
|
|
358
358
|
<div id="footer">
|
359
|
-
Generated on Thu Jan 26
|
359
|
+
Generated on Thu Jan 26 18:24:18 2012 by
|
360
360
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
361
361
|
0.7.4 (ruby-1.9.2).
|
362
362
|
</div>
|
@@ -323,7 +323,7 @@ Mitsubachiのエンドポイント
|
|
323
323
|
</div>
|
324
324
|
|
325
325
|
<div id="footer">
|
326
|
-
Generated on Thu Jan 26
|
326
|
+
Generated on Thu Jan 26 18:24:18 2012 by
|
327
327
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
328
328
|
0.7.4 (ruby-1.9.2).
|
329
329
|
</div>
|
@@ -352,7 +352,7 @@ A new instance of ProjectCreateRequest
|
|
352
352
|
</div>
|
353
353
|
|
354
354
|
<div id="footer">
|
355
|
-
Generated on Thu Jan 26
|
355
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
356
356
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
357
357
|
0.7.4 (ruby-1.9.2).
|
358
358
|
</div>
|
@@ -342,7 +342,7 @@ A new instance of ProjectDeleteRequest
|
|
342
342
|
</div>
|
343
343
|
|
344
344
|
<div id="footer">
|
345
|
-
Generated on Thu Jan 26
|
345
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
346
346
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
347
347
|
0.7.4 (ruby-1.9.2).
|
348
348
|
</div>
|
@@ -340,7 +340,7 @@ A new instance of ProjectDiscontinueRequest
|
|
340
340
|
</div>
|
341
341
|
|
342
342
|
<div id="footer">
|
343
|
-
Generated on Thu Jan 26
|
343
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
344
344
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
345
345
|
0.7.4 (ruby-1.9.2).
|
346
346
|
</div>
|
@@ -293,7 +293,7 @@ A new instance of ProjectInfoRequest
|
|
293
293
|
</div>
|
294
294
|
|
295
295
|
<div id="footer">
|
296
|
-
Generated on Thu Jan 26
|
296
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
297
297
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
298
298
|
0.7.4 (ruby-1.9.2).
|
299
299
|
</div>
|
@@ -295,7 +295,7 @@ A new instance of ProjectListRequest
|
|
295
295
|
</div>
|
296
296
|
|
297
297
|
<div id="footer">
|
298
|
-
Generated on Thu Jan 26
|
298
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
299
299
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
300
300
|
0.7.4 (ruby-1.9.2).
|
301
301
|
</div>
|
@@ -291,7 +291,7 @@ A new instance of ProjectQueuesRequest
|
|
291
291
|
</div>
|
292
292
|
|
293
293
|
<div id="footer">
|
294
|
-
Generated on Thu Jan 26
|
294
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
295
295
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
296
296
|
0.7.4 (ruby-1.9.2).
|
297
297
|
</div>
|
@@ -350,7 +350,7 @@ A new instance of ProjectUpdateRequest
|
|
350
350
|
</div>
|
351
351
|
|
352
352
|
<div id="footer">
|
353
|
-
Generated on Thu Jan 26
|
353
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
354
354
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
355
355
|
0.7.4 (ruby-1.9.2).
|
356
356
|
</div>
|
@@ -298,7 +298,7 @@ Mitsubachiのエンドポイント
|
|
298
298
|
</div>
|
299
299
|
|
300
300
|
<div id="footer">
|
301
|
-
Generated on Thu Jan 26
|
301
|
+
Generated on Thu Jan 26 18:24:18 2012 by
|
302
302
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
303
303
|
0.7.4 (ruby-1.9.2).
|
304
304
|
</div>
|
@@ -342,7 +342,7 @@ A new instance of ResourceDeleteRequest
|
|
342
342
|
</div>
|
343
343
|
|
344
344
|
<div id="footer">
|
345
|
-
Generated on Thu Jan 26
|
345
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
346
346
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
347
347
|
0.7.4 (ruby-1.9.2).
|
348
348
|
</div>
|
@@ -293,7 +293,7 @@ A new instance of ResourceGetRequest
|
|
293
293
|
</div>
|
294
294
|
|
295
295
|
<div id="footer">
|
296
|
-
Generated on Thu Jan 26
|
296
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
297
297
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
298
298
|
0.7.4 (ruby-1.9.2).
|
299
299
|
</div>
|
@@ -297,7 +297,7 @@ A new instance of ResourceListRequest
|
|
297
297
|
</div>
|
298
298
|
|
299
299
|
<div id="footer">
|
300
|
-
Generated on Thu Jan 26
|
300
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
301
301
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
302
302
|
0.7.4 (ruby-1.9.2).
|
303
303
|
</div>
|
@@ -381,7 +381,7 @@ A new instance of ResourceStoreRequest
|
|
381
381
|
</div>
|
382
382
|
|
383
383
|
<div id="footer">
|
384
|
-
Generated on Thu Jan 26
|
384
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
385
385
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
386
386
|
0.7.4 (ruby-1.9.2).
|
387
387
|
</div>
|
@@ -342,7 +342,7 @@ A new instance of ScriptDeleteRequest
|
|
342
342
|
</div>
|
343
343
|
|
344
344
|
<div id="footer">
|
345
|
-
Generated on Thu Jan 26
|
345
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
346
346
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
347
347
|
0.7.4 (ruby-1.9.2).
|
348
348
|
</div>
|
@@ -377,7 +377,7 @@ A new instance of ScriptDeployRequest
|
|
377
377
|
</div>
|
378
378
|
|
379
379
|
<div id="footer">
|
380
|
-
Generated on Thu Jan 26
|
380
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
381
381
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
382
382
|
0.7.4 (ruby-1.9.2).
|
383
383
|
</div>
|
@@ -293,7 +293,7 @@ A new instance of ScriptGetRequest
|
|
293
293
|
</div>
|
294
294
|
|
295
295
|
<div id="footer">
|
296
|
-
Generated on Thu Jan 26
|
296
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
297
297
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
298
298
|
0.7.4 (ruby-1.9.2).
|
299
299
|
</div>
|
@@ -297,7 +297,7 @@ A new instance of ScriptListRequest
|
|
297
297
|
</div>
|
298
298
|
|
299
299
|
<div id="footer">
|
300
|
-
Generated on Thu Jan 26
|
300
|
+
Generated on Thu Jan 26 18:24:19 2012 by
|
301
301
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
302
302
|
0.7.4 (ruby-1.9.2).
|
303
303
|
</div>
|
data/doc/Mushikago/Tombo.html
CHANGED
@@ -111,7 +111,7 @@ Tomboへのアクセスを行うモジュール
|
|
111
111
|
</div>
|
112
112
|
|
113
113
|
<div id="footer">
|
114
|
-
Generated on Thu Jan 26
|
114
|
+
Generated on Thu Jan 26 18:24:17 2012 by
|
115
115
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
116
116
|
0.7.4 (ruby-1.9.2).
|
117
117
|
</div>
|
@@ -475,7 +475,7 @@ A new instance of CaptureRequest
|
|
475
475
|
</div>
|
476
476
|
|
477
477
|
<div id="footer">
|
478
|
-
Generated on Thu Jan 26
|
478
|
+
Generated on Thu Jan 26 18:24:18 2012 by
|
479
479
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
480
480
|
0.7.4 (ruby-1.9.2).
|
481
481
|
</div>
|
@@ -403,7 +403,7 @@ A new instance of CapturesRequest
|
|
403
403
|
</div>
|
404
404
|
|
405
405
|
<div id="footer">
|
406
|
-
Generated on Thu Jan 26
|
406
|
+
Generated on Thu Jan 26 18:24:18 2012 by
|
407
407
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
408
408
|
0.7.4 (ruby-1.9.2).
|
409
409
|
</div>
|
@@ -809,7 +809,7 @@ APIの使用状況を取得する
|
|
809
809
|
</div>
|
810
810
|
|
811
811
|
<div id="footer">
|
812
|
-
Generated on Thu Jan 26
|
812
|
+
Generated on Thu Jan 26 18:24:18 2012 by
|
813
813
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
814
814
|
0.7.4 (ruby-1.9.2).
|
815
815
|
</div>
|
@@ -392,7 +392,7 @@ A new instance of DeleteRequest
|
|
392
392
|
</div>
|
393
393
|
|
394
394
|
<div id="footer">
|
395
|
-
Generated on Thu Jan 26
|
395
|
+
Generated on Thu Jan 26 18:24:18 2012 by
|
396
396
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
397
397
|
0.7.4 (ruby-1.9.2).
|
398
398
|
</div>
|
@@ -324,7 +324,7 @@ A new instance of InfoRequest
|
|
324
324
|
</div>
|
325
325
|
|
326
326
|
<div id="footer">
|
327
|
-
Generated on Thu Jan 26
|
327
|
+
Generated on Thu Jan 26 18:24:18 2012 by
|
328
328
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
329
329
|
0.7.4 (ruby-1.9.2).
|
330
330
|
</div>
|
@@ -298,7 +298,7 @@ Tomboのエンドポイント
|
|
298
298
|
</div>
|
299
299
|
|
300
300
|
<div id="footer">
|
301
|
-
Generated on Thu Jan 26
|
301
|
+
Generated on Thu Jan 26 18:24:18 2012 by
|
302
302
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
303
303
|
0.7.4 (ruby-1.9.2).
|
304
304
|
</div>
|
data/doc/_index.html
CHANGED
@@ -452,7 +452,7 @@
|
|
452
452
|
</div>
|
453
453
|
|
454
454
|
<div id="footer">
|
455
|
-
Generated on Thu Jan 26
|
455
|
+
Generated on Thu Jan 26 18:24:17 2012 by
|
456
456
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
457
457
|
0.7.4 (ruby-1.9.2).
|
458
458
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -65,9 +65,9 @@
|
|
65
65
|
|
66
66
|
<li><strong>License</strong>: Apache License, Version 2.0</li>
|
67
67
|
|
68
|
-
<li><strong>Latest Version</strong>: 0.3.
|
68
|
+
<li><strong>Latest Version</strong>: 0.3.2</li>
|
69
69
|
|
70
|
-
<li><strong>Release Date</strong>:
|
70
|
+
<li><strong>Release Date</strong>: January 26th 2012</li>
|
71
71
|
</ul>
|
72
72
|
|
73
73
|
<h2 id='id6'>概要</h2>
|
@@ -94,8 +94,7 @@
|
|
94
94
|
|
95
95
|
<p>以下のコードで<a href='http://www.tombo.ne.jp/'>tombo</a>を利用することができます。</p>
|
96
96
|
|
97
|
-
<pre class="code"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>
|
98
|
-
<span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mushikago</span><span class='tstring_end'>'</span></span>
|
97
|
+
<pre class="code"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mushikago</span><span class='tstring_end'>'</span></span>
|
99
98
|
|
100
99
|
<span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'>Mushikago</span><span class='op'>::</span><span class='const'>Tombo</span><span class='op'>::</span><span class='const'>Client</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:api_key</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><APIキー></span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:secret_key</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><シークレットキー></span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
101
100
|
|
@@ -131,6 +130,37 @@
|
|
131
130
|
<span class='comment'># => {"message"=>"OK", "status"=>200}
|
132
131
|
</span><span class='comment'># => {"disk_usage"=>25372565, "image_num"=>133, "api_count"=>499}</span></pre>
|
133
132
|
|
133
|
+
<h3 id='mitsubachi'>mitsubachiを利用する</h3>
|
134
|
+
|
135
|
+
<p>以下のコードで<a href='http://www.mushikago.org/mitsubachi/'>mitsubachi</a>を利用することができます。 スクリプトファイルの記述方法は<a href='http://www.mushikago.org/mitsubachi/dev/doc/deploy/'>ドキュメント</a>を参照して下さい。</p>
|
136
|
+
|
137
|
+
<pre class="code"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mushikago</span><span class='tstring_end'>'</span></span>
|
138
|
+
|
139
|
+
<span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'>Mushikago</span><span class='op'>::</span><span class='const'>Mitsubachi</span><span class='op'>::</span><span class='const'>Client</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:api_key</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><APIキー></span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:secret_key</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><シークレットキー></span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
140
|
+
|
141
|
+
<span class='id identifier rubyid_project_name'>project_name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sample_project</span><span class='tstring_end'>'</span></span>
|
142
|
+
|
143
|
+
<span class='comment'># プロジェクト作成
|
144
|
+
</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_project_create'>project_create</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='rparen'>)</span>
|
145
|
+
|
146
|
+
<span class='comment'># スクリプトファイルデプロイ
|
147
|
+
</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_script_deploy'>script_deploy</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sample.rb</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
148
|
+
|
149
|
+
<span class='comment'># クロール開始
|
150
|
+
</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_http_fetch'>http_fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>http://www.mushikago.org/</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sample.rb</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
151
|
+
|
152
|
+
<span class='comment'># クロール終了まで待機
|
153
|
+
</span><span class='id identifier rubyid_sleep'>sleep</span> <span class='int'>1</span> <span class='kw'>until</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_project_queues'>project_queues</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>count</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='int'>0</span>
|
154
|
+
|
155
|
+
<span class='comment'># クロールログ確認
|
156
|
+
</span><span class='id identifier rubyid_log_files'>log_files</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_resource_list'>resource_list</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='comma'>,</span> <span class='symbol'>:filter</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>log/stdout</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
157
|
+
|
158
|
+
<span class='comment'># ログファイルURL取得
|
159
|
+
</span><span class='id identifier rubyid_log_files'>log_files</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>files</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</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_file'>file</span><span class='op'>|</span>
|
160
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_resource_get'>resource_get</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='comma'>,</span> <span class='id identifier rubyid_file'>file</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>name</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
161
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_ret'>ret</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>url</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
162
|
+
<span class='kw'>end</span></pre>
|
163
|
+
|
134
164
|
<h4 id='api'>APIキーとシークレットキーの設定方法</h4>
|
135
165
|
|
136
166
|
<p>APIキーとシークレットキーは以下の方法でも設定することができます。</p>
|
@@ -167,7 +197,7 @@ $ export MUSHIKAGO_SECRET_KEY=<シークレットキー>
|
|
167
197
|
|
168
198
|
<ul>
|
169
199
|
<li>
|
170
|
-
<p><strong>Jan.26.12</strong>: 0.3.
|
200
|
+
<p><strong>Jan.26.12</strong>: 0.3.2 release - mitsubachiに対応</p>
|
171
201
|
</li>
|
172
202
|
|
173
203
|
<li>
|
@@ -190,7 +220,7 @@ $ export MUSHIKAGO_SECRET_KEY=<シークレットキー>
|
|
190
220
|
</ul></div></div>
|
191
221
|
|
192
222
|
<div id="footer">
|
193
|
-
Generated on Thu Jan 26
|
223
|
+
Generated on Thu Jan 26 18:24:17 2012 by
|
194
224
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
195
225
|
0.7.4 (ruby-1.9.2).
|
196
226
|
</div>
|
data/doc/index.html
CHANGED
@@ -65,9 +65,9 @@
|
|
65
65
|
|
66
66
|
<li><strong>License</strong>: Apache License, Version 2.0</li>
|
67
67
|
|
68
|
-
<li><strong>Latest Version</strong>: 0.3.
|
68
|
+
<li><strong>Latest Version</strong>: 0.3.2</li>
|
69
69
|
|
70
|
-
<li><strong>Release Date</strong>:
|
70
|
+
<li><strong>Release Date</strong>: January 26th 2012</li>
|
71
71
|
</ul>
|
72
72
|
|
73
73
|
<h2 id='id1'>概要</h2>
|
@@ -94,8 +94,7 @@
|
|
94
94
|
|
95
95
|
<p>以下のコードで<a href='http://www.tombo.ne.jp/'>tombo</a>を利用することができます。</p>
|
96
96
|
|
97
|
-
<pre class="code"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>
|
98
|
-
<span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mushikago</span><span class='tstring_end'>'</span></span>
|
97
|
+
<pre class="code"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mushikago</span><span class='tstring_end'>'</span></span>
|
99
98
|
|
100
99
|
<span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'>Mushikago</span><span class='op'>::</span><span class='const'>Tombo</span><span class='op'>::</span><span class='const'>Client</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:api_key</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><APIキー></span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:secret_key</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><シークレットキー></span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
101
100
|
|
@@ -131,6 +130,37 @@
|
|
131
130
|
<span class='comment'># => {"message"=>"OK", "status"=>200}
|
132
131
|
</span><span class='comment'># => {"disk_usage"=>25372565, "image_num"=>133, "api_count"=>499}</span></pre>
|
133
132
|
|
133
|
+
<h3 id='mitsubachi'>mitsubachiを利用する</h3>
|
134
|
+
|
135
|
+
<p>以下のコードで<a href='http://www.mushikago.org/mitsubachi/'>mitsubachi</a>を利用することができます。 スクリプトファイルの記述方法は<a href='http://www.mushikago.org/mitsubachi/dev/doc/deploy/'>ドキュメント</a>を参照して下さい。</p>
|
136
|
+
|
137
|
+
<pre class="code"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mushikago</span><span class='tstring_end'>'</span></span>
|
138
|
+
|
139
|
+
<span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'>Mushikago</span><span class='op'>::</span><span class='const'>Mitsubachi</span><span class='op'>::</span><span class='const'>Client</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:api_key</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><APIキー></span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:secret_key</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><シークレットキー></span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
140
|
+
|
141
|
+
<span class='id identifier rubyid_project_name'>project_name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sample_project</span><span class='tstring_end'>'</span></span>
|
142
|
+
|
143
|
+
<span class='comment'># プロジェクト作成
|
144
|
+
</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_project_create'>project_create</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='rparen'>)</span>
|
145
|
+
|
146
|
+
<span class='comment'># スクリプトファイルデプロイ
|
147
|
+
</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_script_deploy'>script_deploy</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sample.rb</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
148
|
+
|
149
|
+
<span class='comment'># クロール開始
|
150
|
+
</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_http_fetch'>http_fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>http://www.mushikago.org/</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sample.rb</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
151
|
+
|
152
|
+
<span class='comment'># クロール終了まで待機
|
153
|
+
</span><span class='id identifier rubyid_sleep'>sleep</span> <span class='int'>1</span> <span class='kw'>until</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_project_queues'>project_queues</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>count</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='int'>0</span>
|
154
|
+
|
155
|
+
<span class='comment'># クロールログ確認
|
156
|
+
</span><span class='id identifier rubyid_log_files'>log_files</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_resource_list'>resource_list</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='comma'>,</span> <span class='symbol'>:filter</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>log/stdout</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
157
|
+
|
158
|
+
<span class='comment'># ログファイルURL取得
|
159
|
+
</span><span class='id identifier rubyid_log_files'>log_files</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>files</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</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_file'>file</span><span class='op'>|</span>
|
160
|
+
<span class='id identifier rubyid_ret'>ret</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_resource_get'>resource_get</span><span class='lparen'>(</span><span class='id identifier rubyid_project_name'>project_name</span><span class='comma'>,</span> <span class='id identifier rubyid_file'>file</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>name</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
161
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_ret'>ret</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>url</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
162
|
+
<span class='kw'>end</span></pre>
|
163
|
+
|
134
164
|
<h4 id='api'>APIキーとシークレットキーの設定方法</h4>
|
135
165
|
|
136
166
|
<p>APIキーとシークレットキーは以下の方法でも設定することができます。</p>
|
@@ -167,7 +197,7 @@ $ export MUSHIKAGO_SECRET_KEY=<シークレットキー>
|
|
167
197
|
|
168
198
|
<ul>
|
169
199
|
<li>
|
170
|
-
<p><strong>Jan.26.12</strong>: 0.3.
|
200
|
+
<p><strong>Jan.26.12</strong>: 0.3.2 release - mitsubachiに対応</p>
|
171
201
|
</li>
|
172
202
|
|
173
203
|
<li>
|
@@ -190,7 +220,7 @@ $ export MUSHIKAGO_SECRET_KEY=<シークレットキー>
|
|
190
220
|
</ul></div></div>
|
191
221
|
|
192
222
|
<div id="footer">
|
193
|
-
Generated on Thu Jan 26
|
223
|
+
Generated on Thu Jan 26 18:24:17 2012 by
|
194
224
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
195
225
|
0.7.4 (ruby-1.9.2).
|
196
226
|
</div>
|