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.
- checksums.yaml +7 -0
- data/Copyright.txt +8 -0
- data/LICENSE.txt +697 -0
- data/README.md +101 -0
- data/Rakefile +52 -0
- data/doc/Shep/Entity/Account.html +193 -0
- data/doc/Shep/Entity/Context.html +165 -0
- data/doc/Shep/Entity/CustomEmoji.html +171 -0
- data/doc/Shep/Entity/MediaAttachment.html +175 -0
- data/doc/Shep/Entity/Notification.html +171 -0
- data/doc/Shep/Entity/Status.html +217 -0
- data/doc/Shep/Entity/StatusSource.html +167 -0
- data/doc/Shep/Entity/Status_Application.html +167 -0
- data/doc/Shep/Entity/Status_Mention.html +169 -0
- data/doc/Shep/Entity/Status_Tag.html +165 -0
- data/doc/Shep/Entity.html +1457 -0
- data/doc/Shep/Error/Caller.html +147 -0
- data/doc/Shep/Error/Http.html +329 -0
- data/doc/Shep/Error/Remote.html +143 -0
- data/doc/Shep/Error/Server.html +147 -0
- data/doc/Shep/Error/Type.html +233 -0
- data/doc/Shep/Error.html +149 -0
- data/doc/Shep/Session.html +4094 -0
- data/doc/Shep.html +128 -0
- data/doc/_index.html +300 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +497 -0
- data/doc/file.README.html +159 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +300 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +387 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/shep/entities.rb +164 -0
- data/lib/shep/entity_base.rb +378 -0
- data/lib/shep/exceptions.rb +78 -0
- data/lib/shep/session.rb +970 -0
- data/lib/shep/typeboxes.rb +180 -0
- data/lib/shep.rb +22 -0
- data/run_rake_test.example.sh +46 -0
- data/shep.gemspec +28 -0
- data/spec/data/smallimg.jpg +0 -0
- data/spec/data/smallish.jpg +0 -0
- data/spec/entity_common.rb +120 -0
- data/spec/entity_t1_spec.rb +168 -0
- data/spec/entity_t2_spec.rb +123 -0
- data/spec/entity_t3_spec.rb +30 -0
- data/spec/json_objects/account.1.json +25 -0
- data/spec/json_objects/account.2.json +36 -0
- data/spec/json_objects/status.1.json +85 -0
- data/spec/json_objects/status.2.json +59 -0
- data/spec/json_objects/status.3.json +95 -0
- data/spec/json_objects/status.4.json +95 -0
- data/spec/json_objects/status.5.json +74 -0
- data/spec/json_objects/status.6.json +140 -0
- data/spec/json_objects/status.7.json +84 -0
- data/spec/session_reader_1_unauth_spec.rb +366 -0
- data/spec/session_reader_2_auth_spec.rb +96 -0
- data/spec/session_writer_spec.rb +183 -0
- data/spec/spec_helper.rb +73 -0
- data/yard_helper.rb +30 -0
- metadata +154 -0
@@ -0,0 +1,387 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
5
|
+
<meta charset="utf-8" />
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
|
8
|
+
|
9
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
|
16
|
+
|
17
|
+
|
18
|
+
<title>Method List</title>
|
19
|
+
<base id="base_target" target="_parent" />
|
20
|
+
</head>
|
21
|
+
<body>
|
22
|
+
<div id="content">
|
23
|
+
<div class="fixed_header">
|
24
|
+
<h1 id="full_list_header">Method List</h1>
|
25
|
+
<div id="full_list_nav">
|
26
|
+
|
27
|
+
<span><a target="_self" href="class_list.html">
|
28
|
+
Classes
|
29
|
+
</a></span>
|
30
|
+
|
31
|
+
<span><a target="_self" href="method_list.html">
|
32
|
+
Methods
|
33
|
+
</a></span>
|
34
|
+
|
35
|
+
<span><a target="_self" href="file_list.html">
|
36
|
+
Files
|
37
|
+
</a></span>
|
38
|
+
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="search">Search: <input type="text" /></div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<ul id="full_list" class="method">
|
45
|
+
|
46
|
+
|
47
|
+
<li class="odd ">
|
48
|
+
<div class="item">
|
49
|
+
<span class='object_link'><a href="Shep/Entity.html#==-instance_method" title="Shep::Entity#== (method)">#==</a></span>
|
50
|
+
<small>Shep::Entity</small>
|
51
|
+
</div>
|
52
|
+
</li>
|
53
|
+
|
54
|
+
|
55
|
+
<li class="even ">
|
56
|
+
<div class="item">
|
57
|
+
<span class='object_link'><a href="Shep/Entity.html#[]-instance_method" title="Shep::Entity#[] (method)">#[]</a></span>
|
58
|
+
<small>Shep::Entity</small>
|
59
|
+
</div>
|
60
|
+
</li>
|
61
|
+
|
62
|
+
|
63
|
+
<li class="odd ">
|
64
|
+
<div class="item">
|
65
|
+
<span class='object_link'><a href="Shep/Entity.html#[]=-instance_method" title="Shep::Entity#[]= (method)">#[]=</a></span>
|
66
|
+
<small>Shep::Entity</small>
|
67
|
+
</div>
|
68
|
+
</li>
|
69
|
+
|
70
|
+
|
71
|
+
<li class="even ">
|
72
|
+
<div class="item">
|
73
|
+
<span class='object_link'><a href="Shep/Session.html#delete_status-instance_method" title="Shep::Session#delete_status (method)">#delete_status</a></span>
|
74
|
+
<small>Shep::Session</small>
|
75
|
+
</div>
|
76
|
+
</li>
|
77
|
+
|
78
|
+
|
79
|
+
<li class="odd ">
|
80
|
+
<div class="item">
|
81
|
+
<span class='object_link'><a href="Shep/Session.html#dismiss_notification-instance_method" title="Shep::Session#dismiss_notification (method)">#dismiss_notification</a></span>
|
82
|
+
<small>Shep::Session</small>
|
83
|
+
</div>
|
84
|
+
</li>
|
85
|
+
|
86
|
+
|
87
|
+
<li class="even ">
|
88
|
+
<div class="item">
|
89
|
+
<span class='object_link'><a href="Shep/Session.html#each_boost_acct-instance_method" title="Shep::Session#each_boost_acct (method)">#each_boost_acct</a></span>
|
90
|
+
<small>Shep::Session</small>
|
91
|
+
</div>
|
92
|
+
</li>
|
93
|
+
|
94
|
+
|
95
|
+
<li class="odd ">
|
96
|
+
<div class="item">
|
97
|
+
<span class='object_link'><a href="Shep/Session.html#each_fave_acct-instance_method" title="Shep::Session#each_fave_acct (method)">#each_fave_acct</a></span>
|
98
|
+
<small>Shep::Session</small>
|
99
|
+
</div>
|
100
|
+
</li>
|
101
|
+
|
102
|
+
|
103
|
+
<li class="even ">
|
104
|
+
<div class="item">
|
105
|
+
<span class='object_link'><a href="Shep/Session.html#each_follower-instance_method" title="Shep::Session#each_follower (method)">#each_follower</a></span>
|
106
|
+
<small>Shep::Session</small>
|
107
|
+
</div>
|
108
|
+
</li>
|
109
|
+
|
110
|
+
|
111
|
+
<li class="odd ">
|
112
|
+
<div class="item">
|
113
|
+
<span class='object_link'><a href="Shep/Session.html#each_following-instance_method" title="Shep::Session#each_following (method)">#each_following</a></span>
|
114
|
+
<small>Shep::Session</small>
|
115
|
+
</div>
|
116
|
+
</li>
|
117
|
+
|
118
|
+
|
119
|
+
<li class="even ">
|
120
|
+
<div class="item">
|
121
|
+
<span class='object_link'><a href="Shep/Session.html#each_home_status-instance_method" title="Shep::Session#each_home_status (method)">#each_home_status</a></span>
|
122
|
+
<small>Shep::Session</small>
|
123
|
+
</div>
|
124
|
+
</li>
|
125
|
+
|
126
|
+
|
127
|
+
<li class="odd ">
|
128
|
+
<div class="item">
|
129
|
+
<span class='object_link'><a href="Shep/Session.html#each_notification-instance_method" title="Shep::Session#each_notification (method)">#each_notification</a></span>
|
130
|
+
<small>Shep::Session</small>
|
131
|
+
</div>
|
132
|
+
</li>
|
133
|
+
|
134
|
+
|
135
|
+
<li class="even ">
|
136
|
+
<div class="item">
|
137
|
+
<span class='object_link'><a href="Shep/Session.html#each_public_status-instance_method" title="Shep::Session#each_public_status (method)">#each_public_status</a></span>
|
138
|
+
<small>Shep::Session</small>
|
139
|
+
</div>
|
140
|
+
</li>
|
141
|
+
|
142
|
+
|
143
|
+
<li class="odd ">
|
144
|
+
<div class="item">
|
145
|
+
<span class='object_link'><a href="Shep/Session.html#each_status-instance_method" title="Shep::Session#each_status (method)">#each_status</a></span>
|
146
|
+
<small>Shep::Session</small>
|
147
|
+
</div>
|
148
|
+
</li>
|
149
|
+
|
150
|
+
|
151
|
+
<li class="even ">
|
152
|
+
<div class="item">
|
153
|
+
<span class='object_link'><a href="Shep/Session.html#each_tag_status-instance_method" title="Shep::Session#each_tag_status (method)">#each_tag_status</a></span>
|
154
|
+
<small>Shep::Session</small>
|
155
|
+
</div>
|
156
|
+
</li>
|
157
|
+
|
158
|
+
|
159
|
+
<li class="odd ">
|
160
|
+
<div class="item">
|
161
|
+
<span class='object_link'><a href="Shep/Session.html#edit_status-instance_method" title="Shep::Session#edit_status (method)">#edit_status</a></span>
|
162
|
+
<small>Shep::Session</small>
|
163
|
+
</div>
|
164
|
+
</li>
|
165
|
+
|
166
|
+
|
167
|
+
<li class="even ">
|
168
|
+
<div class="item">
|
169
|
+
<span class='object_link'><a href="Shep/Session.html#fetch_account-instance_method" title="Shep::Session#fetch_account (method)">#fetch_account</a></span>
|
170
|
+
<small>Shep::Session</small>
|
171
|
+
</div>
|
172
|
+
</li>
|
173
|
+
|
174
|
+
|
175
|
+
<li class="odd ">
|
176
|
+
<div class="item">
|
177
|
+
<span class='object_link'><a href="Shep/Session.html#fetch_account_by_username-instance_method" title="Shep::Session#fetch_account_by_username (method)">#fetch_account_by_username</a></span>
|
178
|
+
<small>Shep::Session</small>
|
179
|
+
</div>
|
180
|
+
</li>
|
181
|
+
|
182
|
+
|
183
|
+
<li class="even ">
|
184
|
+
<div class="item">
|
185
|
+
<span class='object_link'><a href="Shep/Session.html#fetch_context-instance_method" title="Shep::Session#fetch_context (method)">#fetch_context</a></span>
|
186
|
+
<small>Shep::Session</small>
|
187
|
+
</div>
|
188
|
+
</li>
|
189
|
+
|
190
|
+
|
191
|
+
<li class="odd ">
|
192
|
+
<div class="item">
|
193
|
+
<span class='object_link'><a href="Shep/Session.html#fetch_notification-instance_method" title="Shep::Session#fetch_notification (method)">#fetch_notification</a></span>
|
194
|
+
<small>Shep::Session</small>
|
195
|
+
</div>
|
196
|
+
</li>
|
197
|
+
|
198
|
+
|
199
|
+
<li class="even ">
|
200
|
+
<div class="item">
|
201
|
+
<span class='object_link'><a href="Shep/Session.html#fetch_status-instance_method" title="Shep::Session#fetch_status (method)">#fetch_status</a></span>
|
202
|
+
<small>Shep::Session</small>
|
203
|
+
</div>
|
204
|
+
</li>
|
205
|
+
|
206
|
+
|
207
|
+
<li class="odd ">
|
208
|
+
<div class="item">
|
209
|
+
<span class='object_link'><a href="Shep/Session.html#fetch_status_src-instance_method" title="Shep::Session#fetch_status_src (method)">#fetch_status_src</a></span>
|
210
|
+
<small>Shep::Session</small>
|
211
|
+
</div>
|
212
|
+
</li>
|
213
|
+
|
214
|
+
|
215
|
+
<li class="even ">
|
216
|
+
<div class="item">
|
217
|
+
<span class='object_link'><a href="Shep/Session.html#fetch_status_with_media-instance_method" title="Shep::Session#fetch_status_with_media (method)">#fetch_status_with_media</a></span>
|
218
|
+
<small>Shep::Session</small>
|
219
|
+
</div>
|
220
|
+
</li>
|
221
|
+
|
222
|
+
|
223
|
+
<li class="odd ">
|
224
|
+
<div class="item">
|
225
|
+
<span class='object_link'><a href="Shep/Entity.html#fields-class_method" title="Shep::Entity.fields (method)">fields</a></span>
|
226
|
+
<small>Shep::Entity</small>
|
227
|
+
</div>
|
228
|
+
</li>
|
229
|
+
|
230
|
+
|
231
|
+
<li class="even ">
|
232
|
+
<div class="item">
|
233
|
+
<span class='object_link'><a href="Shep/Entity.html#from-class_method" title="Shep::Entity.from (method)">from</a></span>
|
234
|
+
<small>Shep::Entity</small>
|
235
|
+
</div>
|
236
|
+
</li>
|
237
|
+
|
238
|
+
|
239
|
+
<li class="odd ">
|
240
|
+
<div class="item">
|
241
|
+
<span class='object_link'><a href="Shep/Session.html#host-instance_method" title="Shep::Session#host (method)">#host</a></span>
|
242
|
+
<small>Shep::Session</small>
|
243
|
+
</div>
|
244
|
+
</li>
|
245
|
+
|
246
|
+
|
247
|
+
<li class="even ">
|
248
|
+
<div class="item">
|
249
|
+
<span class='object_link'><a href="Shep/Error/Type.html#initialize-instance_method" title="Shep::Error::Type#initialize (method)">#initialize</a></span>
|
250
|
+
<small>Shep::Error::Type</small>
|
251
|
+
</div>
|
252
|
+
</li>
|
253
|
+
|
254
|
+
|
255
|
+
<li class="odd ">
|
256
|
+
<div class="item">
|
257
|
+
<span class='object_link'><a href="Shep/Error/Http.html#initialize-instance_method" title="Shep::Error::Http#initialize (method)">#initialize</a></span>
|
258
|
+
<small>Shep::Error::Http</small>
|
259
|
+
</div>
|
260
|
+
</li>
|
261
|
+
|
262
|
+
|
263
|
+
<li class="even ">
|
264
|
+
<div class="item">
|
265
|
+
<span class='object_link'><a href="Shep/Entity.html#initialize-instance_method" title="Shep::Entity#initialize (method)">#initialize</a></span>
|
266
|
+
<small>Shep::Entity</small>
|
267
|
+
</div>
|
268
|
+
</li>
|
269
|
+
|
270
|
+
|
271
|
+
<li class="odd ">
|
272
|
+
<div class="item">
|
273
|
+
<span class='object_link'><a href="Shep/Session.html#initialize-instance_method" title="Shep::Session#initialize (method)">#initialize</a></span>
|
274
|
+
<small>Shep::Session</small>
|
275
|
+
</div>
|
276
|
+
</li>
|
277
|
+
|
278
|
+
|
279
|
+
<li class="even ">
|
280
|
+
<div class="item">
|
281
|
+
<span class='object_link'><a href="Shep/Session.html#logger-instance_method" title="Shep::Session#logger (method)">#logger</a></span>
|
282
|
+
<small>Shep::Session</small>
|
283
|
+
</div>
|
284
|
+
</li>
|
285
|
+
|
286
|
+
|
287
|
+
<li class="odd ">
|
288
|
+
<div class="item">
|
289
|
+
<span class='object_link'><a href="Shep/Session.html#post_status-instance_method" title="Shep::Session#post_status (method)">#post_status</a></span>
|
290
|
+
<small>Shep::Session</small>
|
291
|
+
</div>
|
292
|
+
</li>
|
293
|
+
|
294
|
+
|
295
|
+
<li class="even ">
|
296
|
+
<div class="item">
|
297
|
+
<span class='object_link'><a href="Shep/Entity.html#print-instance_method" title="Shep::Entity#print (method)">#print</a></span>
|
298
|
+
<small>Shep::Entity</small>
|
299
|
+
</div>
|
300
|
+
</li>
|
301
|
+
|
302
|
+
|
303
|
+
<li class="odd ">
|
304
|
+
<div class="item">
|
305
|
+
<span class='object_link'><a href="Shep/Session.html#rate_limit-instance_method" title="Shep::Session#rate_limit (method)">#rate_limit</a></span>
|
306
|
+
<small>Shep::Session</small>
|
307
|
+
</div>
|
308
|
+
</li>
|
309
|
+
|
310
|
+
|
311
|
+
<li class="even ">
|
312
|
+
<div class="item">
|
313
|
+
<span class='object_link'><a href="Shep/Session.html#rate_limit_desc-instance_method" title="Shep::Session#rate_limit_desc (method)">#rate_limit_desc</a></span>
|
314
|
+
<small>Shep::Session</small>
|
315
|
+
</div>
|
316
|
+
</li>
|
317
|
+
|
318
|
+
|
319
|
+
<li class="odd ">
|
320
|
+
<div class="item">
|
321
|
+
<span class='object_link'><a href="Shep/Error/Http.html#response-instance_method" title="Shep::Error::Http#response (method)">#response</a></span>
|
322
|
+
<small>Shep::Error::Http</small>
|
323
|
+
</div>
|
324
|
+
</li>
|
325
|
+
|
326
|
+
|
327
|
+
<li class="even ">
|
328
|
+
<div class="item">
|
329
|
+
<span class='object_link'><a href="Shep/Entity.html#set_from_hash!-instance_method" title="Shep::Entity#set_from_hash! (method)">#set_from_hash!</a></span>
|
330
|
+
<small>Shep::Entity</small>
|
331
|
+
</div>
|
332
|
+
</li>
|
333
|
+
|
334
|
+
|
335
|
+
<li class="odd ">
|
336
|
+
<div class="item">
|
337
|
+
<span class='object_link'><a href="Shep/Entity.html#to_h-instance_method" title="Shep::Entity#to_h (method)">#to_h</a></span>
|
338
|
+
<small>Shep::Entity</small>
|
339
|
+
</div>
|
340
|
+
</li>
|
341
|
+
|
342
|
+
|
343
|
+
<li class="even ">
|
344
|
+
<div class="item">
|
345
|
+
<span class='object_link'><a href="Shep/Entity.html#to_long_s-instance_method" title="Shep::Entity#to_long_s (method)">#to_long_s</a></span>
|
346
|
+
<small>Shep::Entity</small>
|
347
|
+
</div>
|
348
|
+
</li>
|
349
|
+
|
350
|
+
|
351
|
+
<li class="odd ">
|
352
|
+
<div class="item">
|
353
|
+
<span class='object_link'><a href="Shep/Entity.html#to_s-instance_method" title="Shep::Entity#to_s (method)">#to_s</a></span>
|
354
|
+
<small>Shep::Entity</small>
|
355
|
+
</div>
|
356
|
+
</li>
|
357
|
+
|
358
|
+
|
359
|
+
<li class="even ">
|
360
|
+
<div class="item">
|
361
|
+
<span class='object_link'><a href="Shep/Session.html#upload_media-instance_method" title="Shep::Session#upload_media (method)">#upload_media</a></span>
|
362
|
+
<small>Shep::Session</small>
|
363
|
+
</div>
|
364
|
+
</li>
|
365
|
+
|
366
|
+
|
367
|
+
<li class="odd ">
|
368
|
+
<div class="item">
|
369
|
+
<span class='object_link'><a href="Shep/Session.html#verify_credentials-instance_method" title="Shep::Session#verify_credentials (method)">#verify_credentials</a></span>
|
370
|
+
<small>Shep::Session</small>
|
371
|
+
</div>
|
372
|
+
</li>
|
373
|
+
|
374
|
+
|
375
|
+
<li class="even ">
|
376
|
+
<div class="item">
|
377
|
+
<span class='object_link'><a href="Shep/Entity.html#with-class_method" title="Shep::Entity.with (method)">with</a></span>
|
378
|
+
<small>Shep::Entity</small>
|
379
|
+
</div>
|
380
|
+
</li>
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
</ul>
|
385
|
+
</div>
|
386
|
+
</body>
|
387
|
+
</html>
|
@@ -0,0 +1,110 @@
|
|
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
|
+
Top Level Namespace
|
8
|
+
|
9
|
+
— 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 = "";
|
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</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Top Level Namespace</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>Top Level Namespace
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<h2>Defined Under Namespace</h2>
|
82
|
+
<p class="children">
|
83
|
+
|
84
|
+
|
85
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Shep.html" title="Shep (module)">Shep</a></span>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
</p>
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<div id="footer">
|
103
|
+
Generated on Sun Jun 4 13:40:29 2023 by
|
104
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
105
|
+
0.9.34 (ruby-3.1.0).
|
106
|
+
</div>
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</body>
|
110
|
+
</html>
|
@@ -0,0 +1,164 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Definitions of all of the Mastodon entities
|
4
|
+
#
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
module Shep
|
9
|
+
using Assert
|
10
|
+
|
11
|
+
# @see https://docs.joinmastodon.org/entities/CustomEmoji/
|
12
|
+
class Entity::CustomEmoji < Entity
|
13
|
+
fields(
|
14
|
+
:shortcode, %i{show},
|
15
|
+
:url, URIBox,
|
16
|
+
:static_url, URIBox,
|
17
|
+
:visible_in_picker, BoolBox,
|
18
|
+
:category, %i{show}
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
# @see https://docs.joinmastodon.org/entities/Account/
|
23
|
+
class Entity::Account < Entity
|
24
|
+
fields(
|
25
|
+
:id, %i{show},
|
26
|
+
:username, %i{show},
|
27
|
+
:acct,
|
28
|
+
:display_name, %i{show},
|
29
|
+
:locked, BoolBox,
|
30
|
+
:bot, BoolBox,
|
31
|
+
:created_at, TimeBox,
|
32
|
+
:followers_count, NumBox,
|
33
|
+
:following_count, NumBox,
|
34
|
+
:statuses_count, NumBox,
|
35
|
+
:note,
|
36
|
+
:url, URIBox,
|
37
|
+
:avatar, URIBox,
|
38
|
+
:avatar_static, URIBox,
|
39
|
+
:header, URIBox,
|
40
|
+
:header_static, URIBox
|
41
|
+
)
|
42
|
+
end
|
43
|
+
|
44
|
+
# @see https://docs.joinmastodon.org/entities/Account/
|
45
|
+
class Entity::MediaAttachment < Entity
|
46
|
+
fields(
|
47
|
+
:id, %i{show},
|
48
|
+
:type, %i{show},
|
49
|
+
:url, URIBox,
|
50
|
+
:preview_uri, URIBox,
|
51
|
+
:remote_url, URIBox,
|
52
|
+
# :meta,
|
53
|
+
:description, %i{show},
|
54
|
+
:blurhash,
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
# @see https://docs.joinmastodon.org/entities/Status/#Mention
|
59
|
+
class Entity::Status_Mention < Entity
|
60
|
+
fields(
|
61
|
+
:id, %i{show},
|
62
|
+
:username, %i{show},
|
63
|
+
:url, URIBox,
|
64
|
+
:acct,
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
# @see https://docs.joinmastodon.org/entities/Status/#Tag
|
69
|
+
class Entity::Status_Tag < Entity
|
70
|
+
fields(
|
71
|
+
:name, %i{show},
|
72
|
+
:url, URIBox,
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
# The specification describes this as a Hash object with arbitrary
|
77
|
+
# fields. `Shep` doesn't really support that (yet) so we only give
|
78
|
+
# you the expected fields.
|
79
|
+
#
|
80
|
+
# @see https://docs.joinmastodon.org/entities/Status/#application
|
81
|
+
class Entity::Status_Application < Entity
|
82
|
+
fields(
|
83
|
+
:name, %i{show},
|
84
|
+
:website, URIBox,
|
85
|
+
)
|
86
|
+
end
|
87
|
+
|
88
|
+
# @see https://docs.joinmastodon.org/entities/Status/
|
89
|
+
class Entity::Status < Entity
|
90
|
+
fields(
|
91
|
+
:id, %i{show},
|
92
|
+
:uri, URIBox,
|
93
|
+
:created_at, TimeBox,
|
94
|
+
:account, Entity::Account,
|
95
|
+
:content, %i{show},
|
96
|
+
:visibility,
|
97
|
+
:sensitive, BoolBox,
|
98
|
+
:spoiler_text,
|
99
|
+
|
100
|
+
:media_attachments, [Entity::MediaAttachment],
|
101
|
+
|
102
|
+
:applications, Entity::Status_Application,
|
103
|
+
|
104
|
+
:mentions, [Entity::Status_Mention],
|
105
|
+
:tags, [Entity::Status_Tag],
|
106
|
+
|
107
|
+
:emojis, [Entity::CustomEmoji],
|
108
|
+
|
109
|
+
:reblogs_count, NumBox,
|
110
|
+
:favourites_count, NumBox,
|
111
|
+
:replies_count, NumBox,
|
112
|
+
|
113
|
+
:url, URIBox,
|
114
|
+
|
115
|
+
:in_reply_to_id,
|
116
|
+
:in_reply_to_account_id,
|
117
|
+
|
118
|
+
:reblog, Entity::Status,
|
119
|
+
|
120
|
+
:language,
|
121
|
+
:text,
|
122
|
+
|
123
|
+
:edited_at, TimeBox,
|
124
|
+
|
125
|
+
# Optional; nil unless the client is authorized
|
126
|
+
:favourited, BoolBox,
|
127
|
+
:reblogged, BoolBox,
|
128
|
+
:muted, BoolBox,
|
129
|
+
:bookmarked, BoolBox,
|
130
|
+
:pinned, BoolBox,
|
131
|
+
|
132
|
+
#:filtered
|
133
|
+
)
|
134
|
+
end
|
135
|
+
|
136
|
+
# @see https://docs.joinmastodon.org/entities/Context/
|
137
|
+
class Entity::Context < Entity
|
138
|
+
fields(
|
139
|
+
:ancestors, [Entity::Status],
|
140
|
+
:descendants, [Entity::Status]
|
141
|
+
)
|
142
|
+
end
|
143
|
+
|
144
|
+
# @see https://docs.joinmastodon.org/entities/StatusSource/
|
145
|
+
class Entity::StatusSource < Entity
|
146
|
+
fields(
|
147
|
+
:id, %i{show},
|
148
|
+
:text,
|
149
|
+
:spoiler_text
|
150
|
+
)
|
151
|
+
end
|
152
|
+
|
153
|
+
# @see https://docs.joinmastodon.org/entities/Notification/
|
154
|
+
class Entity::Notification < Entity
|
155
|
+
fields(
|
156
|
+
:id, %i{show},
|
157
|
+
:type, %i{show},
|
158
|
+
:created_at, TimeBox,
|
159
|
+
:account, %i{show}, Entity::Account,
|
160
|
+
:status, Entity::Status,
|
161
|
+
#:report
|
162
|
+
)
|
163
|
+
end
|
164
|
+
end
|