shep 0.1.0.pre.alpha0 → 0.2.0.pre.alpha0

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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -1
  3. data/Rakefile +1 -0
  4. data/doc/Shep/Entity/Account.html +22 -37
  5. data/doc/Shep/Entity/Context.html +8 -9
  6. data/doc/Shep/Entity/CustomEmoji.html +11 -15
  7. data/doc/Shep/Entity/MediaAttachment.html +13 -19
  8. data/doc/Shep/Entity/Notification.html +11 -15
  9. data/doc/Shep/Entity/Status.html +34 -61
  10. data/doc/Shep/Entity/StatusSource.html +9 -11
  11. data/doc/Shep/Entity/Status_Application.html +11 -10
  12. data/doc/Shep/Entity/Status_Mention.html +10 -13
  13. data/doc/Shep/Entity/Status_Tag.html +8 -9
  14. data/doc/Shep/Entity.html +156 -141
  15. data/doc/Shep/Error/Caller.html +4 -4
  16. data/doc/Shep/Error/Http.html +13 -13
  17. data/doc/Shep/Error/RateLimit.html +176 -0
  18. data/doc/Shep/Error/Remote.html +3 -4
  19. data/doc/Shep/Error/Server.html +5 -4
  20. data/doc/Shep/Error/Type.html +6 -8
  21. data/doc/Shep/Error.html +5 -5
  22. data/doc/Shep/Session.html +895 -570
  23. data/doc/Shep.html +20 -5
  24. data/doc/_index.html +10 -3
  25. data/doc/class_list.html +1 -1
  26. data/doc/file.README.html +52 -33
  27. data/doc/file_list.html +1 -1
  28. data/doc/index.html +117 -239
  29. data/doc/method_list.html +9 -1
  30. data/doc/top-level-namespace.html +2 -2
  31. data/lib/shep/entity_base.rb +6 -1
  32. data/lib/shep/exceptions.rb +5 -0
  33. data/lib/shep/session.rb +292 -146
  34. data/lib/shep/version.rb +4 -0
  35. data/lib/shep.rb +1 -1
  36. data/run_rake_test.example.sh +12 -5
  37. data/shep.gemspec +4 -2
  38. data/spec/session_reader_1_unauth_spec.rb +20 -17
  39. data/spec/session_reader_2_auth_spec.rb +17 -19
  40. data/spec/session_writer_spec.rb +4 -11
  41. data/spec/session_zzz_tricky_spec.rb +136 -0
  42. data/spec/spec_helper.rb +12 -3
  43. metadata +12 -9
@@ -101,26 +101,81 @@
101
101
 
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
-
105
- <p>Represents a connection to a Mastodon (or equivalent) server.</p>
104
+ <p>Represents a connection to a Mastodon (or equivalent) server.</p>
105
+
106
+ <h2 id="conventions">Conventions</h2>
106
107
 
107
- <h2 id="label-Conventions">Conventions</h2>
108
+ <p><code>fetch_*</code> methods retrieve a single Mastodon object, an <code>Entity</code>
109
+ subinstance.</p>
108
110
 
109
- <p><code>fetch_*</code> methods retrieve a single Mastodon object, an <code>Entity</code> subinstance.</p>
111
+ <p><code>each_*</code> methods retrieve multiple objects, also <code>Entity</code>
112
+ subinstances. If called with a block, the block is evaluated on
113
+ each item in turn and the block&#39;s result is ignored. Otherwise,
114
+ it returns an <code>Enumerator</code> which can be used in the usual ways.</p>
110
115
 
111
- <p><code>each_*</code> methods retrieve multiple objects, also <code>Entity</code> subinstances. If called with a block, the block is evaluated on each item in turn and the block’s result is ignored. Otherwise, it returns an <code>Enumerator</code> which can be used in the usual ways.</p>
116
+ <p>Some examples:</p>
112
117
 
113
- <p><code>each_*</code> will automatically paginate through the available items; for example,</p>
118
+ <pre class="code ruby"><code class="ruby"> <span class='comment'># Evaluate a block on each status
119
+ </span> <span class='id identifier rubyid_session'>session</span><span class='period'>.</span><span class='id identifier rubyid_each_status'>each_status</span><span class='lparen'>(</span><span class='id identifier rubyid_account'>account</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_status'>status</span><span class='op'>|</span> <span class='id identifier rubyid_do_thing'>do_thing</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
114
120
 
115
- <pre class="code ruby"><code class="ruby"> <span class='id identifier rubyid_statuses'>statuses</span> <span class='op'>=</span> <span class='id identifier rubyid_session'>session</span><span class='period'>.</span><span class='id identifier rubyid_each_public_status'>each_public_status</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
121
+ <span class='comment'># Retrieve the last 100 statuses in an array
122
+ </span> <span class='id identifier rubyid_statuses'>statuses</span> <span class='op'>=</span> <span class='id identifier rubyid_session'>session</span><span class='period'>.</span><span class='id identifier rubyid_each_status'>each_status</span><span class='lparen'>(</span><span class='id identifier rubyid_account'>account</span><span class='comma'>,</span> <span class='label'>limit:</span> <span class='int'>100</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
123
+
124
+ <span class='comment'># Retrieve the last 200 statuses via an enumerator and do
125
+ </span> <span class='comment'># extra transformation on the result before collecting
126
+ </span> <span class='comment'># them in an array.
127
+ </span> <span class='id identifier rubyid_statuses'>statuses</span> <span class='op'>=</span> <span class='id identifier rubyid_session'>session</span><span class='period'>.</span><span class='id identifier rubyid_each_status'>each_status</span><span class='lparen'>(</span><span class='id identifier rubyid_account'>account</span><span class='comma'>,</span> <span class='label'>limit:</span> <span class='int'>200</span><span class='rparen'>)</span>
128
+ <span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_status'>status</span><span class='op'>|</span> <span class='const'>BESTIES</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_account'>account</span><span class='period'>.</span><span class='id identifier rubyid_username'>username</span> <span class='rbrace'>}</span>
129
+ <span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_status'>status</span><span class='op'>|</span> <span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbrace'>}</span>
130
+ <span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
116
131
  </code></pre>
117
132
 
118
- <p>will retrieve the server’s entire public timeline and put it in an array. (Note: don’t do this.) The <code>limit:</code> keyword option will set an upper limit on the number of items retrieved (but note that the method may retrieve more from the API endpoint).</p>
133
+ <p>The actual web API &quot;paginates&quot; the output. That is, it returns
134
+ the first 40 (or so) items and then provides a link to the next
135
+ chunk. Shep&#39;s <code>each_*</code> methods handle this for you automatically.
136
+ This means that unless you use <code>limit:</code>, the <code>each_*</code> methods will
137
+ retrieve <strong>all</strong> available items, at least until you reach the
138
+ rate limit (see below).</p>
139
+
140
+ <p>Note that it is safe to leave an <code>each_*</code> methods block with
141
+ <code>break</code>, <code>return</code>, an exception, or any other such mechanism.</p>
119
142
 
120
- <p>The remaining Mastodon API methods will in some way modify the state of the server and return an Entity subinstance on success.</p>
143
+ <p>The remaining Mastodon API methods will in some way modify the
144
+ state of the server and return an Entity subinstance on success.</p>
121
145
 
122
146
  <p>All API calls throw an exception on failure.</p>
123
147
 
148
+ <h2 id="rate-limits">Rate Limits</h2>
149
+
150
+ <p>Mastodon servers restrict the number of times you can use a
151
+ specific endpoint within a time period as a way to prevent abuse.
152
+ Shep provides several tools for handling these limits gracefully.</p>
153
+
154
+ <ol>
155
+ <li><p>The method <span class='object_link'><a href="#rate_limit-instance_method" title="Shep::Session#rate_limit (method)">#rate_limit</a></span> will return a Struct that tells you how
156
+ many requests you have left and when the count is reset.</p></li>
157
+ <li><p>If a rate limit is exceeded, the method will throw an
158
+ <span class='object_link'><a href="Error/RateLimit.html" title="Shep::Error::RateLimit (class)">Error::RateLimit</a></span> exception instead of an ordinary
159
+ <span class='object_link'><a href="Error/Http.html" title="Shep::Error::Http (class)">Error::Http</a></span> exception.</p></li>
160
+ <li><p>If the Session is created with argument <code>rate_limit_retry:</code> set
161
+ to true, the Session will instead wait out the reset time and
162
+ try again.</p></li>
163
+ </ol>
164
+
165
+ <p>If you enable the wait-and-retry mechanism, you can also provide a
166
+ hook function (i.e. a thing that responds to <code>call</code>) via
167
+ constructor argument <code>retry_hook:</code>. This is called with one
168
+ argument, the result of <span class='object_link'><a href="#rate_limit-instance_method" title="Shep::Session#rate_limit (method)">#rate_limit</a></span> for the limited API endpoint,
169
+ immediately before Shep starts waiting for the limit to reset.</p>
170
+
171
+ <p>The built-in wait time takes the callback&#39;s execution time into
172
+ account so it&#39;s possible to use the callback to do your own
173
+ waiting and use that time more productively.</p>
174
+
175
+ <p>Alternately, all of the <code>each_*</code> methods have a <code>limit:</code> parameter
176
+ so it&#39;s easy to avoid making too many API calls and many have a
177
+ <code>max_id:</code> parameter that allows you to continue where you left off.</p>
178
+
124
179
 
125
180
  </div>
126
181
  </div>
@@ -156,8 +211,7 @@
156
211
 
157
212
 
158
213
 
159
- <span class="summary_desc"><div class='inline'>
160
- <p>The Server’s hostname.</p>
214
+ <span class="summary_desc"><div class='inline'><p>The Server&#39;s hostname.</p>
161
215
  </div></span>
162
216
 
163
217
  </li>
@@ -185,8 +239,35 @@
185
239
 
186
240
 
187
241
 
188
- <span class="summary_desc"><div class='inline'>
189
- <p>The logger object.</p>
242
+ <span class="summary_desc"><div class='inline'><p>The logger object.</p>
243
+ </div></span>
244
+
245
+ </li>
246
+
247
+
248
+ <li class="public ">
249
+ <span class="summary_signature">
250
+
251
+ <a href="#user_agent-instance_method" title="#user_agent (instance method)">#<strong>user_agent</strong> &#x21d2; String </a>
252
+
253
+
254
+
255
+ </span>
256
+
257
+
258
+
259
+
260
+ <span class="note title readonly">readonly</span>
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+ <span class="summary_desc"><div class='inline'><p>User-Agent string; frozen.</p>
190
271
  </div></span>
191
272
 
192
273
  </li>
@@ -222,8 +303,7 @@
222
303
 
223
304
 
224
305
 
225
- <span class="summary_desc"><div class='inline'>
226
- <p>Delete the status at ID.</p>
306
+ <span class="summary_desc"><div class='inline'><p>Delete the status at ID.</p>
227
307
  </div></span>
228
308
 
229
309
  </li>
@@ -246,8 +326,7 @@
246
326
 
247
327
 
248
328
 
249
- <span class="summary_desc"><div class='inline'>
250
- <p>Dismiss the notification with the given ID.</p>
329
+ <span class="summary_desc"><div class='inline'><p>Dismiss the notification with the given ID.</p>
251
330
  </div></span>
252
331
 
253
332
  </li>
@@ -270,8 +349,7 @@
270
349
 
271
350
 
272
351
 
273
- <span class="summary_desc"><div class='inline'>
274
- <p>Retrieve each Entity::Account that boosted the given status.</p>
352
+ <span class="summary_desc"><div class='inline'><p>Retrieve each Entity::Account that boosted the given status.</p>
275
353
  </div></span>
276
354
 
277
355
  </li>
@@ -294,8 +372,7 @@
294
372
 
295
373
 
296
374
 
297
- <span class="summary_desc"><div class='inline'>
298
- <p>Retrieve each account that favourited the given status.</p>
375
+ <span class="summary_desc"><div class='inline'><p>Retrieve each account that favourited the given status.</p>
299
376
  </div></span>
300
377
 
301
378
  </li>
@@ -318,8 +395,7 @@
318
395
 
319
396
 
320
397
 
321
- <span class="summary_desc"><div class='inline'>
322
- <p>Retrieve the follower list of an account.</p>
398
+ <span class="summary_desc"><div class='inline'><p>Retrieve the follower list of an account.</p>
323
399
  </div></span>
324
400
 
325
401
  </li>
@@ -342,8 +418,7 @@
342
418
 
343
419
 
344
420
 
345
- <span class="summary_desc"><div class='inline'>
346
- <p>Retrieve the list of accounts this account follows.</p>
421
+ <span class="summary_desc"><div class='inline'><p>Retrieve the list of accounts this account follows.</p>
347
422
  </div></span>
348
423
 
349
424
  </li>
@@ -352,7 +427,7 @@
352
427
  <li class="public ">
353
428
  <span class="summary_signature">
354
429
 
355
- <a href="#each_home_status-instance_method" title="#each_home_status (instance method)">#<strong>each_home_status</strong>(limit: nil, local: false, remote: false, only_media: false) {|item| ... } &#x21d2; Enumerator </a>
430
+ <a href="#each_home_status-instance_method" title="#each_home_status (instance method)">#<strong>each_home_status</strong>(limit: nil, local: false, max_id: &quot;&quot;, remote: false, only_media: false) {|item| ... } &#x21d2; Enumerator </a>
356
431
 
357
432
 
358
433
 
@@ -366,8 +441,7 @@
366
441
 
367
442
 
368
443
 
369
- <span class="summary_desc"><div class='inline'>
370
- <p>Retrieve each Entity::Status in the home timeline.</p>
444
+ <span class="summary_desc"><div class='inline'><p>Retrieve each Entity::Status in the home timeline.</p>
371
445
  </div></span>
372
446
 
373
447
  </li>
@@ -390,8 +464,7 @@
390
464
 
391
465
 
392
466
 
393
- <span class="summary_desc"><div class='inline'>
394
- <p>Retrieve each notification.</p>
467
+ <span class="summary_desc"><div class='inline'><p>Retrieve each notification.</p>
395
468
  </div></span>
396
469
 
397
470
  </li>
@@ -400,7 +473,7 @@
400
473
  <li class="public ">
401
474
  <span class="summary_signature">
402
475
 
403
- <a href="#each_public_status-instance_method" title="#each_public_status (instance method)">#<strong>each_public_status</strong>(limit: nil, local: false, remote: false, only_media: false) {|item| ... } &#x21d2; Enumerator </a>
476
+ <a href="#each_public_status-instance_method" title="#each_public_status (instance method)">#<strong>each_public_status</strong>(limit: nil, max_id: &quot;&quot;, local: false, remote: false, only_media: false) {|item| ... } &#x21d2; Enumerator </a>
404
477
 
405
478
 
406
479
 
@@ -414,8 +487,7 @@
414
487
 
415
488
 
416
489
 
417
- <span class="summary_desc"><div class='inline'>
418
- <p>Retrieve the instance’s public timeline(s).</p>
490
+ <span class="summary_desc"><div class='inline'><p>Retrieve the instance&#39;s public timeline(s).</p>
419
491
  </div></span>
420
492
 
421
493
  </li>
@@ -424,7 +496,7 @@
424
496
  <li class="public ">
425
497
  <span class="summary_signature">
426
498
 
427
- <a href="#each_status-instance_method" title="#each_status (instance method)">#<strong>each_status</strong>(account_id, limit: nil, only_media: false, exclude_replies: false, exclude_reblogs: false, pinned: false, tagged: nil) {|item| ... } &#x21d2; Enumerator </a>
499
+ <a href="#each_status-instance_method" title="#each_status (instance method)">#<strong>each_status</strong>(account_id, limit: nil, max_id: &quot;&quot;, only_media: false, exclude_replies: false, exclude_reblogs: false, pinned: false, tagged: nil) {|item| ... } &#x21d2; Enumerator </a>
428
500
 
429
501
 
430
502
 
@@ -438,8 +510,7 @@
438
510
 
439
511
 
440
512
 
441
- <span class="summary_desc"><div class='inline'>
442
- <p>Retrieve the account’s statuses.</p>
513
+ <span class="summary_desc"><div class='inline'><p>Retrieve the account&#39;s statuses.</p>
443
514
  </div></span>
444
515
 
445
516
  </li>
@@ -448,7 +519,7 @@
448
519
  <li class="public ">
449
520
  <span class="summary_signature">
450
521
 
451
- <a href="#each_tag_status-instance_method" title="#each_tag_status (instance method)">#<strong>each_tag_status</strong>(hashtag_s, limit: nil, local: false, remote: false, only_media: false, all: [], none: []) {|item| ... } &#x21d2; Enumerator </a>
522
+ <a href="#each_tag_status-instance_method" title="#each_tag_status (instance method)">#<strong>each_tag_status</strong>(hashtag_s, limit: nil, max_id: &quot;&quot;, local: false, remote: false, only_media: false, all: [], none: []) {|item| ... } &#x21d2; Enumerator </a>
452
523
 
453
524
 
454
525
 
@@ -462,8 +533,7 @@
462
533
 
463
534
 
464
535
 
465
- <span class="summary_desc"><div class='inline'>
466
- <p>Retrieve a tag’s timeline.</p>
536
+ <span class="summary_desc"><div class='inline'><p>Retrieve a tag&#39;s timeline.</p>
467
537
  </div></span>
468
538
 
469
539
  </li>
@@ -486,8 +556,7 @@
486
556
 
487
557
 
488
558
 
489
- <span class="summary_desc"><div class='inline'>
490
- <p>Update the status with the given Id.</p>
559
+ <span class="summary_desc"><div class='inline'><p>Update the status with the given Id.</p>
491
560
  </div></span>
492
561
 
493
562
  </li>
@@ -510,8 +579,7 @@
510
579
 
511
580
 
512
581
 
513
- <span class="summary_desc"><div class='inline'>
514
- <p>Fetch user details by ID.</p>
582
+ <span class="summary_desc"><div class='inline'><p>Fetch user details by ID.</p>
515
583
  </div></span>
516
584
 
517
585
  </li>
@@ -520,7 +588,7 @@
520
588
  <li class="public ">
521
589
  <span class="summary_signature">
522
590
 
523
- <a href="#fetch_account_by_username-instance_method" title="#fetch_account_by_username (instance method)">#<strong>fetch_account_by_username</strong>(handle) &#x21d2; Entity::Account </a>
591
+ <a href="#fetch_account_by_username-instance_method" title="#fetch_account_by_username (instance method)">#<strong>fetch_account_by_username</strong>(handle) &#x21d2; Entity::Account<sup>?</sup> </a>
524
592
 
525
593
 
526
594
 
@@ -534,8 +602,7 @@
534
602
 
535
603
 
536
604
 
537
- <span class="summary_desc"><div class='inline'>
538
- <p>Fetch user details by username.</p>
605
+ <span class="summary_desc"><div class='inline'><p>Fetch user details by username.</p>
539
606
  </div></span>
540
607
 
541
608
  </li>
@@ -558,8 +625,7 @@
558
625
 
559
626
 
560
627
 
561
- <span class="summary_desc"><div class='inline'>
562
- <p>Fetch the context (parent and child status) of status at ‘id’.</p>
628
+ <span class="summary_desc"><div class='inline'><p>Fetch the context (parent and child status) of status at &#39;id&#39;.</p>
563
629
  </div></span>
564
630
 
565
631
  </li>
@@ -582,8 +648,7 @@
582
648
 
583
649
 
584
650
 
585
- <span class="summary_desc"><div class='inline'>
586
- <p>Fetch an individual notification by ID.</p>
651
+ <span class="summary_desc"><div class='inline'><p>Fetch an individual notification by ID.</p>
587
652
  </div></span>
588
653
 
589
654
  </li>
@@ -606,8 +671,7 @@
606
671
 
607
672
 
608
673
 
609
- <span class="summary_desc"><div class='inline'>
610
- <p>Fetch a single status.</p>
674
+ <span class="summary_desc"><div class='inline'><p>Fetch a single status.</p>
611
675
  </div></span>
612
676
 
613
677
  </li>
@@ -630,8 +694,7 @@
630
694
 
631
695
 
632
696
 
633
- <span class="summary_desc"><div class='inline'>
634
- <p>Fetch the editable source of status at id.</p>
697
+ <span class="summary_desc"><div class='inline'><p>Fetch the editable source of status at id.</p>
635
698
  </div></span>
636
699
 
637
700
  </li>
@@ -654,8 +717,7 @@
654
717
 
655
718
 
656
719
 
657
- <span class="summary_desc"><div class='inline'>
658
- <p>Fetch the given status and also any attached media.</p>
720
+ <span class="summary_desc"><div class='inline'><p>Fetch the given status and also any attached media.</p>
659
721
  </div></span>
660
722
 
661
723
  </li>
@@ -664,7 +726,7 @@
664
726
  <li class="public ">
665
727
  <span class="summary_signature">
666
728
 
667
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(host:, token: nil, logger: nil, debug_http: false) &#x21d2; Session </a>
729
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(host:, token: nil, user_agent: &quot;ShepRubyGem/#{Shep::Version}&quot;, ua_comment: nil, rate_limit_retry: false, retry_hook: nil, logger: nil, debug_http: false) &#x21d2; Session </a>
668
730
 
669
731
 
670
732
 
@@ -680,8 +742,7 @@
680
742
 
681
743
 
682
744
 
683
- <span class="summary_desc"><div class='inline'>
684
- <p>Initialize a new <span class='object_link'><a href="" title="Shep::Session (class)">Session</a></span>.</p>
745
+ <span class="summary_desc"><div class='inline'><p>Initialize a new <span class='object_link'><a href="" title="Shep::Session (class)">Session</a></span>.</p>
685
746
  </div></span>
686
747
 
687
748
  </li>
@@ -690,7 +751,7 @@
690
751
  <li class="public ">
691
752
  <span class="summary_signature">
692
753
 
693
- <a href="#post_status-instance_method" title="#post_status (instance method)">#<strong>post_status</strong>(text, visibility: :private, media_ids: [], spoiler_text: &quot;&quot;, language: &quot;&quot;) &#x21d2; Object </a>
754
+ <a href="#post_status-instance_method" title="#post_status (instance method)">#<strong>post_status</strong>(text, visibility: :private, media_ids: [], spoiler_text: &quot;&quot;, language: &quot;&quot;) &#x21d2; Entity::Status </a>
694
755
 
695
756
 
696
757
 
@@ -704,8 +765,7 @@
704
765
 
705
766
 
706
767
 
707
- <span class="summary_desc"><div class='inline'>
708
- <p>Post a status containing the given text at the specified visibility with zero or more media attachments.</p>
768
+ <span class="summary_desc"><div class='inline'><p>Post a status containing the given text at the specified visibility with zero or more media attachments.</p>
709
769
  </div></span>
710
770
 
711
771
  </li>
@@ -728,8 +788,7 @@
728
788
 
729
789
 
730
790
 
731
- <span class="summary_desc"><div class='inline'>
732
- <p>Return the rate limit information as of the last operation.</p>
791
+ <span class="summary_desc"><div class='inline'><p>Return the rate limit information from the last REST request.</p>
733
792
  </div></span>
734
793
 
735
794
  </li>
@@ -752,8 +811,7 @@
752
811
 
753
812
 
754
813
 
755
- <span class="summary_desc"><div class='inline'>
756
- <p>Return a human-readable summary of the rate limit.</p>
814
+ <span class="summary_desc"><div class='inline'><p>Return a human-readable summary of the rate limit.</p>
757
815
  </div></span>
758
816
 
759
817
  </li>
@@ -776,8 +834,7 @@
776
834
 
777
835
 
778
836
 
779
- <span class="summary_desc"><div class='inline'>
780
- <p>Upload the media contained in the file at ‘path’.</p>
837
+ <span class="summary_desc"><div class='inline'><p>Upload the media contained in the file at &#39;path&#39;.</p>
781
838
  </div></span>
782
839
 
783
840
  </li>
@@ -800,8 +857,7 @@
800
857
 
801
858
 
802
859
 
803
- <span class="summary_desc"><div class='inline'>
804
- <p>Return the Entity::Account object for the token we’re using.</p>
860
+ <span class="summary_desc"><div class='inline'><p>Return the Entity::Account object for the token we&#39;re using.</p>
805
861
  </div></span>
806
862
 
807
863
  </li>
@@ -816,7 +872,7 @@
816
872
  <div class="method_details first">
817
873
  <h3 class="signature first" id="initialize-instance_method">
818
874
 
819
- #<strong>initialize</strong>(host:, token: nil, logger: nil, debug_http: false) &#x21d2; <tt><span class='object_link'><a href="" title="Shep::Session (class)">Session</a></span></tt>
875
+ #<strong>initialize</strong>(host:, token: nil, user_agent: &quot;ShepRubyGem/#{Shep::Version}&quot;, ua_comment: nil, rate_limit_retry: false, retry_hook: nil, logger: nil, debug_http: false) &#x21d2; <tt><span class='object_link'><a href="" title="Shep::Session (class)">Session</a></span></tt>
820
876
 
821
877
 
822
878
 
@@ -824,12 +880,27 @@
824
880
 
825
881
  </h3><div class="docstring">
826
882
  <div class="discussion">
827
-
828
- <p>Initialize a new <span class='object_link'><a href="" title="Shep::Session (class)">Shep::Session</a></span>.</p>
883
+ <p>Initialize a new <span class='object_link'><a href="" title="Shep::Session (class)">Shep::Session</a></span>.</p>
884
+
885
+ <p>By default, the User-Agent header is set to the gem&#39;s
886
+ identifier, but may be overridden with the <code>user_agent</code>
887
+ parameter. It is your responsibility to make sure it is
888
+ formatted correctly. You can also append comment text to the
889
+ given User-Agent string with <code>ua_comment</code>; this lets you add a
890
+ comment to the default text.</p>
891
+
892
+ <p>Parameter <code>logger</code> may be a <code>Logger</code> object, <code>nil</code>, or a
893
+ <code>Symbol</code> whose value is the name of one of the supported log
894
+ levels. In the latter case, a new Logger is created and set to
895
+ that level. If <code>nil</code> is given, a dummy <code>Logger</code> is created and
896
+ used.</p>
829
897
 
830
- <p>Parameter <code>logger</code> may be a <code>Logger</code> object, <code>nil</code>, or a <code>Symbol</code> whose value is the name of one of the supported log levels. In the latter case, a new Logger is created and set to that level. If <code>nil</code> is given, a dummy <code>Logger</code> is created and used.</p>
898
+ <p>If <code>debug_http</code> is true, compression is disabled and the
899
+ transactions are sent to <code>STDERR</code> via
900
+ <code>Net::HTTP.set_debug_output</code>.</p>
831
901
 
832
- <p>If <code>debug_http</code> is true, compression is disabled and the transactions are sent to <code>STDERR</code> via <code>Net::HTTP.set_debug_output</code>. <strong>WARNING:</strong> this opens a serious security hole and should not be used in production.</p>
902
+ <p><strong>WARNING:</strong> this opens a serious security hole and should not
903
+ be used in production.</p>
833
904
 
834
905
 
835
906
  </div>
@@ -848,8 +919,7 @@
848
919
 
849
920
 
850
921
  &mdash;
851
- <div class='inline'>
852
- <p>Hostname of the server</p>
922
+ <div class='inline'><p>Hostname of the server</p>
853
923
  </div>
854
924
 
855
925
  </li>
@@ -866,8 +936,79 @@
866
936
 
867
937
 
868
938
  &mdash;
869
- <div class='inline'>
870
- <p>Bearer token; optional</p>
939
+ <div class='inline'><p>Bearer token; optional</p>
940
+ </div>
941
+
942
+ </li>
943
+
944
+ <li>
945
+
946
+ <span class='name'>user_agent</span>
947
+
948
+
949
+ <span class='type'>(<tt>String</tt>)</span>
950
+
951
+
952
+ <em class="default">(defaults to: <tt>&quot;ShepRubyGem/#{Shep::Version}&quot;</tt>)</em>
953
+
954
+
955
+ &mdash;
956
+ <div class='inline'><p>User-Agent string to use</p>
957
+ </div>
958
+
959
+ </li>
960
+
961
+ <li>
962
+
963
+ <span class='name'>ua_comment</span>
964
+
965
+
966
+ <span class='type'>(<tt>String</tt>)</span>
967
+
968
+
969
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
970
+
971
+
972
+ &mdash;
973
+ <div class='inline'><p>Comment part of User-Agent string</p>
974
+ </div>
975
+
976
+ </li>
977
+
978
+ <li>
979
+
980
+ <span class='name'>rate_limit_retry</span>
981
+
982
+
983
+ <span class='type'>(<tt>Boolean</tt>)</span>
984
+
985
+
986
+ <em class="default">(defaults to: <tt>false</tt>)</em>
987
+
988
+
989
+ &mdash;
990
+ <div class='inline'><p>Handle request limits by waiting
991
+ for the count to reset and trying
992
+ again.</p>
993
+ </div>
994
+
995
+ </li>
996
+
997
+ <li>
998
+
999
+ <span class='name'>retry_hook</span>
1000
+
1001
+
1002
+ <span class='type'>(<tt>Proc</tt>)</span>
1003
+
1004
+
1005
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1006
+
1007
+
1008
+ &mdash;
1009
+ <div class='inline'><p>One-argument hook function to call
1010
+ before waiting for the rate limit
1011
+ to reset</p>
871
1012
  </div>
872
1013
 
873
1014
  </li>
@@ -884,8 +1025,7 @@
884
1025
 
885
1026
 
886
1027
  &mdash;
887
- <div class='inline'>
888
- <p>The logger or mode; optional</p>
1028
+ <div class='inline'><p>The logger or mode; optional</p>
889
1029
  </div>
890
1030
 
891
1031
  </li>
@@ -902,14 +1042,27 @@
902
1042
 
903
1043
 
904
1044
  &mdash;
905
- <div class='inline'>
906
- <p>Enable <code>Net::HTTP</code> debugging; insecure!</p>
1045
+ <div class='inline'><p>Enable <code>Net::HTTP</code> debugging;
1046
+ <strong>insecure!</strong></p>
907
1047
  </div>
908
1048
 
909
1049
  </li>
910
1050
 
911
1051
  </ul>
912
1052
 
1053
+ <p class="tag_title">Raises:</p>
1054
+ <ul class="raise">
1055
+
1056
+ <li>
1057
+
1058
+
1059
+ <span class='type'>(<tt><span class='object_link'><a href="Error/Caller.html" title="Shep::Error::Caller (class)">Error::Caller</a></span></tt>)</span>
1060
+
1061
+
1062
+
1063
+ </li>
1064
+
1065
+ </ul>
913
1066
 
914
1067
  </div><table class="source_code">
915
1068
  <tr>
@@ -917,29 +1070,65 @@
917
1070
  <pre class="lines">
918
1071
 
919
1072
 
920
- 61
921
- 62
922
- 63
923
- 64
924
- 65
925
- 66
926
- 67
927
- 68
928
- 69
929
- 70</pre>
1073
+ 132
1074
+ 133
1075
+ 134
1076
+ 135
1077
+ 136
1078
+ 137
1079
+ 138
1080
+ 139
1081
+ 140
1082
+ 141
1083
+ 142
1084
+ 143
1085
+ 144
1086
+ 145
1087
+ 146
1088
+ 147
1089
+ 148
1090
+ 149
1091
+ 150
1092
+ 151
1093
+ 152
1094
+ 153
1095
+ 154
1096
+ 155
1097
+ 156
1098
+ 157
1099
+ 158
1100
+ 159</pre>
930
1101
  </td>
931
1102
  <td>
932
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 61</span>
1103
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 132</span>
933
1104
 
934
1105
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>host:</span><span class='comma'>,</span>
935
- <span class='label'>token:</span> <span class='kw'>nil</span><span class='comma'>,</span>
936
- <span class='label'>logger:</span> <span class='kw'>nil</span><span class='comma'>,</span>
937
- <span class='label'>debug_http:</span> <span class='kw'>false</span><span class='rparen'>)</span>
1106
+ <span class='label'>token:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1107
+ <span class='label'>user_agent:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ShepRubyGem/</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="../Shep.html" title="Shep (module)">Shep</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Shep.html#Version-constant" title="Shep::Version (constant)">Version</a></span></span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
1108
+ <span class='label'>ua_comment:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1109
+
1110
+ <span class='label'>rate_limit_retry:</span> <span class='kw'>false</span><span class='comma'>,</span>
1111
+ <span class='label'>retry_hook:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1112
+
1113
+ <span class='label'>logger:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1114
+ <span class='label'>debug_http:</span> <span class='kw'>false</span><span class='rparen'>)</span>
938
1115
  <span class='ivar'>@host</span> <span class='op'>=</span> <span class='id identifier rubyid_host'>host</span>
939
1116
  <span class='ivar'>@token</span> <span class='op'>=</span> <span class='id identifier rubyid_token'>token</span>
940
1117
  <span class='ivar'>@logger</span> <span class='op'>=</span> <span class='id identifier rubyid_init_logger'>init_logger</span><span class='lparen'>(</span><span class='id identifier rubyid_logger'>logger</span><span class='rparen'>)</span>
941
- <span class='ivar'>@rate_limit</span> <span class='op'>=</span> <span class='const'>Struct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:limit</span><span class='comma'>,</span> <span class='symbol'>:remaining</span><span class='comma'>,</span> <span class='symbol'>:reset</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1118
+
1119
+ <span class='ivar'>@user_agent</span> <span class='op'>=</span> <span class='id identifier rubyid_user_agent'>user_agent</span>
1120
+ <span class='ivar'>@user_agent</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ua_comment'>ua_comment</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_ua_comment'>ua_comment</span>
1121
+ <span class='ivar'>@user_agent</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span>
1122
+
1123
+ <span class='ivar'>@rate_limit_retry</span> <span class='op'>=</span> <span class='id identifier rubyid_rate_limit_retry'>rate_limit_retry</span>
1124
+ <span class='ivar'>@retry_hook</span> <span class='op'>=</span> <span class='id identifier rubyid_retry_hook'>retry_hook</span>
1125
+
942
1126
  <span class='ivar'>@debug_http</span> <span class='op'>=</span> <span class='id identifier rubyid_debug_http'>debug_http</span>
1127
+
1128
+ <span class='ivar'>@rate_limit</span> <span class='op'>=</span> <span class='const'>Struct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:limit</span><span class='comma'>,</span> <span class='symbol'>:remaining</span><span class='comma'>,</span> <span class='symbol'>:reset</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1129
+
1130
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="Error.html" title="Shep::Error (class)">Error</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Error/Caller.html" title="Shep::Error::Caller (class)">Caller</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>retry_hook: must a callable or nil</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span>
1131
+ <span class='ivar'>@retry_hook</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='op'>||</span> <span class='ivar'>@retry_hook</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:call</span><span class='rparen'>)</span>
943
1132
  <span class='kw'>end</span></pre>
944
1133
  </td>
945
1134
  </tr>
@@ -964,8 +1153,7 @@
964
1153
 
965
1154
  </h3><div class="docstring">
966
1155
  <div class="discussion">
967
-
968
- <p>The Server’s hostname</p>
1156
+ <p>The Server&#39;s hostname</p>
969
1157
 
970
1158
 
971
1159
  </div>
@@ -983,8 +1171,7 @@
983
1171
 
984
1172
 
985
1173
  &mdash;
986
- <div class='inline'>
987
- <p>the current value of host</p>
1174
+ <div class='inline'><p>the current value of host</p>
988
1175
  </div>
989
1176
 
990
1177
  </li>
@@ -997,12 +1184,12 @@
997
1184
  <pre class="lines">
998
1185
 
999
1186
 
1000
- 41
1001
- 42
1002
- 43</pre>
1187
+ 90
1188
+ 91
1189
+ 92</pre>
1003
1190
  </td>
1004
1191
  <td>
1005
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 41</span>
1192
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 90</span>
1006
1193
 
1007
1194
  <span class='kw'>def</span> <span class='id identifier rubyid_host'>host</span>
1008
1195
  <span class='ivar'>@host</span>
@@ -1025,8 +1212,7 @@
1025
1212
 
1026
1213
  </h3><div class="docstring">
1027
1214
  <div class="discussion">
1028
-
1029
- <p>The logger object</p>
1215
+ <p>The logger object</p>
1030
1216
 
1031
1217
 
1032
1218
  </div>
@@ -1044,8 +1230,7 @@
1044
1230
 
1045
1231
 
1046
1232
  &mdash;
1047
- <div class='inline'>
1048
- <p>the current value of logger</p>
1233
+ <div class='inline'><p>the current value of logger</p>
1049
1234
  </div>
1050
1235
 
1051
1236
  </li>
@@ -1058,12 +1243,12 @@
1058
1243
  <pre class="lines">
1059
1244
 
1060
1245
 
1061
- 41
1062
- 42
1063
- 43</pre>
1246
+ 90
1247
+ 91
1248
+ 92</pre>
1064
1249
  </td>
1065
1250
  <td>
1066
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 41</span>
1251
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 90</span>
1067
1252
 
1068
1253
  <span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
1069
1254
  <span class='ivar'>@logger</span>
@@ -1073,6 +1258,65 @@
1073
1258
  </table>
1074
1259
  </div>
1075
1260
 
1261
+
1262
+ <span id=""></span>
1263
+ <div class="method_details ">
1264
+ <h3 class="signature " id="user_agent-instance_method">
1265
+
1266
+ #<strong>user_agent</strong> &#x21d2; <tt>String</tt> <span class="extras">(readonly)</span>
1267
+
1268
+
1269
+
1270
+
1271
+
1272
+ </h3><div class="docstring">
1273
+ <div class="discussion">
1274
+ <p>User-Agent string; frozen</p>
1275
+
1276
+
1277
+ </div>
1278
+ </div>
1279
+ <div class="tags">
1280
+
1281
+ <p class="tag_title">Returns:</p>
1282
+ <ul class="return">
1283
+
1284
+ <li>
1285
+
1286
+
1287
+ <span class='type'>(<tt>String</tt>)</span>
1288
+
1289
+
1290
+
1291
+ &mdash;
1292
+ <div class='inline'><p>the current value of user_agent</p>
1293
+ </div>
1294
+
1295
+ </li>
1296
+
1297
+ </ul>
1298
+
1299
+ </div><table class="source_code">
1300
+ <tr>
1301
+ <td>
1302
+ <pre class="lines">
1303
+
1304
+
1305
+ 90
1306
+ 91
1307
+ 92</pre>
1308
+ </td>
1309
+ <td>
1310
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 90</span>
1311
+
1312
+ <span class='kw'>def</span> <span class='id identifier rubyid_user_agent'>user_agent</span>
1313
+ <span class='ivar'>@user_agent</span>
1314
+ <span class='kw'>end</span></pre>
1315
+ </td>
1316
+ </tr>
1317
+ </table>
1318
+ </div>
1319
+
1076
1320
  </div>
1077
1321
 
1078
1322
 
@@ -1091,8 +1335,7 @@
1091
1335
 
1092
1336
  </h3><div class="docstring">
1093
1337
  <div class="discussion">
1094
-
1095
- <p>Delete the status at ID.</p>
1338
+ <p>Delete the status at ID.</p>
1096
1339
 
1097
1340
 
1098
1341
  </div>
@@ -1110,8 +1353,7 @@
1110
1353
 
1111
1354
 
1112
1355
  &mdash;
1113
- <div class='inline'>
1114
- <p>the deleted status</p>
1356
+ <div class='inline'><p>the deleted status</p>
1115
1357
  </div>
1116
1358
 
1117
1359
  </li>
@@ -1131,10 +1373,10 @@
1131
1373
  <pre class="lines">
1132
1374
 
1133
1375
 
1134
- 657</pre>
1376
+ 789</pre>
1135
1377
  </td>
1136
1378
  <td>
1137
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 657</span>
1379
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 789</span>
1138
1380
 
1139
1381
  <span class='kw'>def</span> <span class='id identifier rubyid_delete_status'>delete_status</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_rest_delete'>rest_delete</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>statuses/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Entity.html" title="Shep::Entity (class)">Entity</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Status</a></span></span><span class='rparen'>)</span></pre>
1140
1382
  </td>
@@ -1153,10 +1395,11 @@
1153
1395
 
1154
1396
  </h3><div class="docstring">
1155
1397
  <div class="discussion">
1156
-
1157
- <p>Dismiss the notification with the given ID.</p>
1398
+ <p>Dismiss the notification with the given ID.</p>
1158
1399
 
1159
- <p>Warning: due to the complexity involved in repeatably sending a notification to an account, there is limited test coverage for this method.</p>
1400
+ <p>Warning: due to the complexity involved in repeatably sending a
1401
+ notification to an account, there is limited test coverage for
1402
+ this method.</p>
1160
1403
 
1161
1404
 
1162
1405
  </div>
@@ -1177,14 +1420,14 @@
1177
1420
  <pre class="lines">
1178
1421
 
1179
1422
 
1180
- 666
1181
- 667
1182
- 668
1183
- 669
1184
- 670</pre>
1423
+ 798
1424
+ 799
1425
+ 800
1426
+ 801
1427
+ 802</pre>
1185
1428
  </td>
1186
1429
  <td>
1187
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 666</span>
1430
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 798</span>
1188
1431
 
1189
1432
  <span class='kw'>def</span> <span class='id identifier rubyid_dismiss_notification'>dismiss_notification</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
1190
1433
  <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='id identifier rubyid_rest_uri'>rest_uri</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>notifications/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/dismiss</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
@@ -1207,8 +1450,7 @@
1207
1450
 
1208
1451
  </h3><div class="docstring">
1209
1452
  <div class="discussion">
1210
-
1211
- <p>Retrieve each Entity::Account that boosted the given status.</p>
1453
+ <p>Retrieve each Entity::Account that boosted the given status.</p>
1212
1454
 
1213
1455
 
1214
1456
  </div>
@@ -1229,8 +1471,7 @@
1229
1471
 
1230
1472
 
1231
1473
  &mdash;
1232
- <div class='inline'>
1233
- <p>Maximum number of items to retrieve</p>
1474
+ <div class='inline'><p>Maximum number of items to retrieve</p>
1234
1475
  </div>
1235
1476
 
1236
1477
  </li>
@@ -1276,8 +1517,7 @@
1276
1517
 
1277
1518
 
1278
1519
  &mdash;
1279
- <div class='inline'>
1280
- <p>if block is not given, otherwise self</p>
1520
+ <div class='inline'><p>if block is not given, otherwise self</p>
1281
1521
  </div>
1282
1522
 
1283
1523
  </li>
@@ -1297,16 +1537,16 @@
1297
1537
  <pre class="lines">
1298
1538
 
1299
1539
 
1300
- 460
1301
- 461
1302
- 462
1303
- 463
1304
- 464
1305
- 465
1306
- 466</pre>
1540
+ 574
1541
+ 575
1542
+ 576
1543
+ 577
1544
+ 578
1545
+ 579
1546
+ 580</pre>
1307
1547
  </td>
1308
1548
  <td>
1309
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 460</span>
1549
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 574</span>
1310
1550
 
1311
1551
  <span class='kw'>def</span> <span class='id identifier rubyid_each_boost_acct'>each_boost_acct</span><span class='lparen'>(</span><span class='id identifier rubyid_status_id'>status_id</span><span class='comma'>,</span>
1312
1552
  <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
@@ -1331,8 +1571,7 @@
1331
1571
 
1332
1572
  </h3><div class="docstring">
1333
1573
  <div class="discussion">
1334
-
1335
- <p>Retrieve each account that favourited the given status.</p>
1574
+ <p>Retrieve each account that favourited the given status.</p>
1336
1575
 
1337
1576
 
1338
1577
  </div>
@@ -1353,8 +1592,7 @@
1353
1592
 
1354
1593
 
1355
1594
  &mdash;
1356
- <div class='inline'>
1357
- <p>Maximum number of items to retrieve</p>
1595
+ <div class='inline'><p>Maximum number of items to retrieve</p>
1358
1596
  </div>
1359
1597
 
1360
1598
  </li>
@@ -1400,8 +1638,7 @@
1400
1638
 
1401
1639
 
1402
1640
  &mdash;
1403
- <div class='inline'>
1404
- <p>if block is not given, otherwise self</p>
1641
+ <div class='inline'><p>if block is not given, otherwise self</p>
1405
1642
  </div>
1406
1643
 
1407
1644
  </li>
@@ -1421,16 +1658,16 @@
1421
1658
  <pre class="lines">
1422
1659
 
1423
1660
 
1424
- 480
1425
- 481
1426
- 482
1427
- 483
1428
- 484
1429
- 485
1430
- 486</pre>
1661
+ 594
1662
+ 595
1663
+ 596
1664
+ 597
1665
+ 598
1666
+ 599
1667
+ 600</pre>
1431
1668
  </td>
1432
1669
  <td>
1433
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 480</span>
1670
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 594</span>
1434
1671
 
1435
1672
  <span class='kw'>def</span> <span class='id identifier rubyid_each_fave_acct'>each_fave_acct</span><span class='lparen'>(</span><span class='id identifier rubyid_status_id'>status_id</span><span class='comma'>,</span>
1436
1673
  <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
@@ -1455,8 +1692,7 @@
1455
1692
 
1456
1693
  </h3><div class="docstring">
1457
1694
  <div class="discussion">
1458
-
1459
- <p>Retrieve the follower list of an account.</p>
1695
+ <p>Retrieve the follower list of an account.</p>
1460
1696
 
1461
1697
  <p>As of Mastodon 4.0, no longer requires a token.</p>
1462
1698
 
@@ -1477,8 +1713,7 @@
1477
1713
 
1478
1714
 
1479
1715
  &mdash;
1480
- <div class='inline'>
1481
- <p>The account</p>
1716
+ <div class='inline'><p>The account</p>
1482
1717
  </div>
1483
1718
 
1484
1719
  </li>
@@ -1495,8 +1730,7 @@
1495
1730
 
1496
1731
 
1497
1732
  &mdash;
1498
- <div class='inline'>
1499
- <p>Maximum number of items to retrieve</p>
1733
+ <div class='inline'><p>Maximum number of items to retrieve</p>
1500
1734
  </div>
1501
1735
 
1502
1736
  </li>
@@ -1514,8 +1748,7 @@
1514
1748
 
1515
1749
 
1516
1750
  &mdash;
1517
- <div class='inline'>
1518
- <p>Optional; applied to each item</p>
1751
+ <div class='inline'><p>Optional; applied to each item</p>
1519
1752
  </div>
1520
1753
 
1521
1754
  </li>
@@ -1547,8 +1780,7 @@
1547
1780
 
1548
1781
 
1549
1782
  &mdash;
1550
- <div class='inline'>
1551
- <p>if block is not given, otherwise self</p>
1783
+ <div class='inline'><p>if block is not given, otherwise self</p>
1552
1784
  </div>
1553
1785
 
1554
1786
  </li>
@@ -1568,16 +1800,16 @@
1568
1800
  <pre class="lines">
1569
1801
 
1570
1802
 
1571
- 268
1572
- 269
1573
- 270
1574
- 271
1575
- 272
1576
- 273
1577
- 274</pre>
1803
+ 366
1804
+ 367
1805
+ 368
1806
+ 369
1807
+ 370
1808
+ 371
1809
+ 372</pre>
1578
1810
  </td>
1579
1811
  <td>
1580
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 268</span>
1812
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 366</span>
1581
1813
 
1582
1814
  <span class='kw'>def</span> <span class='id identifier rubyid_each_follower'>each_follower</span><span class='lparen'>(</span><span class='id identifier rubyid_account_id'>account_id</span><span class='comma'>,</span>
1583
1815
  <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
@@ -1602,8 +1834,7 @@
1602
1834
 
1603
1835
  </h3><div class="docstring">
1604
1836
  <div class="discussion">
1605
-
1606
- <p>Retrieve the list of accounts this account follows</p>
1837
+ <p>Retrieve the list of accounts this account follows</p>
1607
1838
 
1608
1839
 
1609
1840
  </div>
@@ -1622,8 +1853,7 @@
1622
1853
 
1623
1854
 
1624
1855
  &mdash;
1625
- <div class='inline'>
1626
- <p>The account</p>
1856
+ <div class='inline'><p>The account</p>
1627
1857
  </div>
1628
1858
 
1629
1859
  </li>
@@ -1640,8 +1870,7 @@
1640
1870
 
1641
1871
 
1642
1872
  &mdash;
1643
- <div class='inline'>
1644
- <p>Maximum number of items to retrieve</p>
1873
+ <div class='inline'><p>Maximum number of items to retrieve</p>
1645
1874
  </div>
1646
1875
 
1647
1876
  </li>
@@ -1659,8 +1888,7 @@
1659
1888
 
1660
1889
 
1661
1890
  &mdash;
1662
- <div class='inline'>
1663
- <p>Optional; applied to each item</p>
1891
+ <div class='inline'><p>Optional; applied to each item</p>
1664
1892
  </div>
1665
1893
 
1666
1894
  </li>
@@ -1692,8 +1920,7 @@
1692
1920
 
1693
1921
 
1694
1922
  &mdash;
1695
- <div class='inline'>
1696
- <p>if block is not given, otherwise self</p>
1923
+ <div class='inline'><p>if block is not given, otherwise self</p>
1697
1924
  </div>
1698
1925
 
1699
1926
  </li>
@@ -1713,16 +1940,16 @@
1713
1940
  <pre class="lines">
1714
1941
 
1715
1942
 
1716
- 288
1717
- 289
1718
- 290
1719
- 291
1720
- 292
1721
- 293
1722
- 294</pre>
1943
+ 386
1944
+ 387
1945
+ 388
1946
+ 389
1947
+ 390
1948
+ 391
1949
+ 392</pre>
1723
1950
  </td>
1724
1951
  <td>
1725
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 288</span>
1952
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 386</span>
1726
1953
 
1727
1954
  <span class='kw'>def</span> <span class='id identifier rubyid_each_following'>each_following</span><span class='lparen'>(</span><span class='id identifier rubyid_account_id'>account_id</span><span class='comma'>,</span>
1728
1955
  <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
@@ -1739,7 +1966,7 @@
1739
1966
  <div class="method_details ">
1740
1967
  <h3 class="signature " id="each_home_status-instance_method">
1741
1968
 
1742
- #<strong>each_home_status</strong>(limit: nil, local: false, remote: false, only_media: false) {|item| ... } &#x21d2; <tt>Enumerator</tt>
1969
+ #<strong>each_home_status</strong>(limit: nil, local: false, max_id: &quot;&quot;, remote: false, only_media: false) {|item| ... } &#x21d2; <tt>Enumerator</tt>
1743
1970
 
1744
1971
 
1745
1972
 
@@ -1747,8 +1974,7 @@
1747
1974
 
1748
1975
  </h3><div class="docstring">
1749
1976
  <div class="discussion">
1750
-
1751
- <p>Retrieve each Entity::Status in the home timeline.</p>
1977
+ <p>Retrieve each Entity::Status in the home timeline.</p>
1752
1978
 
1753
1979
  <p>Requires token.</p>
1754
1980
 
@@ -1771,8 +1997,24 @@
1771
1997
 
1772
1998
 
1773
1999
  &mdash;
1774
- <div class='inline'>
1775
- <p>,</p>
2000
+ <div class='inline'><p>maximum number of items to retrieve</p>
2001
+ </div>
2002
+
2003
+ </li>
2004
+
2005
+ <li>
2006
+
2007
+ <span class='name'>max_id</span>
2008
+
2009
+
2010
+ <span class='type'>(<tt>String</tt>)</span>
2011
+
2012
+
2013
+ <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
2014
+
2015
+
2016
+ &mdash;
2017
+ <div class='inline'><p>retrieve results older than this ID.</p>
1776
2018
  </div>
1777
2019
 
1778
2020
  </li>
@@ -1789,8 +2031,7 @@
1789
2031
 
1790
2032
 
1791
2033
  &mdash;
1792
- <div class='inline'>
1793
- <p>,</p>
2034
+ <div class='inline'><p>retrieve only local statuses</p>
1794
2035
  </div>
1795
2036
 
1796
2037
  </li>
@@ -1807,8 +2048,7 @@
1807
2048
 
1808
2049
 
1809
2050
  &mdash;
1810
- <div class='inline'>
1811
- <p>,</p>
2051
+ <div class='inline'><p>retrieve only remote statuses</p>
1812
2052
  </div>
1813
2053
 
1814
2054
  </li>
@@ -1825,8 +2065,7 @@
1825
2065
 
1826
2066
 
1827
2067
  &mdash;
1828
- <div class='inline'>
1829
- <p>,</p>
2068
+ <div class='inline'><p>retrieve only media status</p>
1830
2069
  </div>
1831
2070
 
1832
2071
  </li>
@@ -1872,8 +2111,7 @@
1872
2111
 
1873
2112
 
1874
2113
  &mdash;
1875
- <div class='inline'>
1876
- <p>if block is not given, otherwise self</p>
2114
+ <div class='inline'><p>if block is not given, otherwise self</p>
1877
2115
  </div>
1878
2116
 
1879
2117
  </li>
@@ -1893,20 +2131,22 @@
1893
2131
  <pre class="lines">
1894
2132
 
1895
2133
 
1896
- 438
1897
- 439
1898
- 440
1899
- 441
1900
- 442
1901
- 443
1902
- 444
1903
- 445</pre>
2134
+ 551
2135
+ 552
2136
+ 553
2137
+ 554
2138
+ 555
2139
+ 556
2140
+ 557
2141
+ 558
2142
+ 559</pre>
1904
2143
  </td>
1905
2144
  <td>
1906
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 438</span>
2145
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 551</span>
1907
2146
 
1908
2147
  <span class='kw'>def</span> <span class='id identifier rubyid_each_home_status'>each_home_status</span><span class='lparen'>(</span><span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1909
2148
  <span class='label'>local:</span> <span class='kw'>false</span><span class='comma'>,</span>
2149
+ <span class='label'>max_id:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
1910
2150
  <span class='label'>remote:</span> <span class='kw'>false</span><span class='comma'>,</span>
1911
2151
  <span class='label'>only_media:</span> <span class='kw'>false</span><span class='comma'>,</span>
1912
2152
  <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
@@ -1929,8 +2169,18 @@
1929
2169
 
1930
2170
  </h3><div class="docstring">
1931
2171
  <div class="discussion">
1932
-
1933
- <p>Retrieve each notification.</p>
2172
+ <p>Retrieve each notification.</p>
2173
+
2174
+ <p>Requires a bearer token.</p>
2175
+
2176
+ <p>Notification types are indicated by of the following symbols:</p>
2177
+
2178
+ <p><code>:mention</code>, <code>:status</code>, <code>:reblog</code>, <code>:follow</code>, <code>:follow_request</code>
2179
+ <code>:favourite</code>, <code>:poll</code>, <code>:update</code>, <code>:admin.sign_up</code>, or
2180
+ <code>:admin.report</code></p>
2181
+
2182
+ <p>This method will throw an <code>Error::Caller</code> exception if an
2183
+ unknown value is used.</p>
1934
2184
 
1935
2185
 
1936
2186
  </div>
@@ -1951,8 +2201,8 @@
1951
2201
 
1952
2202
 
1953
2203
  &mdash;
1954
- <div class='inline'>
1955
- <p>list of notifications types to enumerate; others are ignoredn</p>
2204
+ <div class='inline'><p>list of notifications types to
2205
+ enumerate; others are ignoredn</p>
1956
2206
  </div>
1957
2207
 
1958
2208
  </li>
@@ -1969,8 +2219,7 @@
1969
2219
 
1970
2220
 
1971
2221
  &mdash;
1972
- <div class='inline'>
1973
- <p>types of notifications to exclude</p>
2222
+ <div class='inline'><p>types of notifications to exclude</p>
1974
2223
  </div>
1975
2224
 
1976
2225
  </li>
@@ -1987,8 +2236,7 @@
1987
2236
 
1988
2237
 
1989
2238
  &mdash;
1990
- <div class='inline'>
1991
- <p>Maximum number of items to retrieve</p>
2239
+ <div class='inline'><p>Maximum number of items to retrieve</p>
1992
2240
  </div>
1993
2241
 
1994
2242
  </li>
@@ -2005,8 +2253,8 @@
2005
2253
 
2006
2254
 
2007
2255
  &mdash;
2008
- <div class='inline'>
2009
- <p>Only retrieve notifications from the account with this ID.</p>
2256
+ <div class='inline'><p>Only retrieve notifications from
2257
+ the account with this ID.</p>
2010
2258
  </div>
2011
2259
 
2012
2260
  </li>
@@ -2024,8 +2272,7 @@
2024
2272
 
2025
2273
 
2026
2274
  &mdash;
2027
- <div class='inline'>
2028
- <p>Applied to each Notification</p>
2275
+ <div class='inline'><p>Applied to each Notification</p>
2029
2276
  </div>
2030
2277
 
2031
2278
  </li>
@@ -2057,8 +2304,7 @@
2057
2304
 
2058
2305
 
2059
2306
  &mdash;
2060
- <div class='inline'>
2061
- <p>if block is not given, otherwise self</p>
2307
+ <div class='inline'><p>if block is not given, otherwise self</p>
2062
2308
  </div>
2063
2309
 
2064
2310
  </li>
@@ -2078,30 +2324,34 @@
2078
2324
  <pre class="lines">
2079
2325
 
2080
2326
 
2081
- 508
2082
- 509
2083
- 510
2084
- 511
2085
- 512
2086
- 513
2087
- 514
2088
- 515
2089
- 516
2090
- 517
2091
- 518
2092
- 519
2093
- 520
2094
- 521
2095
- 522
2096
- 523
2097
- 524
2098
- 525
2099
- 526
2100
- 527
2101
- 528</pre>
2327
+ 634
2328
+ 635
2329
+ 636
2330
+ 637
2331
+ 638
2332
+ 639
2333
+ 640
2334
+ 641
2335
+ 642
2336
+ 643
2337
+ 644
2338
+ 645
2339
+ 646
2340
+ 647
2341
+ 648
2342
+ 649
2343
+ 650
2344
+ 651
2345
+ 652
2346
+ 653
2347
+ 654
2348
+ 655
2349
+ 656
2350
+ 657
2351
+ 658</pre>
2102
2352
  </td>
2103
2353
  <td>
2104
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 508</span>
2354
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 634</span>
2105
2355
 
2106
2356
  <span class='kw'>def</span> <span class='id identifier rubyid_each_notification'>each_notification</span><span class='lparen'>(</span><span class='label'>types:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
2107
2357
  <span class='label'>exclude_types:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
@@ -2112,10 +2362,14 @@
2112
2362
  </span><span class='tstring_content'>favourite</span><span class='words_sep'> </span><span class='tstring_content'>poll</span><span class='words_sep'> </span><span class='tstring_content'>update</span><span class='words_sep'> </span><span class='tstring_content'>admin.sign_up</span><span class='words_sep'>
2113
2363
  </span><span class='tstring_content'>admin.report</span><span class='tstring_end'>}</span></span>
2114
2364
 
2115
- <span class='comment'># Ensure valid filter values
2116
- </span> <span class='id identifier rubyid_types'>types</span><span class='period'>.</span><span class='id identifier rubyid_uniq!'>uniq!</span>
2117
- <span class='id identifier rubyid_exclude_types'>exclude_types</span><span class='period'>.</span><span class='id identifier rubyid_uniq!'>uniq!</span>
2118
- <span class='lparen'>(</span><span class='id identifier rubyid_types'>types</span> <span class='op'>+</span> <span class='id identifier rubyid_exclude_types'>exclude_types</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_filter'>filter</span><span class='op'>|</span>
2365
+ <span class='comment'># Remove duplicates and convert strings to symbols
2366
+ </span> <span class='lbracket'>[</span><span class='id identifier rubyid_types'>types</span><span class='comma'>,</span> <span class='id identifier rubyid_exclude_types'>exclude_types</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_param'>param</span><span class='op'>|</span>
2367
+ <span class='id identifier rubyid_param'>param</span><span class='period'>.</span><span class='id identifier rubyid_map!'>map!</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span> <span class='id identifier rubyid_item'>item</span><span class='period'>.</span><span class='id identifier rubyid_intern'>intern</span><span class='rbrace'>}</span>
2368
+ <span class='id identifier rubyid_param'>param</span><span class='period'>.</span><span class='id identifier rubyid_uniq!'>uniq!</span>
2369
+ <span class='rbrace'>}</span>
2370
+
2371
+ <span class='comment'># Now, ensure there are no incorrect notification types.
2372
+ </span> <span class='lparen'>(</span><span class='id identifier rubyid_types'>types</span> <span class='op'>+</span> <span class='id identifier rubyid_exclude_types'>exclude_types</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_filter'>filter</span><span class='op'>|</span>
2119
2373
  <span class='id identifier rubyid_assert'>assert</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unknown notification type: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_filter'>filter</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span>
2120
2374
  <span class='id identifier rubyid_allowed_notifications'>allowed_notifications</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_filter'>filter</span><span class='period'>.</span><span class='id identifier rubyid_intern'>intern</span><span class='rparen'>)</span>
2121
2375
  <span class='rbrace'>}</span>
@@ -2132,7 +2386,7 @@
2132
2386
  <div class="method_details ">
2133
2387
  <h3 class="signature " id="each_public_status-instance_method">
2134
2388
 
2135
- #<strong>each_public_status</strong>(limit: nil, local: false, remote: false, only_media: false) {|item| ... } &#x21d2; <tt>Enumerator</tt>
2389
+ #<strong>each_public_status</strong>(limit: nil, max_id: &quot;&quot;, local: false, remote: false, only_media: false) {|item| ... } &#x21d2; <tt>Enumerator</tt>
2136
2390
 
2137
2391
 
2138
2392
 
@@ -2140,10 +2394,9 @@
2140
2394
 
2141
2395
  </h3><div class="docstring">
2142
2396
  <div class="discussion">
2143
-
2144
- <p>Retrieve the instance’s public timeline(s)</p>
2397
+ <p>Retrieve the instance&#39;s public timeline(s)</p>
2145
2398
 
2146
- <p>May require a token depending on the instances settings.</p>
2399
+ <p>May require a token depending on the instance&#39;s settings.</p>
2147
2400
 
2148
2401
 
2149
2402
  </div>
@@ -2164,8 +2417,24 @@
2164
2417
 
2165
2418
 
2166
2419
  &mdash;
2167
- <div class='inline'>
2168
- <p>Max. items to retrieve.</p>
2420
+ <div class='inline'><p>Max. items to retrieve.</p>
2421
+ </div>
2422
+
2423
+ </li>
2424
+
2425
+ <li>
2426
+
2427
+ <span class='name'>max_id</span>
2428
+
2429
+
2430
+ <span class='type'>(<tt>String</tt>)</span>
2431
+
2432
+
2433
+ <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
2434
+
2435
+
2436
+ &mdash;
2437
+ <div class='inline'><p>retrieve results older than this ID.</p>
2169
2438
  </div>
2170
2439
 
2171
2440
  </li>
@@ -2182,8 +2451,7 @@
2182
2451
 
2183
2452
 
2184
2453
  &mdash;
2185
- <div class='inline'>
2186
- <p>Retrieve only local statuses</p>
2454
+ <div class='inline'><p>Retrieve only local statuses</p>
2187
2455
  </div>
2188
2456
 
2189
2457
  </li>
@@ -2200,8 +2468,7 @@
2200
2468
 
2201
2469
 
2202
2470
  &mdash;
2203
- <div class='inline'>
2204
- <p>Retrieve only remote statuses</p>
2471
+ <div class='inline'><p>Retrieve only remote statuses</p>
2205
2472
  </div>
2206
2473
 
2207
2474
  </li>
@@ -2218,8 +2485,7 @@
2218
2485
 
2219
2486
 
2220
2487
  &mdash;
2221
- <div class='inline'>
2222
- <p>Retrieve only statuses with media</p>
2488
+ <div class='inline'><p>Retrieve only statuses with media</p>
2223
2489
  </div>
2224
2490
 
2225
2491
  </li>
@@ -2237,8 +2503,7 @@
2237
2503
 
2238
2504
 
2239
2505
  &mdash;
2240
- <div class='inline'>
2241
- <p>Optional; applied to each item</p>
2506
+ <div class='inline'><p>Optional; applied to each item</p>
2242
2507
  </div>
2243
2508
 
2244
2509
  </li>
@@ -2270,8 +2535,7 @@
2270
2535
 
2271
2536
 
2272
2537
  &mdash;
2273
- <div class='inline'>
2274
- <p>if block is not given, otherwise self</p>
2538
+ <div class='inline'><p>if block is not given, otherwise self</p>
2275
2539
  </div>
2276
2540
 
2277
2541
  </li>
@@ -2291,19 +2555,21 @@
2291
2555
  <pre class="lines">
2292
2556
 
2293
2557
 
2294
- 353
2295
- 354
2296
- 355
2297
- 356
2298
- 357
2299
- 358
2300
- 359
2301
- 360</pre>
2558
+ 456
2559
+ 457
2560
+ 458
2561
+ 459
2562
+ 460
2563
+ 461
2564
+ 462
2565
+ 463
2566
+ 464</pre>
2302
2567
  </td>
2303
2568
  <td>
2304
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 353</span>
2569
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 456</span>
2305
2570
 
2306
2571
  <span class='kw'>def</span> <span class='id identifier rubyid_each_public_status'>each_public_status</span><span class='lparen'>(</span><span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
2572
+ <span class='label'>max_id:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
2307
2573
  <span class='label'>local:</span> <span class='kw'>false</span><span class='comma'>,</span>
2308
2574
  <span class='label'>remote:</span> <span class='kw'>false</span><span class='comma'>,</span>
2309
2575
  <span class='label'>only_media:</span> <span class='kw'>false</span><span class='comma'>,</span>
@@ -2319,7 +2585,7 @@
2319
2585
  <div class="method_details ">
2320
2586
  <h3 class="signature " id="each_status-instance_method">
2321
2587
 
2322
- #<strong>each_status</strong>(account_id, limit: nil, only_media: false, exclude_replies: false, exclude_reblogs: false, pinned: false, tagged: nil) {|item| ... } &#x21d2; <tt>Enumerator</tt>
2588
+ #<strong>each_status</strong>(account_id, limit: nil, max_id: &quot;&quot;, only_media: false, exclude_replies: false, exclude_reblogs: false, pinned: false, tagged: nil) {|item| ... } &#x21d2; <tt>Enumerator</tt>
2323
2589
 
2324
2590
 
2325
2591
 
@@ -2327,8 +2593,7 @@
2327
2593
 
2328
2594
  </h3><div class="docstring">
2329
2595
  <div class="discussion">
2330
-
2331
- <p>Retrieve the account’s statuses</p>
2596
+ <p>Retrieve the account&#39;s statuses</p>
2332
2597
 
2333
2598
 
2334
2599
  </div>
@@ -2347,8 +2612,7 @@
2347
2612
 
2348
2613
 
2349
2614
  &mdash;
2350
- <div class='inline'>
2351
- <p>The ID of the account</p>
2615
+ <div class='inline'><p>The ID of the account</p>
2352
2616
  </div>
2353
2617
 
2354
2618
  </li>
@@ -2365,8 +2629,25 @@
2365
2629
 
2366
2630
 
2367
2631
  &mdash;
2368
- <div class='inline'>
2369
- <p>Maximum number of accounts to retrieve</p>
2632
+ <div class='inline'><p>Maximum number of accounts to
2633
+ retrieve</p>
2634
+ </div>
2635
+
2636
+ </li>
2637
+
2638
+ <li>
2639
+
2640
+ <span class='name'>max_id</span>
2641
+
2642
+
2643
+ <span class='type'>(<tt>String</tt>)</span>
2644
+
2645
+
2646
+ <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
2647
+
2648
+
2649
+ &mdash;
2650
+ <div class='inline'><p>retrieve results older than this ID.</p>
2370
2651
  </div>
2371
2652
 
2372
2653
  </li>
@@ -2383,8 +2664,8 @@
2383
2664
 
2384
2665
 
2385
2666
  &mdash;
2386
- <div class='inline'>
2387
- <p>If true, filter for statuses with media</p>
2667
+ <div class='inline'><p>If true, filter for statuses
2668
+ with media</p>
2388
2669
  </div>
2389
2670
 
2390
2671
  </li>
@@ -2401,8 +2682,7 @@
2401
2682
 
2402
2683
 
2403
2684
  &mdash;
2404
- <div class='inline'>
2405
- <p>If true, exclude replies</p>
2685
+ <div class='inline'><p>If true, exclude replies</p>
2406
2686
  </div>
2407
2687
 
2408
2688
  </li>
@@ -2419,8 +2699,7 @@
2419
2699
 
2420
2700
 
2421
2701
  &mdash;
2422
- <div class='inline'>
2423
- <p>If true, exclude boosts</p>
2702
+ <div class='inline'><p>If true, exclude boosts</p>
2424
2703
  </div>
2425
2704
 
2426
2705
  </li>
@@ -2437,8 +2716,8 @@
2437
2716
 
2438
2717
 
2439
2718
  &mdash;
2440
- <div class='inline'>
2441
- <p>If true, filter for pinned statuses</p>
2719
+ <div class='inline'><p>If true, filter for pinned
2720
+ statuses</p>
2442
2721
  </div>
2443
2722
 
2444
2723
  </li>
@@ -2455,8 +2734,8 @@
2455
2734
 
2456
2735
 
2457
2736
  &mdash;
2458
- <div class='inline'>
2459
- <p>Filter for statuses containing the given tag</p>
2737
+ <div class='inline'><p>Filter for statuses containing the
2738
+ given tag</p>
2460
2739
  </div>
2461
2740
 
2462
2741
  </li>
@@ -2474,8 +2753,7 @@
2474
2753
 
2475
2754
 
2476
2755
  &mdash;
2477
- <div class='inline'>
2478
- <p>Optional; applied to each item</p>
2756
+ <div class='inline'><p>Optional; applied to each item</p>
2479
2757
  </div>
2480
2758
 
2481
2759
  </li>
@@ -2507,8 +2785,7 @@
2507
2785
 
2508
2786
 
2509
2787
  &mdash;
2510
- <div class='inline'>
2511
- <p>if block is not given, otherwise self</p>
2788
+ <div class='inline'><p>if block is not given, otherwise self</p>
2512
2789
  </div>
2513
2790
 
2514
2791
  </li>
@@ -2528,23 +2805,25 @@
2528
2805
  <pre class="lines">
2529
2806
 
2530
2807
 
2531
- 322
2532
- 323
2533
- 324
2534
- 325
2535
- 326
2536
- 327
2537
- 328
2538
- 329
2539
- 330
2540
- 331
2541
- 332</pre>
2808
+ 422
2809
+ 423
2810
+ 424
2811
+ 425
2812
+ 426
2813
+ 427
2814
+ 428
2815
+ 429
2816
+ 430
2817
+ 431
2818
+ 432
2819
+ 433</pre>
2542
2820
  </td>
2543
2821
  <td>
2544
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 322</span>
2822
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 422</span>
2545
2823
 
2546
2824
  <span class='kw'>def</span> <span class='id identifier rubyid_each_status'>each_status</span><span class='lparen'>(</span><span class='id identifier rubyid_account_id'>account_id</span><span class='comma'>,</span>
2547
2825
  <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
2826
+ <span class='label'>max_id:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
2548
2827
  <span class='label'>only_media:</span> <span class='kw'>false</span><span class='comma'>,</span>
2549
2828
  <span class='label'>exclude_replies:</span> <span class='kw'>false</span><span class='comma'>,</span>
2550
2829
  <span class='label'>exclude_reblogs:</span> <span class='kw'>false</span><span class='comma'>,</span>
@@ -2562,7 +2841,7 @@
2562
2841
  <div class="method_details ">
2563
2842
  <h3 class="signature " id="each_tag_status-instance_method">
2564
2843
 
2565
- #<strong>each_tag_status</strong>(hashtag_s, limit: nil, local: false, remote: false, only_media: false, all: [], none: []) {|item| ... } &#x21d2; <tt>Enumerator</tt>
2844
+ #<strong>each_tag_status</strong>(hashtag_s, limit: nil, max_id: &quot;&quot;, local: false, remote: false, only_media: false, all: [], none: []) {|item| ... } &#x21d2; <tt>Enumerator</tt>
2566
2845
 
2567
2846
 
2568
2847
 
@@ -2570,10 +2849,12 @@
2570
2849
 
2571
2850
  </h3><div class="docstring">
2572
2851
  <div class="discussion">
2573
-
2574
- <p>Retrieve a tag’s timeline.</p>
2852
+ <p>Retrieve a tag&#39;s timeline.</p>
2575
2853
 
2576
- <p>The tag may either be a String (containing one hashtag) or an Array containing one or more. If more than one hashtag is given, all statuses containing <strong>any</strong> of the given hashtags are retrieved. (This uses the <code>any[]</code> parameter in the API.)</p>
2854
+ <p>The tag may either be a String (containing one hashtag) or an
2855
+ Array containing one or more. If more than one hashtag is
2856
+ given, all statuses containing <strong>any</strong> of the given hashtags are
2857
+ retrieved. (This uses the <code>any[]</code> parameter in the API.)</p>
2577
2858
 
2578
2859
  <p>There is currently no check for contradictory tag lists.</p>
2579
2860
 
@@ -2594,8 +2875,7 @@
2594
2875
 
2595
2876
 
2596
2877
  &mdash;
2597
- <div class='inline'>
2598
- <p>Hashtag(s) to retrieve.</p>
2878
+ <div class='inline'><p>Hashtag(s) to retrieve.</p>
2599
2879
  </div>
2600
2880
 
2601
2881
  </li>
@@ -2612,8 +2892,24 @@
2612
2892
 
2613
2893
 
2614
2894
  &mdash;
2615
- <div class='inline'>
2616
- <p>maximum number of items to retrieve</p>
2895
+ <div class='inline'><p>maximum number of items to retrieve</p>
2896
+ </div>
2897
+
2898
+ </li>
2899
+
2900
+ <li>
2901
+
2902
+ <span class='name'>max_id</span>
2903
+
2904
+
2905
+ <span class='type'>(<tt>String</tt>)</span>
2906
+
2907
+
2908
+ <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
2909
+
2910
+
2911
+ &mdash;
2912
+ <div class='inline'><p>return results older than this ID.</p>
2617
2913
  </div>
2618
2914
 
2619
2915
  </li>
@@ -2630,8 +2926,7 @@
2630
2926
 
2631
2927
 
2632
2928
  &mdash;
2633
- <div class='inline'>
2634
- <p>retrieve only local statuses</p>
2929
+ <div class='inline'><p>retrieve only local statuses</p>
2635
2930
  </div>
2636
2931
 
2637
2932
  </li>
@@ -2648,8 +2943,7 @@
2648
2943
 
2649
2944
 
2650
2945
  &mdash;
2651
- <div class='inline'>
2652
- <p>retrieve only remote statuses</p>
2946
+ <div class='inline'><p>retrieve only remote statuses</p>
2653
2947
  </div>
2654
2948
 
2655
2949
  </li>
@@ -2666,8 +2960,7 @@
2666
2960
 
2667
2961
 
2668
2962
  &mdash;
2669
- <div class='inline'>
2670
- <p>retrieve only media status</p>
2963
+ <div class='inline'><p>retrieve only media status</p>
2671
2964
  </div>
2672
2965
 
2673
2966
  </li>
@@ -2684,8 +2977,8 @@
2684
2977
 
2685
2978
 
2686
2979
  &mdash;
2687
- <div class='inline'>
2688
- <p>list of other tags that must also be present.</p>
2980
+ <div class='inline'><p>list of other tags that
2981
+ must also be present.</p>
2689
2982
  </div>
2690
2983
 
2691
2984
  </li>
@@ -2702,8 +2995,7 @@
2702
2995
 
2703
2996
 
2704
2997
  &mdash;
2705
- <div class='inline'>
2706
- <p>list of tags that are excluded.</p>
2998
+ <div class='inline'><p>list of tags that are excluded.</p>
2707
2999
  </div>
2708
3000
 
2709
3001
  </li>
@@ -2721,8 +3013,7 @@
2721
3013
 
2722
3014
 
2723
3015
  &mdash;
2724
- <div class='inline'>
2725
- <p>block to apply to each Status; optional</p>
3016
+ <div class='inline'><p>block to apply to each Status; optional</p>
2726
3017
  </div>
2727
3018
 
2728
3019
  </li>
@@ -2754,8 +3045,7 @@
2754
3045
 
2755
3046
 
2756
3047
  &mdash;
2757
- <div class='inline'>
2758
- <p>if block is not given, otherwise self</p>
3048
+ <div class='inline'><p>if block is not given, otherwise self</p>
2759
3049
  </div>
2760
3050
 
2761
3051
  </li>
@@ -2775,38 +3065,40 @@
2775
3065
  <pre class="lines">
2776
3066
 
2777
3067
 
2778
- 393
2779
- 394
2780
- 395
2781
- 396
2782
- 397
2783
- 398
2784
- 399
2785
- 400
2786
- 401
2787
- 402
2788
- 403
2789
- 404
2790
- 405
2791
- 406
2792
- 407
2793
- 408
2794
- 409
2795
- 410
2796
- 411
2797
- 412
2798
- 413
2799
- 414
2800
- 415
2801
- 416
2802
- 417
2803
- 418</pre>
3068
+ 499
3069
+ 500
3070
+ 501
3071
+ 502
3072
+ 503
3073
+ 504
3074
+ 505
3075
+ 506
3076
+ 507
3077
+ 508
3078
+ 509
3079
+ 510
3080
+ 511
3081
+ 512
3082
+ 513
3083
+ 514
3084
+ 515
3085
+ 516
3086
+ 517
3087
+ 518
3088
+ 519
3089
+ 520
3090
+ 521
3091
+ 522
3092
+ 523
3093
+ 524
3094
+ 525</pre>
2804
3095
  </td>
2805
3096
  <td>
2806
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 393</span>
3097
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 499</span>
2807
3098
 
2808
3099
  <span class='kw'>def</span> <span class='id identifier rubyid_each_tag_status'>each_tag_status</span><span class='lparen'>(</span><span class='id identifier rubyid_hashtag_s'>hashtag_s</span><span class='comma'>,</span>
2809
3100
  <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
3101
+ <span class='label'>max_id:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
2810
3102
  <span class='label'>local:</span> <span class='kw'>false</span><span class='comma'>,</span>
2811
3103
  <span class='label'>remote:</span> <span class='kw'>false</span><span class='comma'>,</span>
2812
3104
  <span class='label'>only_media:</span> <span class='kw'>false</span><span class='comma'>,</span>
@@ -2847,12 +3139,17 @@
2847
3139
 
2848
3140
  </h3><div class="docstring">
2849
3141
  <div class="discussion">
2850
-
2851
- <p>Update the status with the given Id.</p>
3142
+ <p>Update the status with the given Id.</p>
2852
3143
 
2853
- <p>Requires token with sufficient permission for the account that owns the status.</p>
3144
+ <p>Requires token with sufficient permission for the account that
3145
+ owns the status.</p>
2854
3146
 
2855
- <p>Notionally, this method will change <em>all</em> of the affected status parts each time it’s invoked, passing the default parameter if none is given. This is because it is unclear how the API handles omitted fields so we just don’t do that. (You can force it to omit an argument by setting it to nil; this may or may not work for you.)</p>
3147
+ <p>Notionally, this method will change <em>all</em> of the affected status
3148
+ parts each time it&#39;s invoked, passing the default parameter if
3149
+ none is given. This is because it is unclear how the API
3150
+ handles omitted fields so we just don&#39;t do that. (You can force
3151
+ it to omit an argument by setting it to nil; this may or may not
3152
+ work for you.)</p>
2856
3153
 
2857
3154
 
2858
3155
  </div>
@@ -2871,8 +3168,7 @@
2871
3168
 
2872
3169
 
2873
3170
  &mdash;
2874
- <div class='inline'>
2875
- <p>id of the status to edit</p>
3171
+ <div class='inline'><p>id of the status to edit</p>
2876
3172
  </div>
2877
3173
 
2878
3174
  </li>
@@ -2887,8 +3183,7 @@
2887
3183
 
2888
3184
 
2889
3185
  &mdash;
2890
- <div class='inline'>
2891
- <p>new status text</p>
3186
+ <div class='inline'><p>new status text</p>
2892
3187
  </div>
2893
3188
 
2894
3189
  </li>
@@ -2905,8 +3200,8 @@
2905
3200
 
2906
3201
 
2907
3202
  &mdash;
2908
- <div class='inline'>
2909
- <p>array of media object IDs to attach to this status.</p>
3203
+ <div class='inline'><p>array of media object IDs
3204
+ to attach to this status.</p>
2910
3205
  </div>
2911
3206
 
2912
3207
  </li>
@@ -2923,8 +3218,9 @@
2923
3218
 
2924
3219
 
2925
3220
  &mdash;
2926
- <div class='inline'>
2927
- <p>Sets or clears the content warning. Non-empty value also sets the <code>sensitive</code> field.</p>
3221
+ <div class='inline'><p>Sets or clears the content
3222
+ warning. Non-empty value also
3223
+ sets the <code>sensitive</code> field.</p>
2928
3224
  </div>
2929
3225
 
2930
3226
  </li>
@@ -2941,8 +3237,10 @@
2941
3237
 
2942
3238
 
2943
3239
  &mdash;
2944
- <div class='inline'>
2945
- <p>The language of the status; defaults to en”. (Apologies for the anglocentrism; this should be consistent.)</p>
3240
+ <div class='inline'><p>The language of the status;
3241
+ defaults to &quot;en&quot;. (Apologies for
3242
+ the anglocentrism; this should be
3243
+ consistent.)</p>
2946
3244
  </div>
2947
3245
 
2948
3246
  </li>
@@ -2960,8 +3258,7 @@
2960
3258
 
2961
3259
 
2962
3260
  &mdash;
2963
- <div class='inline'>
2964
- <p>the updated status</p>
3261
+ <div class='inline'><p>the updated status</p>
2965
3262
  </div>
2966
3263
 
2967
3264
  </li>
@@ -2981,21 +3278,21 @@
2981
3278
  <pre class="lines">
2982
3279
 
2983
3280
 
2984
- 607
2985
- 608
2986
- 609
2987
- 610
2988
- 611
2989
- 612
2990
- 613
2991
- 614
2992
- 615
2993
- 616
2994
- 617
2995
- 618</pre>
3281
+ 739
3282
+ 740
3283
+ 741
3284
+ 742
3285
+ 743
3286
+ 744
3287
+ 745
3288
+ 746
3289
+ 747
3290
+ 748
3291
+ 749
3292
+ 750</pre>
2996
3293
  </td>
2997
3294
  <td>
2998
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 607</span>
3295
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 739</span>
2999
3296
 
3000
3297
  <span class='kw'>def</span> <span class='id identifier rubyid_edit_status'>edit_status</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_status'>status</span><span class='comma'>,</span>
3001
3298
  <span class='label'>media_ids:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
@@ -3025,8 +3322,7 @@
3025
3322
 
3026
3323
  </h3><div class="docstring">
3027
3324
  <div class="discussion">
3028
-
3029
- <p>Fetch user details by ID</p>
3325
+ <p>Fetch user details by ID</p>
3030
3326
 
3031
3327
 
3032
3328
  </div>
@@ -3045,8 +3341,7 @@
3045
3341
 
3046
3342
 
3047
3343
  &mdash;
3048
- <div class='inline'>
3049
- <p>the ID code of the account</p>
3344
+ <div class='inline'><p>the ID code of the account</p>
3050
3345
  </div>
3051
3346
 
3052
3347
  </li>
@@ -3080,12 +3375,12 @@
3080
3375
  <pre class="lines">
3081
3376
 
3082
3377
 
3083
- 145
3084
- 146
3085
- 147</pre>
3378
+ 238
3379
+ 239
3380
+ 240</pre>
3086
3381
  </td>
3087
3382
  <td>
3088
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 145</span>
3383
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 238</span>
3089
3384
 
3090
3385
  <span class='kw'>def</span> <span class='id identifier rubyid_fetch_account'>fetch_account</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
3091
3386
  <span class='kw'>return</span> <span class='id identifier rubyid_rest_get'>rest_get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>accounts/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Entity.html" title="Shep::Entity (class)">Entity</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Account</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
@@ -3098,7 +3393,7 @@
3098
3393
  <div class="method_details ">
3099
3394
  <h3 class="signature " id="fetch_account_by_username-instance_method">
3100
3395
 
3101
- #<strong>fetch_account_by_username</strong>(handle) &#x21d2; <tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt>
3396
+ #<strong>fetch_account_by_username</strong>(handle) &#x21d2; <tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt><sup>?</sup>
3102
3397
 
3103
3398
 
3104
3399
 
@@ -3106,8 +3401,7 @@
3106
3401
 
3107
3402
  </h3><div class="docstring">
3108
3403
  <div class="discussion">
3109
-
3110
- <p>Fetch user details by username.</p>
3404
+ <p>Fetch user details by username.</p>
3111
3405
 
3112
3406
  <p>The username must belong to a user on the current server.</p>
3113
3407
 
@@ -3128,8 +3422,8 @@
3128
3422
 
3129
3423
 
3130
3424
  &mdash;
3131
- <div class='inline'>
3132
- <p>the account’s username <strong>with</strong> the leading ‘@’ character (e.g. @benoitmandelbot)</p>
3425
+ <div class='inline'><p>the account&#39;s username with or without the
3426
+ leading &#39;@&#39; character (e.g. @benoitmandelbot)</p>
3133
3427
  </div>
3134
3428
 
3135
3429
  </li>
@@ -3142,10 +3436,14 @@
3142
3436
  <li>
3143
3437
 
3144
3438
 
3145
- <span class='type'>(<tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt>)</span>
3439
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt>, <tt>nil</tt>)</span>
3146
3440
 
3147
3441
 
3148
3442
 
3443
+ &mdash;
3444
+ <div class='inline'><p>The Account or nil if it can&#39;t be found.</p>
3445
+ </div>
3446
+
3149
3447
  </li>
3150
3448
 
3151
3449
  </ul>
@@ -3163,15 +3461,23 @@
3163
3461
  <pre class="lines">
3164
3462
 
3165
3463
 
3166
- 159
3167
- 160
3168
- 161</pre>
3464
+ 253
3465
+ 254
3466
+ 255
3467
+ 256
3468
+ 257
3469
+ 258
3470
+ 259</pre>
3169
3471
  </td>
3170
3472
  <td>
3171
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 159</span>
3473
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 253</span>
3172
3474
 
3173
3475
  <span class='kw'>def</span> <span class='id identifier rubyid_fetch_account_by_username'>fetch_account_by_username</span><span class='lparen'>(</span><span class='id identifier rubyid_handle'>handle</span><span class='rparen'>)</span>
3174
3476
  <span class='kw'>return</span> <span class='id identifier rubyid_rest_get'>rest_get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>accounts/lookup</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Entity.html" title="Shep::Entity (class)">Entity</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Account</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>acct:</span> <span class='id identifier rubyid_handle'>handle</span><span class='rbrace'>}</span><span class='rparen'>)</span>
3477
+ <span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="Error.html" title="Shep::Error (class)">Error</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Error/Http.html" title="Shep::Error::Http (class)">Http</a></span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_oopsie'>oopsie</span>
3478
+ <span class='comment'># As a special case, return nil if the lookup fails
3479
+ </span> <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_oopsie'>oopsie</span><span class='period'>.</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPNotFound</span><span class='rparen'>)</span>
3480
+ <span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_oopsie'>oopsie</span>
3175
3481
  <span class='kw'>end</span></pre>
3176
3482
  </td>
3177
3483
  </tr>
@@ -3189,8 +3495,7 @@
3189
3495
 
3190
3496
  </h3><div class="docstring">
3191
3497
  <div class="discussion">
3192
-
3193
- <p>Fetch the context (parent and child status) of status at ‘id’</p>
3498
+ <p>Fetch the context (parent and child status) of status at &#39;id&#39;</p>
3194
3499
 
3195
3500
 
3196
3501
  </div>
@@ -3224,10 +3529,10 @@
3224
3529
  <pre class="lines">
3225
3530
 
3226
3531
 
3227
- 187</pre>
3532
+ 285</pre>
3228
3533
  </td>
3229
3534
  <td>
3230
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 187</span>
3535
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 285</span>
3231
3536
 
3232
3537
  <span class='kw'>def</span> <span class='id identifier rubyid_fetch_context'>fetch_context</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_rest_get'>rest_get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>statuses/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/context</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Entity.html" title="Shep::Entity (class)">Entity</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Entity/Context.html" title="Shep::Entity::Context (class)">Context</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span></pre>
3233
3538
  </td>
@@ -3246,8 +3551,7 @@
3246
3551
 
3247
3552
  </h3><div class="docstring">
3248
3553
  <div class="discussion">
3249
-
3250
- <p>Fetch an individual notification by ID.</p>
3554
+ <p>Fetch an individual notification by ID.</p>
3251
3555
 
3252
3556
  <p>Requires a token with sufficient permissions.</p>
3253
3557
 
@@ -3268,8 +3572,7 @@
3268
3572
 
3269
3573
 
3270
3574
  &mdash;
3271
- <div class='inline'>
3272
- <p>the notification ID</p>
3575
+ <div class='inline'><p>the notification ID</p>
3273
3576
  </div>
3274
3577
 
3275
3578
  </li>
@@ -3303,11 +3606,11 @@
3303
3606
  <pre class="lines">
3304
3607
 
3305
3608
 
3306
- 172
3307
- 173</pre>
3609
+ 270
3610
+ 271</pre>
3308
3611
  </td>
3309
3612
  <td>
3310
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 172</span>
3613
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 270</span>
3311
3614
 
3312
3615
  <span class='kw'>def</span> <span class='id identifier rubyid_fetch_notification'>fetch_notification</span><span class='lparen'>(</span><span class='id identifier rubyid_ntfn_id'>ntfn_id</span><span class='rparen'>)</span> <span class='op'>=</span>
3313
3616
  <span class='id identifier rubyid_rest_get'>rest_get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>notifications/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ntfn_id'>ntfn_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Entity.html" title="Shep::Entity (class)">Entity</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Entity/Notification.html" title="Shep::Entity::Notification (class)">Notification</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span></pre>
@@ -3327,8 +3630,7 @@
3327
3630
 
3328
3631
  </h3><div class="docstring">
3329
3632
  <div class="discussion">
3330
-
3331
- <p>Fetch a single status</p>
3633
+ <p>Fetch a single status</p>
3332
3634
 
3333
3635
 
3334
3636
  </div>
@@ -3362,10 +3664,10 @@
3362
3664
  <pre class="lines">
3363
3665
 
3364
3666
 
3365
- 180</pre>
3667
+ 278</pre>
3366
3668
  </td>
3367
3669
  <td>
3368
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 180</span>
3670
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 278</span>
3369
3671
 
3370
3672
  <span class='kw'>def</span> <span class='id identifier rubyid_fetch_status'>fetch_status</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_rest_get'>rest_get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>statuses/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Entity.html" title="Shep::Entity (class)">Entity</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Status</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span></pre>
3371
3673
  </td>
@@ -3384,8 +3686,7 @@
3384
3686
 
3385
3687
  </h3><div class="docstring">
3386
3688
  <div class="discussion">
3387
-
3388
- <p>Fetch the editable source of status at id.</p>
3689
+ <p>Fetch the editable source of status at id.</p>
3389
3690
 
3390
3691
  <p>Requires token.</p>
3391
3692
 
@@ -3421,11 +3722,11 @@
3421
3722
  <pre class="lines">
3422
3723
 
3423
3724
 
3424
- 196
3425
- 197</pre>
3725
+ 294
3726
+ 295</pre>
3426
3727
  </td>
3427
3728
  <td>
3428
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 196</span>
3729
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 294</span>
3429
3730
 
3430
3731
  <span class='kw'>def</span> <span class='id identifier rubyid_fetch_status_src'>fetch_status_src</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_rest_get'>rest_get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>statuses/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/source</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
3431
3732
  <span class='const'><span class='object_link'><a href="Entity.html" title="Shep::Entity (class)">Entity</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Entity/StatusSource.html" title="Shep::Entity::StatusSource (class)">StatusSource</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span></pre>
@@ -3445,14 +3746,22 @@
3445
3746
 
3446
3747
  </h3><div class="docstring">
3447
3748
  <div class="discussion">
3448
-
3449
- <p>Fetch the given status and also any attached media.</p>
3749
+ <p>Fetch the given status and also any attached media.</p>
3450
3750
 
3451
- <p>Media is downloaded into the given directory unless a file with the expected name is already there (and <code>refetch</code> is not <code>true</code>).</p>
3751
+ <p>Media is downloaded into the given directory unless a file with
3752
+ the expected name is already there (and <code>refetch</code> is not
3753
+ <code>true</code>).</p>
3452
3754
 
3453
- <p>Filenames are chosen by the function; the second return value (a <code>Hash</code>) can be used to find them. Value order also corresponds to the order of the returned <code>Status</code>‘s <code>media_attachments</code> field.</p>
3755
+ <p>Filenames are chosen by the function; the second return value (a
3756
+ <code>Hash</code>) can be used to find them. Value order also corresponds
3757
+ to the order of the returned <code>Status</code>&#39;s <code>media_attachments</code>
3758
+ field.</p>
3454
3759
 
3455
- <p>Note that intermediate files unique temporary names while downloading is in progress. This means it is safe to set <code>refetch</code> to false even if a previous download attempt failed. However, it is would be necessary to delete the intermediate file, which has the suffic “.tmp”.</p>
3760
+ <p>Note that intermediate files unique temporary names while
3761
+ downloading is in progress. This means it is safe to set
3762
+ <code>refetch</code> to false even if a previous download attempt failed.
3763
+ However, it is would be necessary to delete the intermediate
3764
+ file, which has the suffic &quot;.tmp&quot;.</p>
3456
3765
 
3457
3766
 
3458
3767
  </div>
@@ -3471,8 +3780,7 @@
3471
3780
 
3472
3781
 
3473
3782
  &mdash;
3474
- <div class='inline'>
3475
- <p>ID of the status to retrieve</p>
3783
+ <div class='inline'><p>ID of the status to retrieve</p>
3476
3784
  </div>
3477
3785
 
3478
3786
  </li>
@@ -3489,8 +3797,7 @@
3489
3797
 
3490
3798
 
3491
3799
  &mdash;
3492
- <div class='inline'>
3493
- <p>Path to the download directory</p>
3800
+ <div class='inline'><p>Path to the download directory</p>
3494
3801
  </div>
3495
3802
 
3496
3803
  </li>
@@ -3507,8 +3814,8 @@
3507
3814
 
3508
3815
 
3509
3816
  &mdash;
3510
- <div class='inline'>
3511
- <p>Fetch the media even if it is already present</p>
3817
+ <div class='inline'><p>Fetch the media even if it is already
3818
+ present</p>
3512
3819
  </div>
3513
3820
 
3514
3821
  </li>
@@ -3526,8 +3833,8 @@
3526
3833
 
3527
3834
 
3528
3835
  &mdash;
3529
- <div class='inline'>
3530
- <p>the Status and a Hash mapping the media URL to the corresponding local file.</p>
3836
+ <div class='inline'><p>the Status and a Hash mapping the media
3837
+ URL to the corresponding local file.</p>
3531
3838
  </div>
3532
3839
 
3533
3840
  </li>
@@ -3547,34 +3854,34 @@
3547
3854
  <pre class="lines">
3548
3855
 
3549
3856
 
3550
- 227
3551
- 228
3552
- 229
3553
- 230
3554
- 231
3555
- 232
3556
- 233
3557
- 234
3558
- 235
3559
- 236
3560
- 237
3561
- 238
3562
- 239
3563
- 240
3564
- 241
3565
- 242
3566
- 243
3567
- 244
3568
- 245
3569
- 246
3570
- 247
3571
- 248
3572
- 249
3573
- 250
3574
- 251</pre>
3857
+ 325
3858
+ 326
3859
+ 327
3860
+ 328
3861
+ 329
3862
+ 330
3863
+ 331
3864
+ 332
3865
+ 333
3866
+ 334
3867
+ 335
3868
+ 336
3869
+ 337
3870
+ 338
3871
+ 339
3872
+ 340
3873
+ 341
3874
+ 342
3875
+ 343
3876
+ 344
3877
+ 345
3878
+ 346
3879
+ 347
3880
+ 348
3881
+ 349</pre>
3575
3882
  </td>
3576
3883
  <td>
3577
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 227</span>
3884
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 325</span>
3578
3885
 
3579
3886
  <span class='kw'>def</span> <span class='id identifier rubyid_fetch_status_with_media'>fetch_status_with_media</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_media_dir'>media_dir</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>refetch:</span> <span class='kw'>true</span><span class='rparen'>)</span>
3580
3887
  <span class='id identifier rubyid_status'>status</span> <span class='op'>=</span> <span class='id identifier rubyid_fetch_status'>fetch_status</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
@@ -3585,18 +3892,18 @@
3585
3892
 
3586
3893
  <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_refetch'>refetch</span> <span class='op'>&amp;&amp;</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_outfile'>outfile</span><span class='rparen'>)</span>
3587
3894
  <span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Found &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_outfile'>outfile</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39;; skipping.</span><span class='tstring_end'>&quot;</span></span>
3588
- <span class='id identifier rubyid_success'>success</span> <span class='op'>=</span> <span class='kw'>true</span>
3589
3895
  <span class='kw'>else</span>
3590
3896
  <span class='id identifier rubyid_tmp'>tmp</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_media_dir'>media_dir</span><span class='comma'>,</span> <span class='const'>SecureRandom</span><span class='period'>.</span><span class='id identifier rubyid_uuid'>uuid</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.tmp</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
3591
- <span class='id identifier rubyid_success'>success</span> <span class='op'>=</span> <span class='id identifier rubyid_basic_get_binary'>basic_get_binary</span><span class='lparen'>(</span><span class='id identifier rubyid_ma'>ma</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_tmp'>tmp</span><span class='rparen'>)</span>
3592
- <span class='kw'>if</span> <span class='id identifier rubyid_success'>success</span>
3897
+ <span class='kw'>begin</span>
3898
+ <span class='id identifier rubyid_basic_get_binary'>basic_get_binary</span><span class='lparen'>(</span><span class='id identifier rubyid_ma'>ma</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_tmp'>tmp</span><span class='rparen'>)</span>
3593
3899
  <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_mv'>mv</span><span class='lparen'>(</span><span class='id identifier rubyid_tmp'>tmp</span><span class='comma'>,</span> <span class='id identifier rubyid_outfile'>outfile</span><span class='rparen'>)</span>
3594
- <span class='kw'>else</span>
3900
+ <span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="Error.html" title="Shep::Error (class)">Error</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Error/Http.html" title="Shep::Error::Http (class)">Http</a></span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
3595
3901
  <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_rm'>rm</span><span class='lparen'>(</span><span class='id identifier rubyid_tmp'>tmp</span><span class='comma'>,</span> <span class='label'>force:</span> <span class='kw'>true</span><span class='rparen'>)</span>
3902
+ <span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
3596
3903
  <span class='kw'>end</span>
3597
3904
  <span class='kw'>end</span>
3598
3905
 
3599
- <span class='id identifier rubyid_media'>media</span><span class='lbracket'>[</span><span class='id identifier rubyid_ma'>ma</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_success'>success</span> <span class='op'>?</span> <span class='id identifier rubyid_outfile'>outfile</span> <span class='op'>:</span> <span class='kw'>nil</span>
3906
+ <span class='id identifier rubyid_media'>media</span><span class='lbracket'>[</span><span class='id identifier rubyid_ma'>ma</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_outfile'>outfile</span>
3600
3907
  <span class='rbrace'>}</span>
3601
3908
 
3602
3909
  <span class='kw'>return</span> <span class='lbracket'>[</span><span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='id identifier rubyid_media'>media</span><span class='rbracket'>]</span>
@@ -3609,7 +3916,7 @@
3609
3916
  <div class="method_details ">
3610
3917
  <h3 class="signature " id="post_status-instance_method">
3611
3918
 
3612
- #<strong>post_status</strong>(text, visibility: :private, media_ids: [], spoiler_text: &quot;&quot;, language: &quot;&quot;) &#x21d2; <tt>Object</tt>
3919
+ #<strong>post_status</strong>(text, visibility: :private, media_ids: [], spoiler_text: &quot;&quot;, language: &quot;&quot;) &#x21d2; <tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>
3613
3920
 
3614
3921
 
3615
3922
 
@@ -3617,12 +3924,14 @@
3617
3924
 
3618
3925
  </h3><div class="docstring">
3619
3926
  <div class="discussion">
3620
-
3621
- <p>Post a status containing the given text at the specified visibility with zero or more media attachments.</p>
3927
+ <p>Post a status containing the given text at the specified
3928
+ visibility with zero or more media attachments.</p>
3622
3929
 
3623
- <p>visibility can be one of public’, private’, unlisted or ‘direct’; these can be strings of symbols)</p>
3930
+ <p>visibility can be one of &#39;public&#39;, &#39;private&#39;, &#39;unlisted&#39; or
3931
+ &#39;direct&#39;; these can be strings of symbols)</p>
3624
3932
 
3625
- <p>media_ids is an array containing the ID strings of any media that may need to be attached.</p>
3933
+ <p>media_ids is an array containing the ID strings of any media
3934
+ that may need to be attached.</p>
3626
3935
 
3627
3936
 
3628
3937
  </div>
@@ -3643,8 +3952,8 @@
3643
3952
 
3644
3953
 
3645
3954
  &mdash;
3646
- <div class='inline'>
3647
- <p>Status visibility; one of :public, :public, :unlisted or :direct</p>
3955
+ <div class='inline'><p>Status visibility; one of :public,
3956
+ :public, :unlisted or :direct</p>
3648
3957
  </div>
3649
3958
 
3650
3959
  </li>
@@ -3661,8 +3970,7 @@
3661
3970
 
3662
3971
 
3663
3972
  &mdash;
3664
- <div class='inline'>
3665
- <p>List of IDs of attached media items.</p>
3973
+ <div class='inline'><p>List of IDs of attached media items.</p>
3666
3974
  </div>
3667
3975
 
3668
3976
  </li>
@@ -3679,8 +3987,8 @@
3679
3987
 
3680
3988
 
3681
3989
  &mdash;
3682
- <div class='inline'>
3683
- <p>Content warning if non-empty string. Also sets <code>sensitive</code> to true.</p>
3990
+ <div class='inline'><p>Content warning if non-empty string.
3991
+ Also sets <code>sensitive</code> to true.</p>
3684
3992
  </div>
3685
3993
 
3686
3994
  </li>
@@ -3697,14 +4005,30 @@
3697
4005
 
3698
4006
 
3699
4007
  &mdash;
3700
- <div class='inline'>
3701
- <p>ISO language code</p>
4008
+ <div class='inline'><p>ISO language code</p>
3702
4009
  </div>
3703
4010
 
3704
4011
  </li>
3705
4012
 
3706
4013
  </ul>
3707
4014
 
4015
+ <p class="tag_title">Returns:</p>
4016
+ <ul class="return">
4017
+
4018
+ <li>
4019
+
4020
+
4021
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>)</span>
4022
+
4023
+
4024
+
4025
+ &mdash;
4026
+ <div class='inline'><p>The new status.</p>
4027
+ </div>
4028
+
4029
+ </li>
4030
+
4031
+ </ul>
3708
4032
  <p class="tag_title">Raises:</p>
3709
4033
  <ul class="raise">
3710
4034
 
@@ -3732,30 +4056,30 @@
3732
4056
  <pre class="lines">
3733
4057
 
3734
4058
 
3735
- 554
3736
- 555
3737
- 556
3738
- 557
3739
- 558
3740
- 559
3741
- 560
3742
- 561
3743
- 562
3744
- 563
3745
- 564
3746
- 565
3747
- 566
3748
- 567
3749
- 568
3750
- 569
3751
- 570
3752
- 571
3753
- 572
3754
- 573
3755
- 574</pre>
4059
+ 686
4060
+ 687
4061
+ 688
4062
+ 689
4063
+ 690
4064
+ 691
4065
+ 692
4066
+ 693
4067
+ 694
4068
+ 695
4069
+ 696
4070
+ 697
4071
+ 698
4072
+ 699
4073
+ 700
4074
+ 701
4075
+ 702
4076
+ 703
4077
+ 704
4078
+ 705
4079
+ 706</pre>
3756
4080
  </td>
3757
4081
  <td>
3758
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 554</span>
4082
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 686</span>
3759
4083
 
3760
4084
  <span class='kw'>def</span> <span class='id identifier rubyid_post_status'>post_status</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='comma'>,</span>
3761
4085
  <span class='label'>visibility:</span> <span class='symbol'>:private</span><span class='comma'>,</span>
@@ -3794,19 +4118,24 @@
3794
4118
 
3795
4119
  </h3><div class="docstring">
3796
4120
  <div class="discussion">
3797
-
3798
- <p>Return the rate limit information as of the last operation.</p>
4121
+ <p>Return the rate limit information from the last REST request.</p>
3799
4122
 
3800
4123
  <p>The result is a Struct with the following fields:</p>
3801
- <ul><li>
3802
- <p>limit Integer - Number of allowed requests per time period</p>
3803
- </li><li>
3804
- <p>remaining Integer - Number of requests you have left</p>
3805
- </li><li>
3806
- <p>reset Time - Future time when the limit resets</p>
3807
- </li></ul>
3808
4124
 
3809
- <p>Note that different types of operations have different rate limits. For example, most endpoints can be called up to 300 times within 5 minutes but no more than 30 media uploads are allowed within a 30 minute time period.</p>
4125
+ <ul>
4126
+ <li>limit Integer - Number of allowed requests per time period</li>
4127
+ <li>remaining Integer - Number of requests you have left</li>
4128
+ <li>reset Time - Future time when the limit resets</li>
4129
+ </ul>
4130
+
4131
+ <p>Note that different types of operations have different rate
4132
+ limits. For example, most endpoints can be called up to 300
4133
+ times within 5 minutes but no more than 30 media uploads are
4134
+ allowed within a 30 minute time period.</p>
4135
+
4136
+ <p>Note also that some Shep methods will perform multiple API
4137
+ requests; this is only ever the rate limit information from the
4138
+ latest of these.</p>
3810
4139
 
3811
4140
 
3812
4141
  </div>
@@ -3840,10 +4169,10 @@
3840
4169
  <pre class="lines">
3841
4170
 
3842
4171
 
3843
- 107</pre>
4172
+ 200</pre>
3844
4173
  </td>
3845
4174
  <td>
3846
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 107</span>
4175
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 200</span>
3847
4176
 
3848
4177
  <span class='kw'>def</span> <span class='id identifier rubyid_rate_limit'>rate_limit</span> <span class='op'>=</span> <span class='ivar'>@rate_limit</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre>
3849
4178
  </td>
@@ -3862,8 +4191,7 @@
3862
4191
 
3863
4192
  </h3><div class="docstring">
3864
4193
  <div class="discussion">
3865
-
3866
- <p>Return a human-readable summary of the rate limit.</p>
4194
+ <p>Return a human-readable summary of the rate limit.</p>
3867
4195
 
3868
4196
  <p>text</p>
3869
4197
 
@@ -3883,8 +4211,7 @@
3883
4211
 
3884
4212
 
3885
4213
  &mdash;
3886
- <div class='inline'>
3887
- <p><code>rate_limit()</code>‘s result as nicely-formatted</p>
4214
+ <div class='inline'><p><code>rate_limit()</code>&#39;s result as nicely-formatted</p>
3888
4215
  </div>
3889
4216
 
3890
4217
  </li>
@@ -3897,16 +4224,16 @@
3897
4224
  <pre class="lines">
3898
4225
 
3899
4226
 
3900
- 114
3901
- 115
3902
- 116
3903
- 117
3904
- 118
3905
- 119
3906
- 120</pre>
4227
+ 207
4228
+ 208
4229
+ 209
4230
+ 210
4231
+ 211
4232
+ 212
4233
+ 213</pre>
3907
4234
  </td>
3908
4235
  <td>
3909
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 114</span>
4236
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 207</span>
3910
4237
 
3911
4238
  <span class='kw'>def</span> <span class='id identifier rubyid_rate_limit_desc'>rate_limit_desc</span>
3912
4239
  <span class='id identifier rubyid_rem'>rem</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='ivar'>@rate_limit</span><span class='period'>.</span><span class='id identifier rubyid_remaining'>remaining</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>?</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
@@ -3931,8 +4258,7 @@
3931
4258
 
3932
4259
  </h3><div class="docstring">
3933
4260
  <div class="discussion">
3934
-
3935
- <p>Upload the media contained in the file at ‘path’.</p>
4261
+ <p>Upload the media contained in the file at &#39;path&#39;.</p>
3936
4262
 
3937
4263
 
3938
4264
  </div>
@@ -3953,36 +4279,36 @@
3953
4279
  <pre class="lines">
3954
4280
 
3955
4281
 
3956
- 624
3957
- 625
3958
- 626
3959
- 627
3960
- 628
3961
- 629
3962
- 630
3963
- 631
3964
- 632
3965
- 633
3966
- 634
3967
- 635
3968
- 636
3969
- 637
3970
- 638
3971
- 639
3972
- 640
3973
- 641
3974
- 642
3975
- 643
3976
- 644
3977
- 645
3978
- 646
3979
- 647
3980
- 648
3981
- 649
3982
- 650</pre>
4282
+ 756
4283
+ 757
4284
+ 758
4285
+ 759
4286
+ 760
4287
+ 761
4288
+ 762
4289
+ 763
4290
+ 764
4291
+ 765
4292
+ 766
4293
+ 767
4294
+ 768
4295
+ 769
4296
+ 770
4297
+ 771
4298
+ 772
4299
+ 773
4300
+ 774
4301
+ 775
4302
+ 776
4303
+ 777
4304
+ 778
4305
+ 779
4306
+ 780
4307
+ 781
4308
+ 782</pre>
3983
4309
  </td>
3984
4310
  <td>
3985
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 624</span>
4311
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 756</span>
3986
4312
 
3987
4313
  <span class='kw'>def</span> <span class='id identifier rubyid_upload_media'>upload_media</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span>
3988
4314
  <span class='label'>content_type:</span> <span class='kw'>nil</span><span class='comma'>,</span>
@@ -4027,8 +4353,7 @@
4027
4353
 
4028
4354
  </h3><div class="docstring">
4029
4355
  <div class="discussion">
4030
-
4031
- <p>Return the Entity::Account object for the token we’re using.</p>
4356
+ <p>Return the Entity::Account object for the token we&#39;re using.</p>
4032
4357
 
4033
4358
  <p>Requires a token (obviously).</p>
4034
4359
 
@@ -4064,12 +4389,12 @@
4064
4389
  <pre class="lines">
4065
4390
 
4066
4391
 
4067
- 134
4068
- 135
4069
- 136</pre>
4392
+ 227
4393
+ 228
4394
+ 229</pre>
4070
4395
  </td>
4071
4396
  <td>
4072
- <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 134</span>
4397
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 227</span>
4073
4398
 
4074
4399
  <span class='kw'>def</span> <span class='id identifier rubyid_verify_credentials'>verify_credentials</span>
4075
4400
  <span class='kw'>return</span> <span class='id identifier rubyid_rest_get'>rest_get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>accounts/verify_credentials</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Entity.html" title="Shep::Entity (class)">Entity</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Account</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
@@ -4084,9 +4409,9 @@
4084
4409
  </div>
4085
4410
 
4086
4411
  <div id="footer">
4087
- Generated on Sun Jun 4 13:40:34 2023 by
4412
+ Generated on Sat Jun 10 19:16:30 2023 by
4088
4413
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
4089
- 0.9.34 (ruby-3.1.0).
4414
+ 0.9.34 (ruby-3.0.3).
4090
4415
  </div>
4091
4416
 
4092
4417
  </div>