shep 0.1.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 (67) hide show
  1. checksums.yaml +7 -0
  2. data/Copyright.txt +8 -0
  3. data/LICENSE.txt +697 -0
  4. data/README.md +101 -0
  5. data/Rakefile +52 -0
  6. data/doc/Shep/Entity/Account.html +193 -0
  7. data/doc/Shep/Entity/Context.html +165 -0
  8. data/doc/Shep/Entity/CustomEmoji.html +171 -0
  9. data/doc/Shep/Entity/MediaAttachment.html +175 -0
  10. data/doc/Shep/Entity/Notification.html +171 -0
  11. data/doc/Shep/Entity/Status.html +217 -0
  12. data/doc/Shep/Entity/StatusSource.html +167 -0
  13. data/doc/Shep/Entity/Status_Application.html +167 -0
  14. data/doc/Shep/Entity/Status_Mention.html +169 -0
  15. data/doc/Shep/Entity/Status_Tag.html +165 -0
  16. data/doc/Shep/Entity.html +1457 -0
  17. data/doc/Shep/Error/Caller.html +147 -0
  18. data/doc/Shep/Error/Http.html +329 -0
  19. data/doc/Shep/Error/Remote.html +143 -0
  20. data/doc/Shep/Error/Server.html +147 -0
  21. data/doc/Shep/Error/Type.html +233 -0
  22. data/doc/Shep/Error.html +149 -0
  23. data/doc/Shep/Session.html +4094 -0
  24. data/doc/Shep.html +128 -0
  25. data/doc/_index.html +300 -0
  26. data/doc/class_list.html +51 -0
  27. data/doc/css/common.css +1 -0
  28. data/doc/css/full_list.css +58 -0
  29. data/doc/css/style.css +497 -0
  30. data/doc/file.README.html +159 -0
  31. data/doc/file_list.html +56 -0
  32. data/doc/frames.html +17 -0
  33. data/doc/index.html +300 -0
  34. data/doc/js/app.js +314 -0
  35. data/doc/js/full_list.js +216 -0
  36. data/doc/js/jquery.js +4 -0
  37. data/doc/method_list.html +387 -0
  38. data/doc/top-level-namespace.html +110 -0
  39. data/lib/shep/entities.rb +164 -0
  40. data/lib/shep/entity_base.rb +378 -0
  41. data/lib/shep/exceptions.rb +78 -0
  42. data/lib/shep/session.rb +970 -0
  43. data/lib/shep/typeboxes.rb +180 -0
  44. data/lib/shep.rb +22 -0
  45. data/run_rake_test.example.sh +46 -0
  46. data/shep.gemspec +28 -0
  47. data/spec/data/smallimg.jpg +0 -0
  48. data/spec/data/smallish.jpg +0 -0
  49. data/spec/entity_common.rb +120 -0
  50. data/spec/entity_t1_spec.rb +168 -0
  51. data/spec/entity_t2_spec.rb +123 -0
  52. data/spec/entity_t3_spec.rb +30 -0
  53. data/spec/json_objects/account.1.json +25 -0
  54. data/spec/json_objects/account.2.json +36 -0
  55. data/spec/json_objects/status.1.json +85 -0
  56. data/spec/json_objects/status.2.json +59 -0
  57. data/spec/json_objects/status.3.json +95 -0
  58. data/spec/json_objects/status.4.json +95 -0
  59. data/spec/json_objects/status.5.json +74 -0
  60. data/spec/json_objects/status.6.json +140 -0
  61. data/spec/json_objects/status.7.json +84 -0
  62. data/spec/session_reader_1_unauth_spec.rb +366 -0
  63. data/spec/session_reader_2_auth_spec.rb +96 -0
  64. data/spec/session_writer_spec.rb +183 -0
  65. data/spec/spec_helper.rb +73 -0
  66. data/yard_helper.rb +30 -0
  67. metadata +154 -0
@@ -0,0 +1,4094 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Shep::Session
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Shep::Session";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (S)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Shep.html" title="Shep (module)">Shep</a></span></span>
41
+ &raquo;
42
+ <span class="title">Session</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Shep::Session
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Shep::Session</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/shep/session.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Represents a connection to a Mastodon (or equivalent) server.</p>
106
+
107
+ <h2 id="label-Conventions">Conventions</h2>
108
+
109
+ <p><code>fetch_*</code> methods retrieve a single Mastodon object, an <code>Entity</code> subinstance.</p>
110
+
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>
112
+
113
+ <p><code>each_*</code> will automatically paginate through the available items; for example,</p>
114
+
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>
116
+ </code></pre>
117
+
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>
119
+
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>
121
+
122
+ <p>All API calls throw an exception on failure.</p>
123
+
124
+
125
+ </div>
126
+ </div>
127
+ <div class="tags">
128
+
129
+
130
+ </div>
131
+
132
+
133
+
134
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
135
+ <ul class="summary">
136
+
137
+ <li class="public ">
138
+ <span class="summary_signature">
139
+
140
+ <a href="#host-instance_method" title="#host (instance method)">#<strong>host</strong> &#x21d2; String </a>
141
+
142
+
143
+
144
+ </span>
145
+
146
+
147
+
148
+
149
+ <span class="note title readonly">readonly</span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'>
160
+ <p>The Server’s hostname.</p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ <li class="public ">
167
+ <span class="summary_signature">
168
+
169
+ <a href="#logger-instance_method" title="#logger (instance method)">#<strong>logger</strong> &#x21d2; Logger </a>
170
+
171
+
172
+
173
+ </span>
174
+
175
+
176
+
177
+
178
+ <span class="note title readonly">readonly</span>
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ <span class="summary_desc"><div class='inline'>
189
+ <p>The logger object.</p>
190
+ </div></span>
191
+
192
+ </li>
193
+
194
+
195
+ </ul>
196
+
197
+
198
+
199
+
200
+
201
+ <h2>
202
+ Instance Method Summary
203
+ <small><a href="#" class="summary_toggle">collapse</a></small>
204
+ </h2>
205
+
206
+ <ul class="summary">
207
+
208
+ <li class="public ">
209
+ <span class="summary_signature">
210
+
211
+ <a href="#delete_status-instance_method" title="#delete_status (instance method)">#<strong>delete_status</strong>(id) &#x21d2; Entity::Status </a>
212
+
213
+
214
+
215
+ </span>
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+ <span class="summary_desc"><div class='inline'>
226
+ <p>Delete the status at ID.</p>
227
+ </div></span>
228
+
229
+ </li>
230
+
231
+
232
+ <li class="public ">
233
+ <span class="summary_signature">
234
+
235
+ <a href="#dismiss_notification-instance_method" title="#dismiss_notification (instance method)">#<strong>dismiss_notification</strong>(id) &#x21d2; Object </a>
236
+
237
+
238
+
239
+ </span>
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+ <span class="summary_desc"><div class='inline'>
250
+ <p>Dismiss the notification with the given ID.</p>
251
+ </div></span>
252
+
253
+ </li>
254
+
255
+
256
+ <li class="public ">
257
+ <span class="summary_signature">
258
+
259
+ <a href="#each_boost_acct-instance_method" title="#each_boost_acct (instance method)">#<strong>each_boost_acct</strong>(status_id, limit: nil) {|item| ... } &#x21d2; Enumerator </a>
260
+
261
+
262
+
263
+ </span>
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+ <span class="summary_desc"><div class='inline'>
274
+ <p>Retrieve each Entity::Account that boosted the given status.</p>
275
+ </div></span>
276
+
277
+ </li>
278
+
279
+
280
+ <li class="public ">
281
+ <span class="summary_signature">
282
+
283
+ <a href="#each_fave_acct-instance_method" title="#each_fave_acct (instance method)">#<strong>each_fave_acct</strong>(status_id, limit: nil) {|item| ... } &#x21d2; Enumerator </a>
284
+
285
+
286
+
287
+ </span>
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ <span class="summary_desc"><div class='inline'>
298
+ <p>Retrieve each account that favourited the given status.</p>
299
+ </div></span>
300
+
301
+ </li>
302
+
303
+
304
+ <li class="public ">
305
+ <span class="summary_signature">
306
+
307
+ <a href="#each_follower-instance_method" title="#each_follower (instance method)">#<strong>each_follower</strong>(account_id, limit: nil) {|item| ... } &#x21d2; Enumerator </a>
308
+
309
+
310
+
311
+ </span>
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+ <span class="summary_desc"><div class='inline'>
322
+ <p>Retrieve the follower list of an account.</p>
323
+ </div></span>
324
+
325
+ </li>
326
+
327
+
328
+ <li class="public ">
329
+ <span class="summary_signature">
330
+
331
+ <a href="#each_following-instance_method" title="#each_following (instance method)">#<strong>each_following</strong>(account_id, limit: nil) {|item| ... } &#x21d2; Enumerator </a>
332
+
333
+
334
+
335
+ </span>
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+ <span class="summary_desc"><div class='inline'>
346
+ <p>Retrieve the list of accounts this account follows.</p>
347
+ </div></span>
348
+
349
+ </li>
350
+
351
+
352
+ <li class="public ">
353
+ <span class="summary_signature">
354
+
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>
356
+
357
+
358
+
359
+ </span>
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+ <span class="summary_desc"><div class='inline'>
370
+ <p>Retrieve each Entity::Status in the home timeline.</p>
371
+ </div></span>
372
+
373
+ </li>
374
+
375
+
376
+ <li class="public ">
377
+ <span class="summary_signature">
378
+
379
+ <a href="#each_notification-instance_method" title="#each_notification (instance method)">#<strong>each_notification</strong>(types: [], exclude_types: [], limit: nil, account_id: nil) {|item| ... } &#x21d2; Enumerator </a>
380
+
381
+
382
+
383
+ </span>
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+ <span class="summary_desc"><div class='inline'>
394
+ <p>Retrieve each notification.</p>
395
+ </div></span>
396
+
397
+ </li>
398
+
399
+
400
+ <li class="public ">
401
+ <span class="summary_signature">
402
+
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>
404
+
405
+
406
+
407
+ </span>
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+ <span class="summary_desc"><div class='inline'>
418
+ <p>Retrieve the instance’s public timeline(s).</p>
419
+ </div></span>
420
+
421
+ </li>
422
+
423
+
424
+ <li class="public ">
425
+ <span class="summary_signature">
426
+
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>
428
+
429
+
430
+
431
+ </span>
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+ <span class="summary_desc"><div class='inline'>
442
+ <p>Retrieve the account’s statuses.</p>
443
+ </div></span>
444
+
445
+ </li>
446
+
447
+
448
+ <li class="public ">
449
+ <span class="summary_signature">
450
+
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>
452
+
453
+
454
+
455
+ </span>
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+ <span class="summary_desc"><div class='inline'>
466
+ <p>Retrieve a tag’s timeline.</p>
467
+ </div></span>
468
+
469
+ </li>
470
+
471
+
472
+ <li class="public ">
473
+ <span class="summary_signature">
474
+
475
+ <a href="#edit_status-instance_method" title="#edit_status (instance method)">#<strong>edit_status</strong>(id, status, media_ids: [], spoiler_text: &quot;&quot;, language: &quot;en&quot;) &#x21d2; Entity::Status </a>
476
+
477
+
478
+
479
+ </span>
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+ <span class="summary_desc"><div class='inline'>
490
+ <p>Update the status with the given Id.</p>
491
+ </div></span>
492
+
493
+ </li>
494
+
495
+
496
+ <li class="public ">
497
+ <span class="summary_signature">
498
+
499
+ <a href="#fetch_account-instance_method" title="#fetch_account (instance method)">#<strong>fetch_account</strong>(id) &#x21d2; Entity::Account </a>
500
+
501
+
502
+
503
+ </span>
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+ <span class="summary_desc"><div class='inline'>
514
+ <p>Fetch user details by ID.</p>
515
+ </div></span>
516
+
517
+ </li>
518
+
519
+
520
+ <li class="public ">
521
+ <span class="summary_signature">
522
+
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>
524
+
525
+
526
+
527
+ </span>
528
+
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+ <span class="summary_desc"><div class='inline'>
538
+ <p>Fetch user details by username.</p>
539
+ </div></span>
540
+
541
+ </li>
542
+
543
+
544
+ <li class="public ">
545
+ <span class="summary_signature">
546
+
547
+ <a href="#fetch_context-instance_method" title="#fetch_context (instance method)">#<strong>fetch_context</strong>(id) &#x21d2; Entity::Context </a>
548
+
549
+
550
+
551
+ </span>
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+ <span class="summary_desc"><div class='inline'>
562
+ <p>Fetch the context (parent and child status) of status at ‘id’.</p>
563
+ </div></span>
564
+
565
+ </li>
566
+
567
+
568
+ <li class="public ">
569
+ <span class="summary_signature">
570
+
571
+ <a href="#fetch_notification-instance_method" title="#fetch_notification (instance method)">#<strong>fetch_notification</strong>(ntfn_id) &#x21d2; Entity::Notification </a>
572
+
573
+
574
+
575
+ </span>
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+ <span class="summary_desc"><div class='inline'>
586
+ <p>Fetch an individual notification by ID.</p>
587
+ </div></span>
588
+
589
+ </li>
590
+
591
+
592
+ <li class="public ">
593
+ <span class="summary_signature">
594
+
595
+ <a href="#fetch_status-instance_method" title="#fetch_status (instance method)">#<strong>fetch_status</strong>(id) &#x21d2; Entity::Status </a>
596
+
597
+
598
+
599
+ </span>
600
+
601
+
602
+
603
+
604
+
605
+
606
+
607
+
608
+
609
+ <span class="summary_desc"><div class='inline'>
610
+ <p>Fetch a single status.</p>
611
+ </div></span>
612
+
613
+ </li>
614
+
615
+
616
+ <li class="public ">
617
+ <span class="summary_signature">
618
+
619
+ <a href="#fetch_status_src-instance_method" title="#fetch_status_src (instance method)">#<strong>fetch_status_src</strong>(id) &#x21d2; Entity::StatusSource </a>
620
+
621
+
622
+
623
+ </span>
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+ <span class="summary_desc"><div class='inline'>
634
+ <p>Fetch the editable source of status at id.</p>
635
+ </div></span>
636
+
637
+ </li>
638
+
639
+
640
+ <li class="public ">
641
+ <span class="summary_signature">
642
+
643
+ <a href="#fetch_status_with_media-instance_method" title="#fetch_status_with_media (instance method)">#<strong>fetch_status_with_media</strong>(id, media_dir = &#39;.&#39;, refetch: true) &#x21d2; Entity::Status, Hash </a>
644
+
645
+
646
+
647
+ </span>
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+ <span class="summary_desc"><div class='inline'>
658
+ <p>Fetch the given status and also any attached media.</p>
659
+ </div></span>
660
+
661
+ </li>
662
+
663
+
664
+ <li class="public ">
665
+ <span class="summary_signature">
666
+
667
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(host:, token: nil, logger: nil, debug_http: false) &#x21d2; Session </a>
668
+
669
+
670
+
671
+ </span>
672
+
673
+
674
+ <span class="note title constructor">constructor</span>
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
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>
685
+ </div></span>
686
+
687
+ </li>
688
+
689
+
690
+ <li class="public ">
691
+ <span class="summary_signature">
692
+
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>
694
+
695
+
696
+
697
+ </span>
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+
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>
709
+ </div></span>
710
+
711
+ </li>
712
+
713
+
714
+ <li class="public ">
715
+ <span class="summary_signature">
716
+
717
+ <a href="#rate_limit-instance_method" title="#rate_limit (instance method)">#<strong>rate_limit</strong> &#x21d2; Struct.new(:limit, :remaining, :reset) </a>
718
+
719
+
720
+
721
+ </span>
722
+
723
+
724
+
725
+
726
+
727
+
728
+
729
+
730
+
731
+ <span class="summary_desc"><div class='inline'>
732
+ <p>Return the rate limit information as of the last operation.</p>
733
+ </div></span>
734
+
735
+ </li>
736
+
737
+
738
+ <li class="public ">
739
+ <span class="summary_signature">
740
+
741
+ <a href="#rate_limit_desc-instance_method" title="#rate_limit_desc (instance method)">#<strong>rate_limit_desc</strong> &#x21d2; String </a>
742
+
743
+
744
+
745
+ </span>
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+
754
+
755
+ <span class="summary_desc"><div class='inline'>
756
+ <p>Return a human-readable summary of the rate limit.</p>
757
+ </div></span>
758
+
759
+ </li>
760
+
761
+
762
+ <li class="public ">
763
+ <span class="summary_signature">
764
+
765
+ <a href="#upload_media-instance_method" title="#upload_media (instance method)">#<strong>upload_media</strong>(path, content_type: nil, description: nil, focus_x: nil, focus_y: nil) &#x21d2; Object </a>
766
+
767
+
768
+
769
+ </span>
770
+
771
+
772
+
773
+
774
+
775
+
776
+
777
+
778
+
779
+ <span class="summary_desc"><div class='inline'>
780
+ <p>Upload the media contained in the file at ‘path’.</p>
781
+ </div></span>
782
+
783
+ </li>
784
+
785
+
786
+ <li class="public ">
787
+ <span class="summary_signature">
788
+
789
+ <a href="#verify_credentials-instance_method" title="#verify_credentials (instance method)">#<strong>verify_credentials</strong> &#x21d2; Entity::Account </a>
790
+
791
+
792
+
793
+ </span>
794
+
795
+
796
+
797
+
798
+
799
+
800
+
801
+
802
+
803
+ <span class="summary_desc"><div class='inline'>
804
+ <p>Return the Entity::Account object for the token we’re using.</p>
805
+ </div></span>
806
+
807
+ </li>
808
+
809
+
810
+ </ul>
811
+
812
+
813
+ <div id="constructor_details" class="method_details_list">
814
+ <h2>Constructor Details</h2>
815
+
816
+ <div class="method_details first">
817
+ <h3 class="signature first" id="initialize-instance_method">
818
+
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>
820
+
821
+
822
+
823
+
824
+
825
+ </h3><div class="docstring">
826
+ <div class="discussion">
827
+
828
+ <p>Initialize a new <span class='object_link'><a href="" title="Shep::Session (class)">Shep::Session</a></span>.</p>
829
+
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>
831
+
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>
833
+
834
+
835
+ </div>
836
+ </div>
837
+ <div class="tags">
838
+ <p class="tag_title">Parameters:</p>
839
+ <ul class="param">
840
+
841
+ <li>
842
+
843
+ <span class='name'>host</span>
844
+
845
+
846
+ <span class='type'>(<tt>String</tt>)</span>
847
+
848
+
849
+
850
+ &mdash;
851
+ <div class='inline'>
852
+ <p>Hostname of the server</p>
853
+ </div>
854
+
855
+ </li>
856
+
857
+ <li>
858
+
859
+ <span class='name'>token</span>
860
+
861
+
862
+ <span class='type'>(<tt>String</tt>)</span>
863
+
864
+
865
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
866
+
867
+
868
+ &mdash;
869
+ <div class='inline'>
870
+ <p>Bearer token; optional</p>
871
+ </div>
872
+
873
+ </li>
874
+
875
+ <li>
876
+
877
+ <span class='name'>logger</span>
878
+
879
+
880
+ <span class='type'>(<tt>Logger</tt>)</span>
881
+
882
+
883
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
884
+
885
+
886
+ &mdash;
887
+ <div class='inline'>
888
+ <p>The logger or mode; optional</p>
889
+ </div>
890
+
891
+ </li>
892
+
893
+ <li>
894
+
895
+ <span class='name'>debug_http</span>
896
+
897
+
898
+ <span class='type'>(<tt>Boolean</tt>)</span>
899
+
900
+
901
+ <em class="default">(defaults to: <tt>false</tt>)</em>
902
+
903
+
904
+ &mdash;
905
+ <div class='inline'>
906
+ <p>Enable <code>Net::HTTP</code> debugging; insecure!</p>
907
+ </div>
908
+
909
+ </li>
910
+
911
+ </ul>
912
+
913
+
914
+ </div><table class="source_code">
915
+ <tr>
916
+ <td>
917
+ <pre class="lines">
918
+
919
+
920
+ 61
921
+ 62
922
+ 63
923
+ 64
924
+ 65
925
+ 66
926
+ 67
927
+ 68
928
+ 69
929
+ 70</pre>
930
+ </td>
931
+ <td>
932
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 61</span>
933
+
934
+ <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>
938
+ <span class='ivar'>@host</span> <span class='op'>=</span> <span class='id identifier rubyid_host'>host</span>
939
+ <span class='ivar'>@token</span> <span class='op'>=</span> <span class='id identifier rubyid_token'>token</span>
940
+ <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>
942
+ <span class='ivar'>@debug_http</span> <span class='op'>=</span> <span class='id identifier rubyid_debug_http'>debug_http</span>
943
+ <span class='kw'>end</span></pre>
944
+ </td>
945
+ </tr>
946
+ </table>
947
+ </div>
948
+
949
+ </div>
950
+
951
+ <div id="instance_attr_details" class="attr_details">
952
+ <h2>Instance Attribute Details</h2>
953
+
954
+
955
+ <span id=""></span>
956
+ <div class="method_details first">
957
+ <h3 class="signature first" id="host-instance_method">
958
+
959
+ #<strong>host</strong> &#x21d2; <tt>String</tt> <span class="extras">(readonly)</span>
960
+
961
+
962
+
963
+
964
+
965
+ </h3><div class="docstring">
966
+ <div class="discussion">
967
+
968
+ <p>The Server’s hostname</p>
969
+
970
+
971
+ </div>
972
+ </div>
973
+ <div class="tags">
974
+
975
+ <p class="tag_title">Returns:</p>
976
+ <ul class="return">
977
+
978
+ <li>
979
+
980
+
981
+ <span class='type'>(<tt>String</tt>)</span>
982
+
983
+
984
+
985
+ &mdash;
986
+ <div class='inline'>
987
+ <p>the current value of host</p>
988
+ </div>
989
+
990
+ </li>
991
+
992
+ </ul>
993
+
994
+ </div><table class="source_code">
995
+ <tr>
996
+ <td>
997
+ <pre class="lines">
998
+
999
+
1000
+ 41
1001
+ 42
1002
+ 43</pre>
1003
+ </td>
1004
+ <td>
1005
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 41</span>
1006
+
1007
+ <span class='kw'>def</span> <span class='id identifier rubyid_host'>host</span>
1008
+ <span class='ivar'>@host</span>
1009
+ <span class='kw'>end</span></pre>
1010
+ </td>
1011
+ </tr>
1012
+ </table>
1013
+ </div>
1014
+
1015
+
1016
+ <span id=""></span>
1017
+ <div class="method_details ">
1018
+ <h3 class="signature " id="logger-instance_method">
1019
+
1020
+ #<strong>logger</strong> &#x21d2; <tt>Logger</tt> <span class="extras">(readonly)</span>
1021
+
1022
+
1023
+
1024
+
1025
+
1026
+ </h3><div class="docstring">
1027
+ <div class="discussion">
1028
+
1029
+ <p>The logger object</p>
1030
+
1031
+
1032
+ </div>
1033
+ </div>
1034
+ <div class="tags">
1035
+
1036
+ <p class="tag_title">Returns:</p>
1037
+ <ul class="return">
1038
+
1039
+ <li>
1040
+
1041
+
1042
+ <span class='type'>(<tt>Logger</tt>)</span>
1043
+
1044
+
1045
+
1046
+ &mdash;
1047
+ <div class='inline'>
1048
+ <p>the current value of logger</p>
1049
+ </div>
1050
+
1051
+ </li>
1052
+
1053
+ </ul>
1054
+
1055
+ </div><table class="source_code">
1056
+ <tr>
1057
+ <td>
1058
+ <pre class="lines">
1059
+
1060
+
1061
+ 41
1062
+ 42
1063
+ 43</pre>
1064
+ </td>
1065
+ <td>
1066
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 41</span>
1067
+
1068
+ <span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
1069
+ <span class='ivar'>@logger</span>
1070
+ <span class='kw'>end</span></pre>
1071
+ </td>
1072
+ </tr>
1073
+ </table>
1074
+ </div>
1075
+
1076
+ </div>
1077
+
1078
+
1079
+ <div id="instance_method_details" class="method_details_list">
1080
+ <h2>Instance Method Details</h2>
1081
+
1082
+
1083
+ <div class="method_details first">
1084
+ <h3 class="signature first" id="delete_status-instance_method">
1085
+
1086
+ #<strong>delete_status</strong>(id) &#x21d2; <tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>
1087
+
1088
+
1089
+
1090
+
1091
+
1092
+ </h3><div class="docstring">
1093
+ <div class="discussion">
1094
+
1095
+ <p>Delete the status at ID.</p>
1096
+
1097
+
1098
+ </div>
1099
+ </div>
1100
+ <div class="tags">
1101
+
1102
+ <p class="tag_title">Returns:</p>
1103
+ <ul class="return">
1104
+
1105
+ <li>
1106
+
1107
+
1108
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>)</span>
1109
+
1110
+
1111
+
1112
+ &mdash;
1113
+ <div class='inline'>
1114
+ <p>the deleted status</p>
1115
+ </div>
1116
+
1117
+ </li>
1118
+
1119
+ </ul>
1120
+
1121
+ <p class="tag_title">See Also:</p>
1122
+ <ul class="see">
1123
+
1124
+ <li><a href="https://docs.joinmastodon.org/methods/statuses/#delete" target="_parent" title="https://docs.joinmastodon.org/methods/statuses/#delete">https://docs.joinmastodon.org/methods/statuses/#delete</a></li>
1125
+
1126
+ </ul>
1127
+
1128
+ </div><table class="source_code">
1129
+ <tr>
1130
+ <td>
1131
+ <pre class="lines">
1132
+
1133
+
1134
+ 657</pre>
1135
+ </td>
1136
+ <td>
1137
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 657</span>
1138
+
1139
+ <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
+ </td>
1141
+ </tr>
1142
+ </table>
1143
+ </div>
1144
+
1145
+ <div class="method_details ">
1146
+ <h3 class="signature " id="dismiss_notification-instance_method">
1147
+
1148
+ #<strong>dismiss_notification</strong>(id) &#x21d2; <tt>Object</tt>
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+ </h3><div class="docstring">
1155
+ <div class="discussion">
1156
+
1157
+ <p>Dismiss the notification with the given ID.</p>
1158
+
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>
1160
+
1161
+
1162
+ </div>
1163
+ </div>
1164
+ <div class="tags">
1165
+
1166
+
1167
+ <p class="tag_title">See Also:</p>
1168
+ <ul class="see">
1169
+
1170
+ <li><a href="https://docs.joinmastodon.org/methods/notifications/#dismiss" target="_parent" title="https://docs.joinmastodon.org/methods/notifications/#dismiss">https://docs.joinmastodon.org/methods/notifications/#dismiss</a></li>
1171
+
1172
+ </ul>
1173
+
1174
+ </div><table class="source_code">
1175
+ <tr>
1176
+ <td>
1177
+ <pre class="lines">
1178
+
1179
+
1180
+ 666
1181
+ 667
1182
+ 668
1183
+ 669
1184
+ 670</pre>
1185
+ </td>
1186
+ <td>
1187
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 666</span>
1188
+
1189
+ <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
+ <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>
1191
+ <span class='id identifier rubyid_basic_rest_post_or_put'>basic_rest_post_or_put</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1192
+ <span class='kw'>return</span> <span class='kw'>nil</span>
1193
+ <span class='kw'>end</span></pre>
1194
+ </td>
1195
+ </tr>
1196
+ </table>
1197
+ </div>
1198
+
1199
+ <div class="method_details ">
1200
+ <h3 class="signature " id="each_boost_acct-instance_method">
1201
+
1202
+ #<strong>each_boost_acct</strong>(status_id, limit: nil) {|item| ... } &#x21d2; <tt>Enumerator</tt>
1203
+
1204
+
1205
+
1206
+
1207
+
1208
+ </h3><div class="docstring">
1209
+ <div class="discussion">
1210
+
1211
+ <p>Retrieve each Entity::Account that boosted the given status.</p>
1212
+
1213
+
1214
+ </div>
1215
+ </div>
1216
+ <div class="tags">
1217
+ <p class="tag_title">Parameters:</p>
1218
+ <ul class="param">
1219
+
1220
+ <li>
1221
+
1222
+ <span class='name'>limit</span>
1223
+
1224
+
1225
+ <span class='type'>(<tt>Integer</tt>)</span>
1226
+
1227
+
1228
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1229
+
1230
+
1231
+ &mdash;
1232
+ <div class='inline'>
1233
+ <p>Maximum number of items to retrieve</p>
1234
+ </div>
1235
+
1236
+ </li>
1237
+
1238
+ </ul>
1239
+
1240
+ <p class="tag_title">Yields:</p>
1241
+ <ul class="yield">
1242
+
1243
+ <li>
1244
+
1245
+
1246
+ <span class='type'>(<tt>item</tt>)</span>
1247
+
1248
+
1249
+
1250
+ </li>
1251
+
1252
+ </ul>
1253
+ <p class="tag_title">Yield Parameters:</p>
1254
+ <ul class="yieldparam">
1255
+
1256
+ <li>
1257
+
1258
+ <span class='name'></span>
1259
+
1260
+
1261
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt>)</span>
1262
+
1263
+
1264
+
1265
+ </li>
1266
+
1267
+ </ul>
1268
+ <p class="tag_title">Returns:</p>
1269
+ <ul class="return">
1270
+
1271
+ <li>
1272
+
1273
+
1274
+ <span class='type'>(<tt>Enumerator</tt>)</span>
1275
+
1276
+
1277
+
1278
+ &mdash;
1279
+ <div class='inline'>
1280
+ <p>if block is not given, otherwise self</p>
1281
+ </div>
1282
+
1283
+ </li>
1284
+
1285
+ </ul>
1286
+
1287
+ <p class="tag_title">See Also:</p>
1288
+ <ul class="see">
1289
+
1290
+ <li><a href="https://docs.joinmastodon.org/methods/statuses/#reblogged_by" target="_parent" title="https://docs.joinmastodon.org/methods/statuses/#reblogged_by">https://docs.joinmastodon.org/methods/statuses/#reblogged_by</a></li>
1291
+
1292
+ </ul>
1293
+
1294
+ </div><table class="source_code">
1295
+ <tr>
1296
+ <td>
1297
+ <pre class="lines">
1298
+
1299
+
1300
+ 460
1301
+ 461
1302
+ 462
1303
+ 463
1304
+ 464
1305
+ 465
1306
+ 466</pre>
1307
+ </td>
1308
+ <td>
1309
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 460</span>
1310
+
1311
+ <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
+ <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1313
+ <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1314
+ <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_magically_get_caller_kwargs'>magically_get_caller_kwargs</span><span class='lparen'>(</span><span class='id identifier rubyid_binding'>binding</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid___method__'>__method__</span><span class='rparen'>)</span><span class='rparen'>)</span>
1315
+ <span class='id identifier rubyid_rest_get_seq'>rest_get_seq</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_status_id'>status_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/reblogged_by</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
1316
+ <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='id identifier rubyid_query'>query</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1317
+ <span class='kw'>end</span></pre>
1318
+ </td>
1319
+ </tr>
1320
+ </table>
1321
+ </div>
1322
+
1323
+ <div class="method_details ">
1324
+ <h3 class="signature " id="each_fave_acct-instance_method">
1325
+
1326
+ #<strong>each_fave_acct</strong>(status_id, limit: nil) {|item| ... } &#x21d2; <tt>Enumerator</tt>
1327
+
1328
+
1329
+
1330
+
1331
+
1332
+ </h3><div class="docstring">
1333
+ <div class="discussion">
1334
+
1335
+ <p>Retrieve each account that favourited the given status.</p>
1336
+
1337
+
1338
+ </div>
1339
+ </div>
1340
+ <div class="tags">
1341
+ <p class="tag_title">Parameters:</p>
1342
+ <ul class="param">
1343
+
1344
+ <li>
1345
+
1346
+ <span class='name'>limit</span>
1347
+
1348
+
1349
+ <span class='type'>(<tt>Integer</tt>)</span>
1350
+
1351
+
1352
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1353
+
1354
+
1355
+ &mdash;
1356
+ <div class='inline'>
1357
+ <p>Maximum number of items to retrieve</p>
1358
+ </div>
1359
+
1360
+ </li>
1361
+
1362
+ </ul>
1363
+
1364
+ <p class="tag_title">Yields:</p>
1365
+ <ul class="yield">
1366
+
1367
+ <li>
1368
+
1369
+
1370
+ <span class='type'>(<tt>item</tt>)</span>
1371
+
1372
+
1373
+
1374
+ </li>
1375
+
1376
+ </ul>
1377
+ <p class="tag_title">Yield Parameters:</p>
1378
+ <ul class="yieldparam">
1379
+
1380
+ <li>
1381
+
1382
+ <span class='name'></span>
1383
+
1384
+
1385
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt>)</span>
1386
+
1387
+
1388
+
1389
+ </li>
1390
+
1391
+ </ul>
1392
+ <p class="tag_title">Returns:</p>
1393
+ <ul class="return">
1394
+
1395
+ <li>
1396
+
1397
+
1398
+ <span class='type'>(<tt>Enumerator</tt>)</span>
1399
+
1400
+
1401
+
1402
+ &mdash;
1403
+ <div class='inline'>
1404
+ <p>if block is not given, otherwise self</p>
1405
+ </div>
1406
+
1407
+ </li>
1408
+
1409
+ </ul>
1410
+
1411
+ <p class="tag_title">See Also:</p>
1412
+ <ul class="see">
1413
+
1414
+ <li><a href="https://docs.joinmastodon.org/methods/statuses/#favourited_by" target="_parent" title="https://docs.joinmastodon.org/methods/statuses/#favourited_by">https://docs.joinmastodon.org/methods/statuses/#favourited_by</a></li>
1415
+
1416
+ </ul>
1417
+
1418
+ </div><table class="source_code">
1419
+ <tr>
1420
+ <td>
1421
+ <pre class="lines">
1422
+
1423
+
1424
+ 480
1425
+ 481
1426
+ 482
1427
+ 483
1428
+ 484
1429
+ 485
1430
+ 486</pre>
1431
+ </td>
1432
+ <td>
1433
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 480</span>
1434
+
1435
+ <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
+ <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1437
+ <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1438
+ <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_magically_get_caller_kwargs'>magically_get_caller_kwargs</span><span class='lparen'>(</span><span class='id identifier rubyid_binding'>binding</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid___method__'>__method__</span><span class='rparen'>)</span><span class='rparen'>)</span>
1439
+ <span class='id identifier rubyid_rest_get_seq'>rest_get_seq</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_status_id'>status_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/favourited_by</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
1440
+ <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='id identifier rubyid_query'>query</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1441
+ <span class='kw'>end</span></pre>
1442
+ </td>
1443
+ </tr>
1444
+ </table>
1445
+ </div>
1446
+
1447
+ <div class="method_details ">
1448
+ <h3 class="signature " id="each_follower-instance_method">
1449
+
1450
+ #<strong>each_follower</strong>(account_id, limit: nil) {|item| ... } &#x21d2; <tt>Enumerator</tt>
1451
+
1452
+
1453
+
1454
+
1455
+
1456
+ </h3><div class="docstring">
1457
+ <div class="discussion">
1458
+
1459
+ <p>Retrieve the follower list of an account.</p>
1460
+
1461
+ <p>As of Mastodon 4.0, no longer requires a token.</p>
1462
+
1463
+
1464
+ </div>
1465
+ </div>
1466
+ <div class="tags">
1467
+ <p class="tag_title">Parameters:</p>
1468
+ <ul class="param">
1469
+
1470
+ <li>
1471
+
1472
+ <span class='name'>account_id</span>
1473
+
1474
+
1475
+ <span class='type'>(<tt>String</tt>)</span>
1476
+
1477
+
1478
+
1479
+ &mdash;
1480
+ <div class='inline'>
1481
+ <p>The account</p>
1482
+ </div>
1483
+
1484
+ </li>
1485
+
1486
+ <li>
1487
+
1488
+ <span class='name'>limit</span>
1489
+
1490
+
1491
+ <span class='type'>(<tt>Integer</tt>)</span>
1492
+
1493
+
1494
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1495
+
1496
+
1497
+ &mdash;
1498
+ <div class='inline'>
1499
+ <p>Maximum number of items to retrieve</p>
1500
+ </div>
1501
+
1502
+ </li>
1503
+
1504
+ </ul>
1505
+
1506
+ <p class="tag_title">Yields:</p>
1507
+ <ul class="yield">
1508
+
1509
+ <li>
1510
+
1511
+
1512
+ <span class='type'>(<tt>item</tt>)</span>
1513
+
1514
+
1515
+
1516
+ &mdash;
1517
+ <div class='inline'>
1518
+ <p>Optional; applied to each item</p>
1519
+ </div>
1520
+
1521
+ </li>
1522
+
1523
+ </ul>
1524
+ <p class="tag_title">Yield Parameters:</p>
1525
+ <ul class="yieldparam">
1526
+
1527
+ <li>
1528
+
1529
+ <span class='name'></span>
1530
+
1531
+
1532
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt>)</span>
1533
+
1534
+
1535
+
1536
+ </li>
1537
+
1538
+ </ul>
1539
+ <p class="tag_title">Returns:</p>
1540
+ <ul class="return">
1541
+
1542
+ <li>
1543
+
1544
+
1545
+ <span class='type'>(<tt>Enumerator</tt>)</span>
1546
+
1547
+
1548
+
1549
+ &mdash;
1550
+ <div class='inline'>
1551
+ <p>if block is not given, otherwise self</p>
1552
+ </div>
1553
+
1554
+ </li>
1555
+
1556
+ </ul>
1557
+
1558
+ <p class="tag_title">See Also:</p>
1559
+ <ul class="see">
1560
+
1561
+ <li><a href="https://docs.joinmastodon.org/methods/accounts/#followers" target="_parent" title="https://docs.joinmastodon.org/methods/accounts/#followers">https://docs.joinmastodon.org/methods/accounts/#followers</a></li>
1562
+
1563
+ </ul>
1564
+
1565
+ </div><table class="source_code">
1566
+ <tr>
1567
+ <td>
1568
+ <pre class="lines">
1569
+
1570
+
1571
+ 268
1572
+ 269
1573
+ 270
1574
+ 271
1575
+ 272
1576
+ 273
1577
+ 274</pre>
1578
+ </td>
1579
+ <td>
1580
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 268</span>
1581
+
1582
+ <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
+ <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1584
+ <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1585
+ <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_magically_get_caller_kwargs'>magically_get_caller_kwargs</span><span class='lparen'>(</span><span class='id identifier rubyid_binding'>binding</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid___method__'>__method__</span><span class='rparen'>)</span><span class='rparen'>)</span>
1586
+ <span class='kw'>return</span> <span class='id identifier rubyid_rest_get_seq'>rest_get_seq</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_account_id'>account_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/followers</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>
1587
+ <span class='id identifier rubyid_query'>query</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1588
+ <span class='kw'>end</span></pre>
1589
+ </td>
1590
+ </tr>
1591
+ </table>
1592
+ </div>
1593
+
1594
+ <div class="method_details ">
1595
+ <h3 class="signature " id="each_following-instance_method">
1596
+
1597
+ #<strong>each_following</strong>(account_id, limit: nil) {|item| ... } &#x21d2; <tt>Enumerator</tt>
1598
+
1599
+
1600
+
1601
+
1602
+
1603
+ </h3><div class="docstring">
1604
+ <div class="discussion">
1605
+
1606
+ <p>Retrieve the list of accounts this account follows</p>
1607
+
1608
+
1609
+ </div>
1610
+ </div>
1611
+ <div class="tags">
1612
+ <p class="tag_title">Parameters:</p>
1613
+ <ul class="param">
1614
+
1615
+ <li>
1616
+
1617
+ <span class='name'>account_id</span>
1618
+
1619
+
1620
+ <span class='type'>(<tt>String</tt>)</span>
1621
+
1622
+
1623
+
1624
+ &mdash;
1625
+ <div class='inline'>
1626
+ <p>The account</p>
1627
+ </div>
1628
+
1629
+ </li>
1630
+
1631
+ <li>
1632
+
1633
+ <span class='name'>limit</span>
1634
+
1635
+
1636
+ <span class='type'>(<tt>Integer</tt>)</span>
1637
+
1638
+
1639
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1640
+
1641
+
1642
+ &mdash;
1643
+ <div class='inline'>
1644
+ <p>Maximum number of items to retrieve</p>
1645
+ </div>
1646
+
1647
+ </li>
1648
+
1649
+ </ul>
1650
+
1651
+ <p class="tag_title">Yields:</p>
1652
+ <ul class="yield">
1653
+
1654
+ <li>
1655
+
1656
+
1657
+ <span class='type'>(<tt>item</tt>)</span>
1658
+
1659
+
1660
+
1661
+ &mdash;
1662
+ <div class='inline'>
1663
+ <p>Optional; applied to each item</p>
1664
+ </div>
1665
+
1666
+ </li>
1667
+
1668
+ </ul>
1669
+ <p class="tag_title">Yield Parameters:</p>
1670
+ <ul class="yieldparam">
1671
+
1672
+ <li>
1673
+
1674
+ <span class='name'></span>
1675
+
1676
+
1677
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt>)</span>
1678
+
1679
+
1680
+
1681
+ </li>
1682
+
1683
+ </ul>
1684
+ <p class="tag_title">Returns:</p>
1685
+ <ul class="return">
1686
+
1687
+ <li>
1688
+
1689
+
1690
+ <span class='type'>(<tt>Enumerator</tt>)</span>
1691
+
1692
+
1693
+
1694
+ &mdash;
1695
+ <div class='inline'>
1696
+ <p>if block is not given, otherwise self</p>
1697
+ </div>
1698
+
1699
+ </li>
1700
+
1701
+ </ul>
1702
+
1703
+ <p class="tag_title">See Also:</p>
1704
+ <ul class="see">
1705
+
1706
+ <li><a href="https://docs.joinmastodon.org/methods/accounts/#following" target="_parent" title="https://docs.joinmastodon.org/methods/accounts/#following">https://docs.joinmastodon.org/methods/accounts/#following</a></li>
1707
+
1708
+ </ul>
1709
+
1710
+ </div><table class="source_code">
1711
+ <tr>
1712
+ <td>
1713
+ <pre class="lines">
1714
+
1715
+
1716
+ 288
1717
+ 289
1718
+ 290
1719
+ 291
1720
+ 292
1721
+ 293
1722
+ 294</pre>
1723
+ </td>
1724
+ <td>
1725
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 288</span>
1726
+
1727
+ <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
+ <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
1729
+ <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1730
+ <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_magically_get_caller_kwargs'>magically_get_caller_kwargs</span><span class='lparen'>(</span><span class='id identifier rubyid_binding'>binding</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid___method__'>__method__</span><span class='rparen'>)</span><span class='rparen'>)</span>
1731
+ <span class='kw'>return</span> <span class='id identifier rubyid_rest_get_seq'>rest_get_seq</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_account_id'>account_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/following</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>
1732
+ <span class='id identifier rubyid_query'>query</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1733
+ <span class='kw'>end</span></pre>
1734
+ </td>
1735
+ </tr>
1736
+ </table>
1737
+ </div>
1738
+
1739
+ <div class="method_details ">
1740
+ <h3 class="signature " id="each_home_status-instance_method">
1741
+
1742
+ #<strong>each_home_status</strong>(limit: nil, local: false, remote: false, only_media: false) {|item| ... } &#x21d2; <tt>Enumerator</tt>
1743
+
1744
+
1745
+
1746
+
1747
+
1748
+ </h3><div class="docstring">
1749
+ <div class="discussion">
1750
+
1751
+ <p>Retrieve each Entity::Status in the home timeline.</p>
1752
+
1753
+ <p>Requires token.</p>
1754
+
1755
+
1756
+ </div>
1757
+ </div>
1758
+ <div class="tags">
1759
+ <p class="tag_title">Parameters:</p>
1760
+ <ul class="param">
1761
+
1762
+ <li>
1763
+
1764
+ <span class='name'>limit</span>
1765
+
1766
+
1767
+ <span class='type'>(<tt>Integer</tt>)</span>
1768
+
1769
+
1770
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1771
+
1772
+
1773
+ &mdash;
1774
+ <div class='inline'>
1775
+ <p>,</p>
1776
+ </div>
1777
+
1778
+ </li>
1779
+
1780
+ <li>
1781
+
1782
+ <span class='name'>local</span>
1783
+
1784
+
1785
+ <span class='type'>(<tt>Boolean</tt>)</span>
1786
+
1787
+
1788
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1789
+
1790
+
1791
+ &mdash;
1792
+ <div class='inline'>
1793
+ <p>,</p>
1794
+ </div>
1795
+
1796
+ </li>
1797
+
1798
+ <li>
1799
+
1800
+ <span class='name'>remote</span>
1801
+
1802
+
1803
+ <span class='type'>(<tt>Boolean</tt>)</span>
1804
+
1805
+
1806
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1807
+
1808
+
1809
+ &mdash;
1810
+ <div class='inline'>
1811
+ <p>,</p>
1812
+ </div>
1813
+
1814
+ </li>
1815
+
1816
+ <li>
1817
+
1818
+ <span class='name'>only_media</span>
1819
+
1820
+
1821
+ <span class='type'>(<tt>Boolean</tt>)</span>
1822
+
1823
+
1824
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1825
+
1826
+
1827
+ &mdash;
1828
+ <div class='inline'>
1829
+ <p>,</p>
1830
+ </div>
1831
+
1832
+ </li>
1833
+
1834
+ </ul>
1835
+
1836
+ <p class="tag_title">Yields:</p>
1837
+ <ul class="yield">
1838
+
1839
+ <li>
1840
+
1841
+
1842
+ <span class='type'>(<tt>item</tt>)</span>
1843
+
1844
+
1845
+
1846
+ </li>
1847
+
1848
+ </ul>
1849
+ <p class="tag_title">Yield Parameters:</p>
1850
+ <ul class="yieldparam">
1851
+
1852
+ <li>
1853
+
1854
+ <span class='name'></span>
1855
+
1856
+
1857
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>)</span>
1858
+
1859
+
1860
+
1861
+ </li>
1862
+
1863
+ </ul>
1864
+ <p class="tag_title">Returns:</p>
1865
+ <ul class="return">
1866
+
1867
+ <li>
1868
+
1869
+
1870
+ <span class='type'>(<tt>Enumerator</tt>)</span>
1871
+
1872
+
1873
+
1874
+ &mdash;
1875
+ <div class='inline'>
1876
+ <p>if block is not given, otherwise self</p>
1877
+ </div>
1878
+
1879
+ </li>
1880
+
1881
+ </ul>
1882
+
1883
+ <p class="tag_title">See Also:</p>
1884
+ <ul class="see">
1885
+
1886
+ <li><a href="https://docs.joinmastodon.org/methods/timelines/#home" target="_parent" title="https://docs.joinmastodon.org/methods/timelines/#home">https://docs.joinmastodon.org/methods/timelines/#home</a></li>
1887
+
1888
+ </ul>
1889
+
1890
+ </div><table class="source_code">
1891
+ <tr>
1892
+ <td>
1893
+ <pre class="lines">
1894
+
1895
+
1896
+ 438
1897
+ 439
1898
+ 440
1899
+ 441
1900
+ 442
1901
+ 443
1902
+ 444
1903
+ 445</pre>
1904
+ </td>
1905
+ <td>
1906
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 438</span>
1907
+
1908
+ <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
+ <span class='label'>local:</span> <span class='kw'>false</span><span class='comma'>,</span>
1910
+ <span class='label'>remote:</span> <span class='kw'>false</span><span class='comma'>,</span>
1911
+ <span class='label'>only_media:</span> <span class='kw'>false</span><span class='comma'>,</span>
1912
+ <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1913
+ <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_magically_get_caller_kwargs'>magically_get_caller_kwargs</span><span class='lparen'>(</span><span class='id identifier rubyid_binding'>binding</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid___method__'>__method__</span><span class='rparen'>)</span><span class='rparen'>)</span>
1914
+ <span class='id identifier rubyid_rest_get_seq'>rest_get_seq</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>timelines/home</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='id identifier rubyid_query'>query</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1915
+ <span class='kw'>end</span></pre>
1916
+ </td>
1917
+ </tr>
1918
+ </table>
1919
+ </div>
1920
+
1921
+ <div class="method_details ">
1922
+ <h3 class="signature " id="each_notification-instance_method">
1923
+
1924
+ #<strong>each_notification</strong>(types: [], exclude_types: [], limit: nil, account_id: nil) {|item| ... } &#x21d2; <tt>Enumerator</tt>
1925
+
1926
+
1927
+
1928
+
1929
+
1930
+ </h3><div class="docstring">
1931
+ <div class="discussion">
1932
+
1933
+ <p>Retrieve each notification.</p>
1934
+
1935
+
1936
+ </div>
1937
+ </div>
1938
+ <div class="tags">
1939
+ <p class="tag_title">Parameters:</p>
1940
+ <ul class="param">
1941
+
1942
+ <li>
1943
+
1944
+ <span class='name'>types</span>
1945
+
1946
+
1947
+ <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
1948
+
1949
+
1950
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
1951
+
1952
+
1953
+ &mdash;
1954
+ <div class='inline'>
1955
+ <p>list of notifications types to enumerate; others are ignoredn</p>
1956
+ </div>
1957
+
1958
+ </li>
1959
+
1960
+ <li>
1961
+
1962
+ <span class='name'>exclude_types</span>
1963
+
1964
+
1965
+ <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
1966
+
1967
+
1968
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
1969
+
1970
+
1971
+ &mdash;
1972
+ <div class='inline'>
1973
+ <p>types of notifications to exclude</p>
1974
+ </div>
1975
+
1976
+ </li>
1977
+
1978
+ <li>
1979
+
1980
+ <span class='name'>limit</span>
1981
+
1982
+
1983
+ <span class='type'>(<tt>Integer</tt>)</span>
1984
+
1985
+
1986
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1987
+
1988
+
1989
+ &mdash;
1990
+ <div class='inline'>
1991
+ <p>Maximum number of items to retrieve</p>
1992
+ </div>
1993
+
1994
+ </li>
1995
+
1996
+ <li>
1997
+
1998
+ <span class='name'>account_id</span>
1999
+
2000
+
2001
+ <span class='type'>(<tt>String</tt>)</span>
2002
+
2003
+
2004
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
2005
+
2006
+
2007
+ &mdash;
2008
+ <div class='inline'>
2009
+ <p>Only retrieve notifications from the account with this ID.</p>
2010
+ </div>
2011
+
2012
+ </li>
2013
+
2014
+ </ul>
2015
+
2016
+ <p class="tag_title">Yields:</p>
2017
+ <ul class="yield">
2018
+
2019
+ <li>
2020
+
2021
+
2022
+ <span class='type'>(<tt>item</tt>)</span>
2023
+
2024
+
2025
+
2026
+ &mdash;
2027
+ <div class='inline'>
2028
+ <p>Applied to each Notification</p>
2029
+ </div>
2030
+
2031
+ </li>
2032
+
2033
+ </ul>
2034
+ <p class="tag_title">Yield Parameters:</p>
2035
+ <ul class="yieldparam">
2036
+
2037
+ <li>
2038
+
2039
+ <span class='name'></span>
2040
+
2041
+
2042
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Notification.html" title="Shep::Entity::Notification (class)">Entity::Notification</a></span></tt>)</span>
2043
+
2044
+
2045
+
2046
+ </li>
2047
+
2048
+ </ul>
2049
+ <p class="tag_title">Returns:</p>
2050
+ <ul class="return">
2051
+
2052
+ <li>
2053
+
2054
+
2055
+ <span class='type'>(<tt>Enumerator</tt>)</span>
2056
+
2057
+
2058
+
2059
+ &mdash;
2060
+ <div class='inline'>
2061
+ <p>if block is not given, otherwise self</p>
2062
+ </div>
2063
+
2064
+ </li>
2065
+
2066
+ </ul>
2067
+
2068
+ <p class="tag_title">See Also:</p>
2069
+ <ul class="see">
2070
+
2071
+ <li><a href="https://docs.joinmastodon.org/methods/notifications/#get" target="_parent" title="https://docs.joinmastodon.org/methods/notifications/#get">https://docs.joinmastodon.org/methods/notifications/#get</a></li>
2072
+
2073
+ </ul>
2074
+
2075
+ </div><table class="source_code">
2076
+ <tr>
2077
+ <td>
2078
+ <pre class="lines">
2079
+
2080
+
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>
2102
+ </td>
2103
+ <td>
2104
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 508</span>
2105
+
2106
+ <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
+ <span class='label'>exclude_types:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
2108
+ <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
2109
+ <span class='label'>account_id:</span> <span class='kw'>nil</span><span class='comma'>,</span>
2110
+ <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2111
+ <span class='id identifier rubyid_allowed_notifications'>allowed_notifications</span> <span class='op'>=</span> <span class='qsymbols_beg'>%i{</span><span class='tstring_content'>mention</span><span class='words_sep'> </span><span class='tstring_content'>status</span><span class='words_sep'> </span><span class='tstring_content'>reblog</span><span class='words_sep'> </span><span class='tstring_content'>follow</span><span class='words_sep'> </span><span class='tstring_content'>follow_request</span><span class='words_sep'>
2112
+ </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
+ </span><span class='tstring_content'>admin.report</span><span class='tstring_end'>}</span></span>
2114
+
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>
2119
+ <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
+ <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
+ <span class='rbrace'>}</span>
2122
+ <span class='rbrace'>}</span>
2123
+
2124
+ <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_magically_get_caller_kwargs'>magically_get_caller_kwargs</span><span class='lparen'>(</span><span class='id identifier rubyid_binding'>binding</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid___method__'>__method__</span><span class='rparen'>)</span><span class='rparen'>)</span>
2125
+ <span class='id identifier rubyid_rest_get_seq'>rest_get_seq</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>notifications</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='id identifier rubyid_query'>query</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2126
+ <span class='kw'>end</span></pre>
2127
+ </td>
2128
+ </tr>
2129
+ </table>
2130
+ </div>
2131
+
2132
+ <div class="method_details ">
2133
+ <h3 class="signature " id="each_public_status-instance_method">
2134
+
2135
+ #<strong>each_public_status</strong>(limit: nil, local: false, remote: false, only_media: false) {|item| ... } &#x21d2; <tt>Enumerator</tt>
2136
+
2137
+
2138
+
2139
+
2140
+
2141
+ </h3><div class="docstring">
2142
+ <div class="discussion">
2143
+
2144
+ <p>Retrieve the instance’s public timeline(s)</p>
2145
+
2146
+ <p>May require a token depending on the instance’s settings.</p>
2147
+
2148
+
2149
+ </div>
2150
+ </div>
2151
+ <div class="tags">
2152
+ <p class="tag_title">Parameters:</p>
2153
+ <ul class="param">
2154
+
2155
+ <li>
2156
+
2157
+ <span class='name'>limit</span>
2158
+
2159
+
2160
+ <span class='type'>(<tt>Integer</tt>)</span>
2161
+
2162
+
2163
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
2164
+
2165
+
2166
+ &mdash;
2167
+ <div class='inline'>
2168
+ <p>Max. items to retrieve.</p>
2169
+ </div>
2170
+
2171
+ </li>
2172
+
2173
+ <li>
2174
+
2175
+ <span class='name'>local</span>
2176
+
2177
+
2178
+ <span class='type'>(<tt>Boolean</tt>)</span>
2179
+
2180
+
2181
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2182
+
2183
+
2184
+ &mdash;
2185
+ <div class='inline'>
2186
+ <p>Retrieve only local statuses</p>
2187
+ </div>
2188
+
2189
+ </li>
2190
+
2191
+ <li>
2192
+
2193
+ <span class='name'>remote</span>
2194
+
2195
+
2196
+ <span class='type'>(<tt>Boolean</tt>)</span>
2197
+
2198
+
2199
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2200
+
2201
+
2202
+ &mdash;
2203
+ <div class='inline'>
2204
+ <p>Retrieve only remote statuses</p>
2205
+ </div>
2206
+
2207
+ </li>
2208
+
2209
+ <li>
2210
+
2211
+ <span class='name'>only_media</span>
2212
+
2213
+
2214
+ <span class='type'>(<tt>Boolean</tt>)</span>
2215
+
2216
+
2217
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2218
+
2219
+
2220
+ &mdash;
2221
+ <div class='inline'>
2222
+ <p>Retrieve only statuses with media</p>
2223
+ </div>
2224
+
2225
+ </li>
2226
+
2227
+ </ul>
2228
+
2229
+ <p class="tag_title">Yields:</p>
2230
+ <ul class="yield">
2231
+
2232
+ <li>
2233
+
2234
+
2235
+ <span class='type'>(<tt>item</tt>)</span>
2236
+
2237
+
2238
+
2239
+ &mdash;
2240
+ <div class='inline'>
2241
+ <p>Optional; applied to each item</p>
2242
+ </div>
2243
+
2244
+ </li>
2245
+
2246
+ </ul>
2247
+ <p class="tag_title">Yield Parameters:</p>
2248
+ <ul class="yieldparam">
2249
+
2250
+ <li>
2251
+
2252
+ <span class='name'></span>
2253
+
2254
+
2255
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>)</span>
2256
+
2257
+
2258
+
2259
+ </li>
2260
+
2261
+ </ul>
2262
+ <p class="tag_title">Returns:</p>
2263
+ <ul class="return">
2264
+
2265
+ <li>
2266
+
2267
+
2268
+ <span class='type'>(<tt>Enumerator</tt>)</span>
2269
+
2270
+
2271
+
2272
+ &mdash;
2273
+ <div class='inline'>
2274
+ <p>if block is not given, otherwise self</p>
2275
+ </div>
2276
+
2277
+ </li>
2278
+
2279
+ </ul>
2280
+
2281
+ <p class="tag_title">See Also:</p>
2282
+ <ul class="see">
2283
+
2284
+ <li><a href="https://docs.joinmastodon.org/methods/timelines/#public" target="_parent" title="https://docs.joinmastodon.org/methods/timelines/#public">https://docs.joinmastodon.org/methods/timelines/#public</a></li>
2285
+
2286
+ </ul>
2287
+
2288
+ </div><table class="source_code">
2289
+ <tr>
2290
+ <td>
2291
+ <pre class="lines">
2292
+
2293
+
2294
+ 353
2295
+ 354
2296
+ 355
2297
+ 356
2298
+ 357
2299
+ 358
2300
+ 359
2301
+ 360</pre>
2302
+ </td>
2303
+ <td>
2304
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 353</span>
2305
+
2306
+ <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>
2307
+ <span class='label'>local:</span> <span class='kw'>false</span><span class='comma'>,</span>
2308
+ <span class='label'>remote:</span> <span class='kw'>false</span><span class='comma'>,</span>
2309
+ <span class='label'>only_media:</span> <span class='kw'>false</span><span class='comma'>,</span>
2310
+ <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2311
+ <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_magically_get_caller_kwargs'>magically_get_caller_kwargs</span><span class='lparen'>(</span><span class='id identifier rubyid_binding'>binding</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid___method__'>__method__</span><span class='rparen'>)</span><span class='rparen'>)</span>
2312
+ <span class='id identifier rubyid_rest_get_seq'>rest_get_seq</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>timelines/public</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='id identifier rubyid_query'>query</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2313
+ <span class='kw'>end</span></pre>
2314
+ </td>
2315
+ </tr>
2316
+ </table>
2317
+ </div>
2318
+
2319
+ <div class="method_details ">
2320
+ <h3 class="signature " id="each_status-instance_method">
2321
+
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>
2323
+
2324
+
2325
+
2326
+
2327
+
2328
+ </h3><div class="docstring">
2329
+ <div class="discussion">
2330
+
2331
+ <p>Retrieve the account’s statuses</p>
2332
+
2333
+
2334
+ </div>
2335
+ </div>
2336
+ <div class="tags">
2337
+ <p class="tag_title">Parameters:</p>
2338
+ <ul class="param">
2339
+
2340
+ <li>
2341
+
2342
+ <span class='name'>account_id</span>
2343
+
2344
+
2345
+ <span class='type'>(<tt>String</tt>)</span>
2346
+
2347
+
2348
+
2349
+ &mdash;
2350
+ <div class='inline'>
2351
+ <p>The ID of the account</p>
2352
+ </div>
2353
+
2354
+ </li>
2355
+
2356
+ <li>
2357
+
2358
+ <span class='name'>limit</span>
2359
+
2360
+
2361
+ <span class='type'>(<tt>Integer</tt>)</span>
2362
+
2363
+
2364
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
2365
+
2366
+
2367
+ &mdash;
2368
+ <div class='inline'>
2369
+ <p>Maximum number of accounts to retrieve</p>
2370
+ </div>
2371
+
2372
+ </li>
2373
+
2374
+ <li>
2375
+
2376
+ <span class='name'>only_media</span>
2377
+
2378
+
2379
+ <span class='type'>(<tt>Boolean</tt>)</span>
2380
+
2381
+
2382
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2383
+
2384
+
2385
+ &mdash;
2386
+ <div class='inline'>
2387
+ <p>If true, filter for statuses with media</p>
2388
+ </div>
2389
+
2390
+ </li>
2391
+
2392
+ <li>
2393
+
2394
+ <span class='name'>exclude_replies</span>
2395
+
2396
+
2397
+ <span class='type'>(<tt>Boolean</tt>)</span>
2398
+
2399
+
2400
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2401
+
2402
+
2403
+ &mdash;
2404
+ <div class='inline'>
2405
+ <p>If true, exclude replies</p>
2406
+ </div>
2407
+
2408
+ </li>
2409
+
2410
+ <li>
2411
+
2412
+ <span class='name'>exclude_reblogs</span>
2413
+
2414
+
2415
+ <span class='type'>(<tt>Boolean</tt>)</span>
2416
+
2417
+
2418
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2419
+
2420
+
2421
+ &mdash;
2422
+ <div class='inline'>
2423
+ <p>If true, exclude boosts</p>
2424
+ </div>
2425
+
2426
+ </li>
2427
+
2428
+ <li>
2429
+
2430
+ <span class='name'>pinned</span>
2431
+
2432
+
2433
+ <span class='type'>(<tt>Boolean</tt>)</span>
2434
+
2435
+
2436
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2437
+
2438
+
2439
+ &mdash;
2440
+ <div class='inline'>
2441
+ <p>If true, filter for pinned statuses</p>
2442
+ </div>
2443
+
2444
+ </li>
2445
+
2446
+ <li>
2447
+
2448
+ <span class='name'>tagged</span>
2449
+
2450
+
2451
+ <span class='type'>(<tt>String</tt>)</span>
2452
+
2453
+
2454
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
2455
+
2456
+
2457
+ &mdash;
2458
+ <div class='inline'>
2459
+ <p>Filter for statuses containing the given tag</p>
2460
+ </div>
2461
+
2462
+ </li>
2463
+
2464
+ </ul>
2465
+
2466
+ <p class="tag_title">Yields:</p>
2467
+ <ul class="yield">
2468
+
2469
+ <li>
2470
+
2471
+
2472
+ <span class='type'>(<tt>item</tt>)</span>
2473
+
2474
+
2475
+
2476
+ &mdash;
2477
+ <div class='inline'>
2478
+ <p>Optional; applied to each item</p>
2479
+ </div>
2480
+
2481
+ </li>
2482
+
2483
+ </ul>
2484
+ <p class="tag_title">Yield Parameters:</p>
2485
+ <ul class="yieldparam">
2486
+
2487
+ <li>
2488
+
2489
+ <span class='name'></span>
2490
+
2491
+
2492
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>)</span>
2493
+
2494
+
2495
+
2496
+ </li>
2497
+
2498
+ </ul>
2499
+ <p class="tag_title">Returns:</p>
2500
+ <ul class="return">
2501
+
2502
+ <li>
2503
+
2504
+
2505
+ <span class='type'>(<tt>Enumerator</tt>)</span>
2506
+
2507
+
2508
+
2509
+ &mdash;
2510
+ <div class='inline'>
2511
+ <p>if block is not given, otherwise self</p>
2512
+ </div>
2513
+
2514
+ </li>
2515
+
2516
+ </ul>
2517
+
2518
+ <p class="tag_title">See Also:</p>
2519
+ <ul class="see">
2520
+
2521
+ <li><a href="https://docs.joinmastodon.org/methods/accounts/#statuses" target="_parent" title="https://docs.joinmastodon.org/methods/accounts/#statuses">https://docs.joinmastodon.org/methods/accounts/#statuses</a></li>
2522
+
2523
+ </ul>
2524
+
2525
+ </div><table class="source_code">
2526
+ <tr>
2527
+ <td>
2528
+ <pre class="lines">
2529
+
2530
+
2531
+ 322
2532
+ 323
2533
+ 324
2534
+ 325
2535
+ 326
2536
+ 327
2537
+ 328
2538
+ 329
2539
+ 330
2540
+ 331
2541
+ 332</pre>
2542
+ </td>
2543
+ <td>
2544
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 322</span>
2545
+
2546
+ <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
+ <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
2548
+ <span class='label'>only_media:</span> <span class='kw'>false</span><span class='comma'>,</span>
2549
+ <span class='label'>exclude_replies:</span> <span class='kw'>false</span><span class='comma'>,</span>
2550
+ <span class='label'>exclude_reblogs:</span> <span class='kw'>false</span><span class='comma'>,</span>
2551
+ <span class='label'>pinned:</span> <span class='kw'>false</span><span class='comma'>,</span>
2552
+ <span class='label'>tagged:</span> <span class='kw'>nil</span><span class='comma'>,</span>
2553
+ <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2554
+ <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_magically_get_caller_kwargs'>magically_get_caller_kwargs</span><span class='lparen'>(</span><span class='id identifier rubyid_binding'>binding</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid___method__'>__method__</span><span class='rparen'>)</span><span class='rparen'>)</span>
2555
+ <span class='id identifier rubyid_rest_get_seq'>rest_get_seq</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_account_id'>account_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/statuses</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='id identifier rubyid_query'>query</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2556
+ <span class='kw'>end</span></pre>
2557
+ </td>
2558
+ </tr>
2559
+ </table>
2560
+ </div>
2561
+
2562
+ <div class="method_details ">
2563
+ <h3 class="signature " id="each_tag_status-instance_method">
2564
+
2565
+ #<strong>each_tag_status</strong>(hashtag_s, limit: nil, local: false, remote: false, only_media: false, all: [], none: []) {|item| ... } &#x21d2; <tt>Enumerator</tt>
2566
+
2567
+
2568
+
2569
+
2570
+
2571
+ </h3><div class="docstring">
2572
+ <div class="discussion">
2573
+
2574
+ <p>Retrieve a tag’s timeline.</p>
2575
+
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>
2577
+
2578
+ <p>There is currently no check for contradictory tag lists.</p>
2579
+
2580
+
2581
+ </div>
2582
+ </div>
2583
+ <div class="tags">
2584
+ <p class="tag_title">Parameters:</p>
2585
+ <ul class="param">
2586
+
2587
+ <li>
2588
+
2589
+ <span class='name'>hashtag_s</span>
2590
+
2591
+
2592
+ <span class='type'>(<tt>String</tt>, <tt>Array&lt;String&gt;</tt>)</span>
2593
+
2594
+
2595
+
2596
+ &mdash;
2597
+ <div class='inline'>
2598
+ <p>Hashtag(s) to retrieve.</p>
2599
+ </div>
2600
+
2601
+ </li>
2602
+
2603
+ <li>
2604
+
2605
+ <span class='name'>limit</span>
2606
+
2607
+
2608
+ <span class='type'>(<tt>Integer</tt>)</span>
2609
+
2610
+
2611
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
2612
+
2613
+
2614
+ &mdash;
2615
+ <div class='inline'>
2616
+ <p>maximum number of items to retrieve</p>
2617
+ </div>
2618
+
2619
+ </li>
2620
+
2621
+ <li>
2622
+
2623
+ <span class='name'>local</span>
2624
+
2625
+
2626
+ <span class='type'>(<tt>Boolean</tt>)</span>
2627
+
2628
+
2629
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2630
+
2631
+
2632
+ &mdash;
2633
+ <div class='inline'>
2634
+ <p>retrieve only local statuses</p>
2635
+ </div>
2636
+
2637
+ </li>
2638
+
2639
+ <li>
2640
+
2641
+ <span class='name'>remote</span>
2642
+
2643
+
2644
+ <span class='type'>(<tt>Boolean</tt>)</span>
2645
+
2646
+
2647
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2648
+
2649
+
2650
+ &mdash;
2651
+ <div class='inline'>
2652
+ <p>retrieve only remote statuses</p>
2653
+ </div>
2654
+
2655
+ </li>
2656
+
2657
+ <li>
2658
+
2659
+ <span class='name'>only_media</span>
2660
+
2661
+
2662
+ <span class='type'>(<tt>Boolean</tt>)</span>
2663
+
2664
+
2665
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2666
+
2667
+
2668
+ &mdash;
2669
+ <div class='inline'>
2670
+ <p>retrieve only media status</p>
2671
+ </div>
2672
+
2673
+ </li>
2674
+
2675
+ <li>
2676
+
2677
+ <span class='name'>all</span>
2678
+
2679
+
2680
+ <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
2681
+
2682
+
2683
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
2684
+
2685
+
2686
+ &mdash;
2687
+ <div class='inline'>
2688
+ <p>list of other tags that must also be present.</p>
2689
+ </div>
2690
+
2691
+ </li>
2692
+
2693
+ <li>
2694
+
2695
+ <span class='name'>none</span>
2696
+
2697
+
2698
+ <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
2699
+
2700
+
2701
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
2702
+
2703
+
2704
+ &mdash;
2705
+ <div class='inline'>
2706
+ <p>list of tags that are excluded.</p>
2707
+ </div>
2708
+
2709
+ </li>
2710
+
2711
+ </ul>
2712
+
2713
+ <p class="tag_title">Yields:</p>
2714
+ <ul class="yield">
2715
+
2716
+ <li>
2717
+
2718
+
2719
+ <span class='type'>(<tt>item</tt>)</span>
2720
+
2721
+
2722
+
2723
+ &mdash;
2724
+ <div class='inline'>
2725
+ <p>block to apply to each Status; optional</p>
2726
+ </div>
2727
+
2728
+ </li>
2729
+
2730
+ </ul>
2731
+ <p class="tag_title">Yield Parameters:</p>
2732
+ <ul class="yieldparam">
2733
+
2734
+ <li>
2735
+
2736
+ <span class='name'></span>
2737
+
2738
+
2739
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>)</span>
2740
+
2741
+
2742
+
2743
+ </li>
2744
+
2745
+ </ul>
2746
+ <p class="tag_title">Returns:</p>
2747
+ <ul class="return">
2748
+
2749
+ <li>
2750
+
2751
+
2752
+ <span class='type'>(<tt>Enumerator</tt>)</span>
2753
+
2754
+
2755
+
2756
+ &mdash;
2757
+ <div class='inline'>
2758
+ <p>if block is not given, otherwise self</p>
2759
+ </div>
2760
+
2761
+ </li>
2762
+
2763
+ </ul>
2764
+
2765
+ <p class="tag_title">See Also:</p>
2766
+ <ul class="see">
2767
+
2768
+ <li><a href="https://docs.joinmastodon.org/methods/timelines/#tag" target="_parent" title="https://docs.joinmastodon.org/methods/timelines/#tag">https://docs.joinmastodon.org/methods/timelines/#tag</a></li>
2769
+
2770
+ </ul>
2771
+
2772
+ </div><table class="source_code">
2773
+ <tr>
2774
+ <td>
2775
+ <pre class="lines">
2776
+
2777
+
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>
2804
+ </td>
2805
+ <td>
2806
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 393</span>
2807
+
2808
+ <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
+ <span class='label'>limit:</span> <span class='kw'>nil</span><span class='comma'>,</span>
2810
+ <span class='label'>local:</span> <span class='kw'>false</span><span class='comma'>,</span>
2811
+ <span class='label'>remote:</span> <span class='kw'>false</span><span class='comma'>,</span>
2812
+ <span class='label'>only_media:</span> <span class='kw'>false</span><span class='comma'>,</span>
2813
+ <span class='label'>all:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
2814
+ <span class='label'>none:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
2815
+ <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2816
+
2817
+ <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_magically_get_caller_kwargs'>magically_get_caller_kwargs</span><span class='lparen'>(</span><span class='id identifier rubyid_binding'>binding</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid___method__'>__method__</span><span class='rparen'>)</span><span class='rparen'>)</span>
2818
+
2819
+ <span class='id identifier rubyid_any'>any</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
2820
+ <span class='kw'>if</span> <span class='id identifier rubyid_hashtag_s'>hashtag_s</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
2821
+ <span class='id identifier rubyid_hashtag_s'>hashtag_s</span> <span class='op'>=</span> <span class='id identifier rubyid_hashtag_s'>hashtag_s</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
2822
+ <span class='id identifier rubyid_hashtag'>hashtag</span> <span class='op'>=</span> <span class='id identifier rubyid_hashtag_s'>hashtag_s</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span>
2823
+ <span class='id identifier rubyid_any'>any</span> <span class='op'>=</span> <span class='id identifier rubyid_hashtag_s'>hashtag_s</span>
2824
+ <span class='kw'>else</span>
2825
+ <span class='id identifier rubyid_hashtag'>hashtag</span> <span class='op'>=</span> <span class='id identifier rubyid_hashtag_s'>hashtag_s</span>
2826
+ <span class='kw'>end</span>
2827
+
2828
+ <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'>Empty hashtag!</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_hashtag'>hashtag</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_hashtag'>hashtag</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='rbrace'>}</span>
2829
+
2830
+ <span class='id identifier rubyid_query'>query</span><span class='lbracket'>[</span><span class='symbol'>:any</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_any'>any</span> <span class='kw'>unless</span> <span class='id identifier rubyid_any'>any</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
2831
+
2832
+ <span class='id identifier rubyid_rest_get_seq'>rest_get_seq</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>timelines/tag/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_hashtag'>hashtag</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='id identifier rubyid_query'>query</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2833
+ <span class='kw'>end</span></pre>
2834
+ </td>
2835
+ </tr>
2836
+ </table>
2837
+ </div>
2838
+
2839
+ <div class="method_details ">
2840
+ <h3 class="signature " id="edit_status-instance_method">
2841
+
2842
+ #<strong>edit_status</strong>(id, status, media_ids: [], spoiler_text: &quot;&quot;, language: &quot;en&quot;) &#x21d2; <tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>
2843
+
2844
+
2845
+
2846
+
2847
+
2848
+ </h3><div class="docstring">
2849
+ <div class="discussion">
2850
+
2851
+ <p>Update the status with the given Id.</p>
2852
+
2853
+ <p>Requires token with sufficient permission for the account that owns the status.</p>
2854
+
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>
2856
+
2857
+
2858
+ </div>
2859
+ </div>
2860
+ <div class="tags">
2861
+ <p class="tag_title">Parameters:</p>
2862
+ <ul class="param">
2863
+
2864
+ <li>
2865
+
2866
+ <span class='name'>id</span>
2867
+
2868
+
2869
+ <span class='type'>(<tt>String</tt>)</span>
2870
+
2871
+
2872
+
2873
+ &mdash;
2874
+ <div class='inline'>
2875
+ <p>id of the status to edit</p>
2876
+ </div>
2877
+
2878
+ </li>
2879
+
2880
+ <li>
2881
+
2882
+ <span class='name'>status</span>
2883
+
2884
+
2885
+ <span class='type'>(<tt>String</tt>)</span>
2886
+
2887
+
2888
+
2889
+ &mdash;
2890
+ <div class='inline'>
2891
+ <p>new status text</p>
2892
+ </div>
2893
+
2894
+ </li>
2895
+
2896
+ <li>
2897
+
2898
+ <span class='name'>media_ids</span>
2899
+
2900
+
2901
+ <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
2902
+
2903
+
2904
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
2905
+
2906
+
2907
+ &mdash;
2908
+ <div class='inline'>
2909
+ <p>array of media object IDs to attach to this status.</p>
2910
+ </div>
2911
+
2912
+ </li>
2913
+
2914
+ <li>
2915
+
2916
+ <span class='name'>spoiler_text</span>
2917
+
2918
+
2919
+ <span class='type'>(<tt>String</tt>)</span>
2920
+
2921
+
2922
+ <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
2923
+
2924
+
2925
+ &mdash;
2926
+ <div class='inline'>
2927
+ <p>Sets or clears the content warning. Non-empty value also sets the <code>sensitive</code> field.</p>
2928
+ </div>
2929
+
2930
+ </li>
2931
+
2932
+ <li>
2933
+
2934
+ <span class='name'>language</span>
2935
+
2936
+
2937
+ <span class='type'>(<tt>String</tt>)</span>
2938
+
2939
+
2940
+ <em class="default">(defaults to: <tt>&quot;en&quot;</tt>)</em>
2941
+
2942
+
2943
+ &mdash;
2944
+ <div class='inline'>
2945
+ <p>The language of the status; defaults to “en”. (Apologies for the anglocentrism; this should be consistent.)</p>
2946
+ </div>
2947
+
2948
+ </li>
2949
+
2950
+ </ul>
2951
+
2952
+ <p class="tag_title">Returns:</p>
2953
+ <ul class="return">
2954
+
2955
+ <li>
2956
+
2957
+
2958
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>)</span>
2959
+
2960
+
2961
+
2962
+ &mdash;
2963
+ <div class='inline'>
2964
+ <p>the updated status</p>
2965
+ </div>
2966
+
2967
+ </li>
2968
+
2969
+ </ul>
2970
+
2971
+ <p class="tag_title">See Also:</p>
2972
+ <ul class="see">
2973
+
2974
+ <li><a href="https://docs.joinmastodon.org/methods/statuses/#edit" target="_parent" title="https://docs.joinmastodon.org/methods/statuses/#edit">https://docs.joinmastodon.org/methods/statuses/#edit</a></li>
2975
+
2976
+ </ul>
2977
+
2978
+ </div><table class="source_code">
2979
+ <tr>
2980
+ <td>
2981
+ <pre class="lines">
2982
+
2983
+
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>
2996
+ </td>
2997
+ <td>
2998
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 607</span>
2999
+
3000
+ <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
+ <span class='label'>media_ids:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
3002
+ <span class='label'>spoiler_text:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
3003
+ <span class='label'>language:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>en</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
3004
+ <span class='id identifier rubyid_formhash'>formhash</span> <span class='op'>=</span> <span class='id identifier rubyid_magically_get_caller_kwargs'>magically_get_caller_kwargs</span><span class='lparen'>(</span><span class='id identifier rubyid_binding'>binding</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid___method__'>__method__</span><span class='rparen'>)</span><span class='comma'>,</span>
3005
+ <span class='label'>strip_ignorables:</span> <span class='kw'>false</span><span class='rparen'>)</span>
3006
+ <span class='id identifier rubyid_formhash'>formhash</span><span class='lbracket'>[</span><span class='symbol'>:status</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_status'>status</span>
3007
+ <span class='id identifier rubyid_formhash'>formhash</span><span class='lbracket'>[</span><span class='symbol'>:sensitive</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_spoiler_text'>spoiler_text</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_spoiler_text'>spoiler_text</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
3008
+
3009
+ <span class='id identifier rubyid_formdata'>formdata</span> <span class='op'>=</span> <span class='id identifier rubyid_formhash2array'>formhash2array</span><span class='lparen'>(</span><span class='id identifier rubyid_formhash'>formhash</span><span class='rparen'>)</span>
3010
+ <span class='kw'>return</span> <span class='id identifier rubyid_rest_put'>rest_put</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='id identifier rubyid_formdata'>formdata</span><span class='rparen'>)</span>
3011
+ <span class='kw'>end</span></pre>
3012
+ </td>
3013
+ </tr>
3014
+ </table>
3015
+ </div>
3016
+
3017
+ <div class="method_details ">
3018
+ <h3 class="signature " id="fetch_account-instance_method">
3019
+
3020
+ #<strong>fetch_account</strong>(id) &#x21d2; <tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt>
3021
+
3022
+
3023
+
3024
+
3025
+
3026
+ </h3><div class="docstring">
3027
+ <div class="discussion">
3028
+
3029
+ <p>Fetch user details by ID</p>
3030
+
3031
+
3032
+ </div>
3033
+ </div>
3034
+ <div class="tags">
3035
+ <p class="tag_title">Parameters:</p>
3036
+ <ul class="param">
3037
+
3038
+ <li>
3039
+
3040
+ <span class='name'>id</span>
3041
+
3042
+
3043
+ <span class='type'>(<tt>String</tt>)</span>
3044
+
3045
+
3046
+
3047
+ &mdash;
3048
+ <div class='inline'>
3049
+ <p>the ID code of the account</p>
3050
+ </div>
3051
+
3052
+ </li>
3053
+
3054
+ </ul>
3055
+
3056
+ <p class="tag_title">Returns:</p>
3057
+ <ul class="return">
3058
+
3059
+ <li>
3060
+
3061
+
3062
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt>)</span>
3063
+
3064
+
3065
+
3066
+ </li>
3067
+
3068
+ </ul>
3069
+
3070
+ <p class="tag_title">See Also:</p>
3071
+ <ul class="see">
3072
+
3073
+ <li><a href="https://docs.joinmastodon.org/methods/accounts/#get" target="_parent" title="https://docs.joinmastodon.org/methods/accounts/#get">https://docs.joinmastodon.org/methods/accounts/#get</a></li>
3074
+
3075
+ </ul>
3076
+
3077
+ </div><table class="source_code">
3078
+ <tr>
3079
+ <td>
3080
+ <pre class="lines">
3081
+
3082
+
3083
+ 145
3084
+ 146
3085
+ 147</pre>
3086
+ </td>
3087
+ <td>
3088
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 145</span>
3089
+
3090
+ <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
+ <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>
3092
+ <span class='kw'>end</span></pre>
3093
+ </td>
3094
+ </tr>
3095
+ </table>
3096
+ </div>
3097
+
3098
+ <div class="method_details ">
3099
+ <h3 class="signature " id="fetch_account_by_username-instance_method">
3100
+
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>
3102
+
3103
+
3104
+
3105
+
3106
+
3107
+ </h3><div class="docstring">
3108
+ <div class="discussion">
3109
+
3110
+ <p>Fetch user details by username.</p>
3111
+
3112
+ <p>The username must belong to a user on the current server.</p>
3113
+
3114
+
3115
+ </div>
3116
+ </div>
3117
+ <div class="tags">
3118
+ <p class="tag_title">Parameters:</p>
3119
+ <ul class="param">
3120
+
3121
+ <li>
3122
+
3123
+ <span class='name'>handle</span>
3124
+
3125
+
3126
+ <span class='type'>(<tt>String</tt>)</span>
3127
+
3128
+
3129
+
3130
+ &mdash;
3131
+ <div class='inline'>
3132
+ <p>the account’s username <strong>with</strong> the leading ‘@’ character (e.g. @benoitmandelbot)</p>
3133
+ </div>
3134
+
3135
+ </li>
3136
+
3137
+ </ul>
3138
+
3139
+ <p class="tag_title">Returns:</p>
3140
+ <ul class="return">
3141
+
3142
+ <li>
3143
+
3144
+
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>
3146
+
3147
+
3148
+
3149
+ </li>
3150
+
3151
+ </ul>
3152
+
3153
+ <p class="tag_title">See Also:</p>
3154
+ <ul class="see">
3155
+
3156
+ <li><a href="https://docs.joinmastodon.org/methods/accounts/#get" target="_parent" title="https://docs.joinmastodon.org/methods/accounts/#get">https://docs.joinmastodon.org/methods/accounts/#get</a></li>
3157
+
3158
+ </ul>
3159
+
3160
+ </div><table class="source_code">
3161
+ <tr>
3162
+ <td>
3163
+ <pre class="lines">
3164
+
3165
+
3166
+ 159
3167
+ 160
3168
+ 161</pre>
3169
+ </td>
3170
+ <td>
3171
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 159</span>
3172
+
3173
+ <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
+ <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>
3175
+ <span class='kw'>end</span></pre>
3176
+ </td>
3177
+ </tr>
3178
+ </table>
3179
+ </div>
3180
+
3181
+ <div class="method_details ">
3182
+ <h3 class="signature " id="fetch_context-instance_method">
3183
+
3184
+ #<strong>fetch_context</strong>(id) &#x21d2; <tt><span class='object_link'><a href="Entity/Context.html" title="Shep::Entity::Context (class)">Entity::Context</a></span></tt>
3185
+
3186
+
3187
+
3188
+
3189
+
3190
+ </h3><div class="docstring">
3191
+ <div class="discussion">
3192
+
3193
+ <p>Fetch the context (parent and child status) of status at ‘id’</p>
3194
+
3195
+
3196
+ </div>
3197
+ </div>
3198
+ <div class="tags">
3199
+
3200
+ <p class="tag_title">Returns:</p>
3201
+ <ul class="return">
3202
+
3203
+ <li>
3204
+
3205
+
3206
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Context.html" title="Shep::Entity::Context (class)">Entity::Context</a></span></tt>)</span>
3207
+
3208
+
3209
+
3210
+ </li>
3211
+
3212
+ </ul>
3213
+
3214
+ <p class="tag_title">See Also:</p>
3215
+ <ul class="see">
3216
+
3217
+ <li><a href="https://docs.joinmastodon.org/methods/statuses/#context" target="_parent" title="https://docs.joinmastodon.org/methods/statuses/#context">https://docs.joinmastodon.org/methods/statuses/#context</a></li>
3218
+
3219
+ </ul>
3220
+
3221
+ </div><table class="source_code">
3222
+ <tr>
3223
+ <td>
3224
+ <pre class="lines">
3225
+
3226
+
3227
+ 187</pre>
3228
+ </td>
3229
+ <td>
3230
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 187</span>
3231
+
3232
+ <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
+ </td>
3234
+ </tr>
3235
+ </table>
3236
+ </div>
3237
+
3238
+ <div class="method_details ">
3239
+ <h3 class="signature " id="fetch_notification-instance_method">
3240
+
3241
+ #<strong>fetch_notification</strong>(ntfn_id) &#x21d2; <tt><span class='object_link'><a href="Entity/Notification.html" title="Shep::Entity::Notification (class)">Entity::Notification</a></span></tt>
3242
+
3243
+
3244
+
3245
+
3246
+
3247
+ </h3><div class="docstring">
3248
+ <div class="discussion">
3249
+
3250
+ <p>Fetch an individual notification by ID.</p>
3251
+
3252
+ <p>Requires a token with sufficient permissions.</p>
3253
+
3254
+
3255
+ </div>
3256
+ </div>
3257
+ <div class="tags">
3258
+ <p class="tag_title">Parameters:</p>
3259
+ <ul class="param">
3260
+
3261
+ <li>
3262
+
3263
+ <span class='name'>ntfn_id</span>
3264
+
3265
+
3266
+ <span class='type'>(<tt>String</tt>)</span>
3267
+
3268
+
3269
+
3270
+ &mdash;
3271
+ <div class='inline'>
3272
+ <p>the notification ID</p>
3273
+ </div>
3274
+
3275
+ </li>
3276
+
3277
+ </ul>
3278
+
3279
+ <p class="tag_title">Returns:</p>
3280
+ <ul class="return">
3281
+
3282
+ <li>
3283
+
3284
+
3285
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Notification.html" title="Shep::Entity::Notification (class)">Entity::Notification</a></span></tt>)</span>
3286
+
3287
+
3288
+
3289
+ </li>
3290
+
3291
+ </ul>
3292
+
3293
+ <p class="tag_title">See Also:</p>
3294
+ <ul class="see">
3295
+
3296
+ <li><a href="https://docs.joinmastodon.org/methods/notifications/#get-one" target="_parent" title="https://docs.joinmastodon.org/methods/notifications/#get-one">https://docs.joinmastodon.org/methods/notifications/#get-one</a></li>
3297
+
3298
+ </ul>
3299
+
3300
+ </div><table class="source_code">
3301
+ <tr>
3302
+ <td>
3303
+ <pre class="lines">
3304
+
3305
+
3306
+ 172
3307
+ 173</pre>
3308
+ </td>
3309
+ <td>
3310
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 172</span>
3311
+
3312
+ <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
+ <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>
3314
+ </td>
3315
+ </tr>
3316
+ </table>
3317
+ </div>
3318
+
3319
+ <div class="method_details ">
3320
+ <h3 class="signature " id="fetch_status-instance_method">
3321
+
3322
+ #<strong>fetch_status</strong>(id) &#x21d2; <tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>
3323
+
3324
+
3325
+
3326
+
3327
+
3328
+ </h3><div class="docstring">
3329
+ <div class="discussion">
3330
+
3331
+ <p>Fetch a single status</p>
3332
+
3333
+
3334
+ </div>
3335
+ </div>
3336
+ <div class="tags">
3337
+
3338
+ <p class="tag_title">Returns:</p>
3339
+ <ul class="return">
3340
+
3341
+ <li>
3342
+
3343
+
3344
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>)</span>
3345
+
3346
+
3347
+
3348
+ </li>
3349
+
3350
+ </ul>
3351
+
3352
+ <p class="tag_title">See Also:</p>
3353
+ <ul class="see">
3354
+
3355
+ <li><a href="https://docs.joinmastodon.org/methods/statuses/#get" target="_parent" title="https://docs.joinmastodon.org/methods/statuses/#get">https://docs.joinmastodon.org/methods/statuses/#get</a></li>
3356
+
3357
+ </ul>
3358
+
3359
+ </div><table class="source_code">
3360
+ <tr>
3361
+ <td>
3362
+ <pre class="lines">
3363
+
3364
+
3365
+ 180</pre>
3366
+ </td>
3367
+ <td>
3368
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 180</span>
3369
+
3370
+ <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
+ </td>
3372
+ </tr>
3373
+ </table>
3374
+ </div>
3375
+
3376
+ <div class="method_details ">
3377
+ <h3 class="signature " id="fetch_status_src-instance_method">
3378
+
3379
+ #<strong>fetch_status_src</strong>(id) &#x21d2; <tt><span class='object_link'><a href="Entity/StatusSource.html" title="Shep::Entity::StatusSource (class)">Entity::StatusSource</a></span></tt>
3380
+
3381
+
3382
+
3383
+
3384
+
3385
+ </h3><div class="docstring">
3386
+ <div class="discussion">
3387
+
3388
+ <p>Fetch the editable source of status at id.</p>
3389
+
3390
+ <p>Requires token.</p>
3391
+
3392
+
3393
+ </div>
3394
+ </div>
3395
+ <div class="tags">
3396
+
3397
+ <p class="tag_title">Returns:</p>
3398
+ <ul class="return">
3399
+
3400
+ <li>
3401
+
3402
+
3403
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/StatusSource.html" title="Shep::Entity::StatusSource (class)">Entity::StatusSource</a></span></tt>)</span>
3404
+
3405
+
3406
+
3407
+ </li>
3408
+
3409
+ </ul>
3410
+
3411
+ <p class="tag_title">See Also:</p>
3412
+ <ul class="see">
3413
+
3414
+ <li><a href="https://docs.joinmastodon.org/methods/statuses/#source" target="_parent" title="https://docs.joinmastodon.org/methods/statuses/#source">https://docs.joinmastodon.org/methods/statuses/#source</a></li>
3415
+
3416
+ </ul>
3417
+
3418
+ </div><table class="source_code">
3419
+ <tr>
3420
+ <td>
3421
+ <pre class="lines">
3422
+
3423
+
3424
+ 196
3425
+ 197</pre>
3426
+ </td>
3427
+ <td>
3428
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 196</span>
3429
+
3430
+ <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
+ <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>
3432
+ </td>
3433
+ </tr>
3434
+ </table>
3435
+ </div>
3436
+
3437
+ <div class="method_details ">
3438
+ <h3 class="signature " id="fetch_status_with_media-instance_method">
3439
+
3440
+ #<strong>fetch_status_with_media</strong>(id, media_dir = &#39;.&#39;, refetch: true) &#x21d2; <tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>, <tt>Hash</tt>
3441
+
3442
+
3443
+
3444
+
3445
+
3446
+ </h3><div class="docstring">
3447
+ <div class="discussion">
3448
+
3449
+ <p>Fetch the given status and also any attached media.</p>
3450
+
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>
3452
+
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>
3454
+
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>
3456
+
3457
+
3458
+ </div>
3459
+ </div>
3460
+ <div class="tags">
3461
+ <p class="tag_title">Parameters:</p>
3462
+ <ul class="param">
3463
+
3464
+ <li>
3465
+
3466
+ <span class='name'>id</span>
3467
+
3468
+
3469
+ <span class='type'>(<tt>String</tt>)</span>
3470
+
3471
+
3472
+
3473
+ &mdash;
3474
+ <div class='inline'>
3475
+ <p>ID of the status to retrieve</p>
3476
+ </div>
3477
+
3478
+ </li>
3479
+
3480
+ <li>
3481
+
3482
+ <span class='name'>media_dir</span>
3483
+
3484
+
3485
+ <span class='type'>(<tt>String</tt>)</span>
3486
+
3487
+
3488
+ <em class="default">(defaults to: <tt>&#39;.&#39;</tt>)</em>
3489
+
3490
+
3491
+ &mdash;
3492
+ <div class='inline'>
3493
+ <p>Path to the download directory</p>
3494
+ </div>
3495
+
3496
+ </li>
3497
+
3498
+ <li>
3499
+
3500
+ <span class='name'>refetch</span>
3501
+
3502
+
3503
+ <span class='type'>(<tt>Boolean</tt>)</span>
3504
+
3505
+
3506
+ <em class="default">(defaults to: <tt>true</tt>)</em>
3507
+
3508
+
3509
+ &mdash;
3510
+ <div class='inline'>
3511
+ <p>Fetch the media even if it is already present</p>
3512
+ </div>
3513
+
3514
+ </li>
3515
+
3516
+ </ul>
3517
+
3518
+ <p class="tag_title">Returns:</p>
3519
+ <ul class="return">
3520
+
3521
+ <li>
3522
+
3523
+
3524
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Status.html" title="Shep::Entity::Status (class)">Entity::Status</a></span></tt>, <tt>Hash</tt>)</span>
3525
+
3526
+
3527
+
3528
+ &mdash;
3529
+ <div class='inline'>
3530
+ <p>the Status and a Hash mapping the media URL to the corresponding local file.</p>
3531
+ </div>
3532
+
3533
+ </li>
3534
+
3535
+ </ul>
3536
+
3537
+ <p class="tag_title">See Also:</p>
3538
+ <ul class="see">
3539
+
3540
+ <li><a href="https://docs.joinmastodon.org/methods/statuses/#get" target="_parent" title="https://docs.joinmastodon.org/methods/statuses/#get">https://docs.joinmastodon.org/methods/statuses/#get</a></li>
3541
+
3542
+ </ul>
3543
+
3544
+ </div><table class="source_code">
3545
+ <tr>
3546
+ <td>
3547
+ <pre class="lines">
3548
+
3549
+
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>
3575
+ </td>
3576
+ <td>
3577
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 227</span>
3578
+
3579
+ <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
+ <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>
3581
+ <span class='id identifier rubyid_media'>media</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
3582
+
3583
+ <span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_media_attachments'>media_attachments</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_ma'>ma</span><span class='op'>|</span>
3584
+ <span class='id identifier rubyid_outfile'>outfile</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'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</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='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='rparen'>)</span>
3585
+
3586
+ <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
+ <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
+ <span class='kw'>else</span>
3590
+ <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>
3593
+ <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>
3595
+ <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>
3596
+ <span class='kw'>end</span>
3597
+ <span class='kw'>end</span>
3598
+
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>
3600
+ <span class='rbrace'>}</span>
3601
+
3602
+ <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>
3603
+ <span class='kw'>end</span></pre>
3604
+ </td>
3605
+ </tr>
3606
+ </table>
3607
+ </div>
3608
+
3609
+ <div class="method_details ">
3610
+ <h3 class="signature " id="post_status-instance_method">
3611
+
3612
+ #<strong>post_status</strong>(text, visibility: :private, media_ids: [], spoiler_text: &quot;&quot;, language: &quot;&quot;) &#x21d2; <tt>Object</tt>
3613
+
3614
+
3615
+
3616
+
3617
+
3618
+ </h3><div class="docstring">
3619
+ <div class="discussion">
3620
+
3621
+ <p>Post a status containing the given text at the specified visibility with zero or more media attachments.</p>
3622
+
3623
+ <p>visibility can be one of ‘public’, ‘private’, ‘unlisted’ or ‘direct’; these can be strings of symbols)</p>
3624
+
3625
+ <p>media_ids is an array containing the ID strings of any media that may need to be attached.</p>
3626
+
3627
+
3628
+ </div>
3629
+ </div>
3630
+ <div class="tags">
3631
+ <p class="tag_title">Parameters:</p>
3632
+ <ul class="param">
3633
+
3634
+ <li>
3635
+
3636
+ <span class='name'>visibility</span>
3637
+
3638
+
3639
+ <span class='type'>(<tt>Symbol</tt>)</span>
3640
+
3641
+
3642
+ <em class="default">(defaults to: <tt>:private</tt>)</em>
3643
+
3644
+
3645
+ &mdash;
3646
+ <div class='inline'>
3647
+ <p>Status visibility; one of :public, :public, :unlisted or :direct</p>
3648
+ </div>
3649
+
3650
+ </li>
3651
+
3652
+ <li>
3653
+
3654
+ <span class='name'>media_ids</span>
3655
+
3656
+
3657
+ <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
3658
+
3659
+
3660
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
3661
+
3662
+
3663
+ &mdash;
3664
+ <div class='inline'>
3665
+ <p>List of IDs of attached media items.</p>
3666
+ </div>
3667
+
3668
+ </li>
3669
+
3670
+ <li>
3671
+
3672
+ <span class='name'>spoiler_text</span>
3673
+
3674
+
3675
+ <span class='type'>(<tt>String</tt>)</span>
3676
+
3677
+
3678
+ <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
3679
+
3680
+
3681
+ &mdash;
3682
+ <div class='inline'>
3683
+ <p>Content warning if non-empty string. Also sets <code>sensitive</code> to true.</p>
3684
+ </div>
3685
+
3686
+ </li>
3687
+
3688
+ <li>
3689
+
3690
+ <span class='name'>language</span>
3691
+
3692
+
3693
+ <span class='type'>(<tt>String</tt>)</span>
3694
+
3695
+
3696
+ <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
3697
+
3698
+
3699
+ &mdash;
3700
+ <div class='inline'>
3701
+ <p>ISO language code</p>
3702
+ </div>
3703
+
3704
+ </li>
3705
+
3706
+ </ul>
3707
+
3708
+ <p class="tag_title">Raises:</p>
3709
+ <ul class="raise">
3710
+
3711
+ <li>
3712
+
3713
+
3714
+ <span class='type'>(<tt><span class='object_link'><a href="Error/Caller.html" title="Shep::Error::Caller (class)">Error::Caller</a></span></tt>)</span>
3715
+
3716
+
3717
+
3718
+ </li>
3719
+
3720
+ </ul>
3721
+
3722
+ <p class="tag_title">See Also:</p>
3723
+ <ul class="see">
3724
+
3725
+ <li><a href="https://docs.joinmastodon.org/methods/statuses/#create" target="_parent" title="https://docs.joinmastodon.org/methods/statuses/#create">https://docs.joinmastodon.org/methods/statuses/#create</a></li>
3726
+
3727
+ </ul>
3728
+
3729
+ </div><table class="source_code">
3730
+ <tr>
3731
+ <td>
3732
+ <pre class="lines">
3733
+
3734
+
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>
3756
+ </td>
3757
+ <td>
3758
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 554</span>
3759
+
3760
+ <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
+ <span class='label'>visibility:</span> <span class='symbol'>:private</span><span class='comma'>,</span>
3762
+ <span class='label'>media_ids:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
3763
+ <span class='label'>spoiler_text:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
3764
+ <span class='label'>language:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
3765
+ <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'>Invalid visibility: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_visibility'>visibility</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span>
3766
+ <span class='qsymbols_beg'>%i{</span><span class='tstring_content'>public</span><span class='words_sep'> </span><span class='tstring_content'>unlisted</span><span class='words_sep'> </span><span class='tstring_content'>private</span><span class='words_sep'> </span><span class='tstring_content'>direct</span><span class='tstring_end'>}</span></span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_visibility'>visibility</span><span class='period'>.</span><span class='id identifier rubyid_intern'>intern</span>
3767
+
3768
+ <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_magically_get_caller_kwargs'>magically_get_caller_kwargs</span><span class='lparen'>(</span><span class='id identifier rubyid_binding'>binding</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='id identifier rubyid___method__'>__method__</span><span class='rparen'>)</span><span class='rparen'>)</span>
3769
+ <span class='id identifier rubyid_query'>query</span><span class='lbracket'>[</span><span class='symbol'>:status</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_text'>text</span>
3770
+ <span class='id identifier rubyid_query'>query</span><span class='lbracket'>[</span><span class='symbol'>:sensitive</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span>
3771
+ <span class='id identifier rubyid_spoiler_text'>spoiler_text</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_spoiler_text'>spoiler_text</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
3772
+
3773
+ <span class='comment'># We need to convert to an array of keys and values rather than
3774
+ </span> <span class='comment'># a hash because passing an array argument requires duplicate
3775
+ </span> <span class='comment'># keys. This causes Net::HTTP to submit it as a multipart form,
3776
+ </span> <span class='comment'># but we can cope.
3777
+ </span> <span class='id identifier rubyid_formdata'>formdata</span> <span class='op'>=</span> <span class='id identifier rubyid_formhash2array'>formhash2array</span><span class='lparen'>(</span><span class='id identifier rubyid_query'>query</span><span class='rparen'>)</span>
3778
+
3779
+ <span class='kw'>return</span> <span class='id identifier rubyid_rest_post'>rest_post</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>statuses</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='id identifier rubyid_formdata'>formdata</span><span class='rparen'>)</span>
3780
+ <span class='kw'>end</span></pre>
3781
+ </td>
3782
+ </tr>
3783
+ </table>
3784
+ </div>
3785
+
3786
+ <div class="method_details ">
3787
+ <h3 class="signature " id="rate_limit-instance_method">
3788
+
3789
+ #<strong>rate_limit</strong> &#x21d2; <tt>Struct.new(:limit, :remaining, :reset)</tt>
3790
+
3791
+
3792
+
3793
+
3794
+
3795
+ </h3><div class="docstring">
3796
+ <div class="discussion">
3797
+
3798
+ <p>Return the rate limit information as of the last operation.</p>
3799
+
3800
+ <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
+
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>
3810
+
3811
+
3812
+ </div>
3813
+ </div>
3814
+ <div class="tags">
3815
+
3816
+ <p class="tag_title">Returns:</p>
3817
+ <ul class="return">
3818
+
3819
+ <li>
3820
+
3821
+
3822
+ <span class='type'>(<tt>Struct.new(:limit, :remaining, :reset)</tt>)</span>
3823
+
3824
+
3825
+
3826
+ </li>
3827
+
3828
+ </ul>
3829
+
3830
+ <p class="tag_title">See Also:</p>
3831
+ <ul class="see">
3832
+
3833
+ <li><a href="https://docs.joinmastodon.org/api/rate-limits/" target="_parent" title="https://docs.joinmastodon.org/api/rate-limits/">https://docs.joinmastodon.org/api/rate-limits/</a></li>
3834
+
3835
+ </ul>
3836
+
3837
+ </div><table class="source_code">
3838
+ <tr>
3839
+ <td>
3840
+ <pre class="lines">
3841
+
3842
+
3843
+ 107</pre>
3844
+ </td>
3845
+ <td>
3846
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 107</span>
3847
+
3848
+ <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
+ </td>
3850
+ </tr>
3851
+ </table>
3852
+ </div>
3853
+
3854
+ <div class="method_details ">
3855
+ <h3 class="signature " id="rate_limit_desc-instance_method">
3856
+
3857
+ #<strong>rate_limit_desc</strong> &#x21d2; <tt>String</tt>
3858
+
3859
+
3860
+
3861
+
3862
+
3863
+ </h3><div class="docstring">
3864
+ <div class="discussion">
3865
+
3866
+ <p>Return a human-readable summary of the rate limit.</p>
3867
+
3868
+ <p>text</p>
3869
+
3870
+
3871
+ </div>
3872
+ </div>
3873
+ <div class="tags">
3874
+
3875
+ <p class="tag_title">Returns:</p>
3876
+ <ul class="return">
3877
+
3878
+ <li>
3879
+
3880
+
3881
+ <span class='type'>(<tt>String</tt>)</span>
3882
+
3883
+
3884
+
3885
+ &mdash;
3886
+ <div class='inline'>
3887
+ <p><code>rate_limit()</code>‘s result as nicely-formatted</p>
3888
+ </div>
3889
+
3890
+ </li>
3891
+
3892
+ </ul>
3893
+
3894
+ </div><table class="source_code">
3895
+ <tr>
3896
+ <td>
3897
+ <pre class="lines">
3898
+
3899
+
3900
+ 114
3901
+ 115
3902
+ 116
3903
+ 117
3904
+ 118
3905
+ 119
3906
+ 120</pre>
3907
+ </td>
3908
+ <td>
3909
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 114</span>
3910
+
3911
+ <span class='kw'>def</span> <span class='id identifier rubyid_rate_limit_desc'>rate_limit_desc</span>
3912
+ <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>
3913
+ <span class='id identifier rubyid_lim'>lim</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='ivar'>@rate_limit</span><span class='period'>.</span><span class='id identifier rubyid_limit'>limit</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>
3914
+ <span class='id identifier rubyid_reset'>reset</span> <span class='op'>=</span> <span class='ivar'>@rate_limit</span><span class='period'>.</span><span class='id identifier rubyid_reset'>reset</span> <span class='op'>?</span> <span class='lparen'>(</span><span class='ivar'>@rate_limit</span><span class='period'>.</span><span class='id identifier rubyid_reset'>reset</span> <span class='op'>-</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</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>
3915
+
3916
+ <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_rem'>rem</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_lim'>lim</span><span class='embexpr_end'>}</span><span class='tstring_content'>, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_reset'>reset</span><span class='embexpr_end'>}</span><span class='tstring_content'>s</span><span class='tstring_end'>&quot;</span></span>
3917
+ <span class='kw'>end</span></pre>
3918
+ </td>
3919
+ </tr>
3920
+ </table>
3921
+ </div>
3922
+
3923
+ <div class="method_details ">
3924
+ <h3 class="signature " id="upload_media-instance_method">
3925
+
3926
+ #<strong>upload_media</strong>(path, content_type: nil, description: nil, focus_x: nil, focus_y: nil) &#x21d2; <tt>Object</tt>
3927
+
3928
+
3929
+
3930
+
3931
+
3932
+ </h3><div class="docstring">
3933
+ <div class="discussion">
3934
+
3935
+ <p>Upload the media contained in the file at ‘path’.</p>
3936
+
3937
+
3938
+ </div>
3939
+ </div>
3940
+ <div class="tags">
3941
+
3942
+
3943
+ <p class="tag_title">See Also:</p>
3944
+ <ul class="see">
3945
+
3946
+ <li><a href="https://docs.joinmastodon.org/methods/media/#v2" target="_parent" title="https://docs.joinmastodon.org/methods/media/#v2">https://docs.joinmastodon.org/methods/media/#v2</a></li>
3947
+
3948
+ </ul>
3949
+
3950
+ </div><table class="source_code">
3951
+ <tr>
3952
+ <td>
3953
+ <pre class="lines">
3954
+
3955
+
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>
3983
+ </td>
3984
+ <td>
3985
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 624</span>
3986
+
3987
+ <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
+ <span class='label'>content_type:</span> <span class='kw'>nil</span><span class='comma'>,</span>
3989
+ <span class='label'>description:</span> <span class='kw'>nil</span><span class='comma'>,</span>
3990
+ <span class='label'>focus_x:</span> <span class='kw'>nil</span><span class='comma'>,</span>
3991
+ <span class='label'>focus_y:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
3992
+ <span class='id identifier rubyid_formdata'>formdata</span> <span class='op'>=</span> <span class='lbracket'>[</span>
3993
+ <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>filename</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='comma'>,</span>
3994
+ <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>file</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>rb</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>content_type:</span> <span class='id identifier rubyid_content_type'>content_type</span><span class='rbrace'>}</span><span class='rbracket'>]</span><span class='comma'>,</span>
3995
+ <span class='rbracket'>]</span>
3996
+
3997
+ <span class='id identifier rubyid_formdata'>formdata</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>description</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_description'>description</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_description'>description</span>
3998
+
3999
+ <span class='comment'># Focus args are more exacting so we do some checks here.
4000
+ </span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_focus_x'>focus_x</span> <span class='op'>==</span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_focus_y'>focus_y</span> <span class='kw'>or</span>
4001
+ <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'>Args &#39;focus_x/y&#39; must *both* be set or unset.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
4002
+
4003
+ <span class='kw'>if</span> <span class='id identifier rubyid_focus_x'>focus_x</span>
4004
+ <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'>focus_x/y not a float between -1 and 1</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span>
4005
+ <span class='lparen'>(</span><span class='id identifier rubyid_focus_x'>focus_x</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Float</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_focus_y'>focus_y</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Float</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
4006
+ <span class='id identifier rubyid_focus_x'>focus_x</span> <span class='op'>&gt;=</span> <span class='op'>-</span><span class='float'>1.0</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_focus_x'>focus_x</span> <span class='op'>&lt;=</span> <span class='float'>1.0</span> <span class='op'>&amp;&amp;</span>
4007
+ <span class='id identifier rubyid_focus_y'>focus_y</span> <span class='op'>&gt;=</span> <span class='op'>-</span><span class='float'>1.0</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_focus_y'>focus_y</span> <span class='op'>&lt;=</span> <span class='float'>1.0</span><span class='rparen'>)</span>
4008
+
4009
+ <span class='id identifier rubyid_formdata'>formdata</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>focus</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_focus_x'>focus_x</span><span class='embexpr_end'>}</span><span class='tstring_content'>,</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_focus_y'>focus_y</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
4010
+ <span class='kw'>end</span>
4011
+
4012
+ <span class='kw'>return</span> <span class='id identifier rubyid_rest_post'>rest_post</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>media</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/MediaAttachment.html" title="Shep::Entity::MediaAttachment (class)">MediaAttachment</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_formdata'>formdata</span><span class='comma'>,</span> <span class='label'>v2:</span> <span class='kw'>true</span><span class='rparen'>)</span>
4013
+ <span class='kw'>end</span></pre>
4014
+ </td>
4015
+ </tr>
4016
+ </table>
4017
+ </div>
4018
+
4019
+ <div class="method_details ">
4020
+ <h3 class="signature " id="verify_credentials-instance_method">
4021
+
4022
+ #<strong>verify_credentials</strong> &#x21d2; <tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt>
4023
+
4024
+
4025
+
4026
+
4027
+
4028
+ </h3><div class="docstring">
4029
+ <div class="discussion">
4030
+
4031
+ <p>Return the Entity::Account object for the token we’re using.</p>
4032
+
4033
+ <p>Requires a token (obviously).</p>
4034
+
4035
+
4036
+ </div>
4037
+ </div>
4038
+ <div class="tags">
4039
+
4040
+ <p class="tag_title">Returns:</p>
4041
+ <ul class="return">
4042
+
4043
+ <li>
4044
+
4045
+
4046
+ <span class='type'>(<tt><span class='object_link'><a href="Entity/Account.html" title="Shep::Entity::Account (class)">Entity::Account</a></span></tt>)</span>
4047
+
4048
+
4049
+
4050
+ </li>
4051
+
4052
+ </ul>
4053
+
4054
+ <p class="tag_title">See Also:</p>
4055
+ <ul class="see">
4056
+
4057
+ <li><a href="https://docs.joinmastodon.org/methods/accounts/#verify_credentials" target="_parent" title="https://docs.joinmastodon.org/methods/accounts/#verify_credentials">https://docs.joinmastodon.org/methods/accounts/#verify_credentials</a></li>
4058
+
4059
+ </ul>
4060
+
4061
+ </div><table class="source_code">
4062
+ <tr>
4063
+ <td>
4064
+ <pre class="lines">
4065
+
4066
+
4067
+ 134
4068
+ 135
4069
+ 136</pre>
4070
+ </td>
4071
+ <td>
4072
+ <pre class="code"><span class="info file"># File 'lib/shep/session.rb', line 134</span>
4073
+
4074
+ <span class='kw'>def</span> <span class='id identifier rubyid_verify_credentials'>verify_credentials</span>
4075
+ <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>
4076
+ <span class='kw'>end</span></pre>
4077
+ </td>
4078
+ </tr>
4079
+ </table>
4080
+ </div>
4081
+
4082
+ </div>
4083
+
4084
+ </div>
4085
+
4086
+ <div id="footer">
4087
+ Generated on Sun Jun 4 13:40:34 2023 by
4088
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
4089
+ 0.9.34 (ruby-3.1.0).
4090
+ </div>
4091
+
4092
+ </div>
4093
+ </body>
4094
+ </html>