ayadn 0.6.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.travis.yml +17 -0
- data/Gemfile +14 -0
- data/Guardfile +26 -0
- data/LICENSE.txt +22 -0
- data/MANUAL.md +946 -0
- data/README.md +26 -411
- data/Rakefile +6 -0
- data/ayadn.gemspec +39 -0
- data/bin/ayadn +3 -3
- data/lib/ayadn.rb +12 -25
- data/lib/ayadn/action.rb +1121 -0
- data/lib/ayadn/alias.rb +106 -0
- data/lib/ayadn/api.rb +312 -301
- data/lib/ayadn/app.rb +429 -365
- data/lib/ayadn/authorize.rb +127 -28
- data/lib/ayadn/blacklist.rb +116 -0
- data/lib/ayadn/cnx.rb +105 -0
- data/lib/ayadn/databases.rb +110 -0
- data/lib/ayadn/descriptions.rb +1043 -0
- data/lib/ayadn/endpoints.rb +220 -153
- data/lib/ayadn/errors.rb +37 -0
- data/lib/ayadn/extend.rb +4 -10
- data/lib/ayadn/fileops.rb +48 -0
- data/lib/ayadn/logs.rb +32 -0
- data/lib/ayadn/pinboard.rb +46 -35
- data/lib/ayadn/post.rb +229 -212
- data/lib/ayadn/scroll.rb +251 -0
- data/lib/ayadn/set.rb +377 -0
- data/lib/ayadn/settings.rb +195 -0
- data/lib/ayadn/status.rb +226 -165
- data/lib/ayadn/switch.rb +72 -0
- data/lib/ayadn/version.rb +4 -0
- data/lib/ayadn/view.rb +506 -269
- data/lib/ayadn/workers.rb +362 -0
- data/spec/helpers.rb +19 -0
- data/spec/mock/@ericd.json +160 -0
- data/spec/mock/@m.json +45 -0
- data/spec/mock/checkins.json +1856 -0
- data/spec/mock/fwr_@ayadn.json +1077 -0
- data/spec/mock/posted.json +1 -0
- data/spec/mock/stream.json +1 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/unit/api_spec.rb +61 -0
- data/spec/unit/databases_spec.rb +5 -0
- data/spec/unit/descriptions_spec.rb +9 -0
- data/spec/unit/endpoints_spec.rb +35 -0
- data/spec/unit/post_spec.rb +136 -0
- data/spec/unit/status_spec.rb +9 -0
- data/spec/unit/view_spec.rb +119 -0
- data/spec/unit/workers_spec.rb +147 -0
- metadata +216 -40
- data/CHANGELOG.md +0 -250
- data/CONTRIBUTORS.md +0 -5
- data/LICENSE.md +0 -14
- data/lib/ayadn/adn_files.rb +0 -84
- data/lib/ayadn/client-http.rb +0 -226
- data/lib/ayadn/colors.rb +0 -62
- data/lib/ayadn/config.yml +0 -35
- data/lib/ayadn/debug.rb +0 -36
- data/lib/ayadn/files.rb +0 -184
- data/lib/ayadn/get-api.rb +0 -43
- data/lib/ayadn/help.rb +0 -152
- data/lib/ayadn/list.rb +0 -89
- data/lib/ayadn/main.rb +0 -542
- data/lib/ayadn/requires.rb +0 -12
- data/lib/ayadn/skip.rb +0 -27
- data/lib/ayadn/tools.rb +0 -208
- data/lib/ayadn/user-stream.rb +0 -91
- data/lib/ayadn/view-channels.rb +0 -120
- data/lib/ayadn/view-interactions.rb +0 -57
- data/lib/ayadn/view-object.rb +0 -195
- data/lib/experiments.rb +0 -109
@@ -0,0 +1,1043 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Ayadn
|
3
|
+
class Descriptions
|
4
|
+
def self.options_new
|
5
|
+
"Retrieve only new posts since your last visit"
|
6
|
+
end
|
7
|
+
def self.options_count
|
8
|
+
"Specify the number of posts to retrieve"
|
9
|
+
end
|
10
|
+
def self.options_index
|
11
|
+
"Use an ordered index instead of the posts ids"
|
12
|
+
end
|
13
|
+
def self.options_raw
|
14
|
+
"Outputs the App.net raw JSON response"
|
15
|
+
end
|
16
|
+
def self.unified
|
17
|
+
<<-USAGE
|
18
|
+
Show your App.net timeline, aka the Unified Stream.
|
19
|
+
|
20
|
+
Basic usage:
|
21
|
+
|
22
|
+
ayadn timeline
|
23
|
+
|
24
|
+
ayadn -tl
|
25
|
+
|
26
|
+
Retrieves only 5 posts:
|
27
|
+
|
28
|
+
ayadn -tl -c5
|
29
|
+
|
30
|
+
Shows index instead of post numbers:
|
31
|
+
|
32
|
+
ayadn -tl -i
|
33
|
+
|
34
|
+
Shows index and retrieves 30 posts:
|
35
|
+
|
36
|
+
ayadn -tl -i -c30
|
37
|
+
|
38
|
+
Scroll the stream:
|
39
|
+
|
40
|
+
ayadn -tl -s
|
41
|
+
|
42
|
+
Show only new posts:
|
43
|
+
|
44
|
+
ayadn -tl -n
|
45
|
+
\n\n
|
46
|
+
USAGE
|
47
|
+
end
|
48
|
+
def self.checkins
|
49
|
+
<<-USAGE
|
50
|
+
Show the Checkins Stream.
|
51
|
+
|
52
|
+
Basic usage:
|
53
|
+
|
54
|
+
ayadn checkins
|
55
|
+
|
56
|
+
ayadn -ck
|
57
|
+
|
58
|
+
Retrieves only 5 posts:
|
59
|
+
|
60
|
+
ayadn -ck -c5
|
61
|
+
|
62
|
+
Shows index instead of post numbers:
|
63
|
+
|
64
|
+
ayadn -ck -i
|
65
|
+
|
66
|
+
Shows index and retrieves 30 posts:
|
67
|
+
|
68
|
+
ayadn -ck -i -c30
|
69
|
+
|
70
|
+
Scroll the stream:
|
71
|
+
|
72
|
+
ayadn -ck -s
|
73
|
+
|
74
|
+
Show only new posts:
|
75
|
+
|
76
|
+
ayadn -ck -n
|
77
|
+
\n\n
|
78
|
+
USAGE
|
79
|
+
end
|
80
|
+
def self.global
|
81
|
+
<<-USAGE
|
82
|
+
Show the Global Stream.
|
83
|
+
|
84
|
+
Basic usage:
|
85
|
+
|
86
|
+
ayadn global
|
87
|
+
|
88
|
+
ayadn -gl
|
89
|
+
|
90
|
+
Retrieves only 5 posts:
|
91
|
+
|
92
|
+
ayadn -gl -c5
|
93
|
+
|
94
|
+
Shows index instead of post numbers:
|
95
|
+
|
96
|
+
ayadn -gl -i
|
97
|
+
|
98
|
+
Shows index and retrieves 30 posts:
|
99
|
+
|
100
|
+
ayadn -gl -i -c30
|
101
|
+
|
102
|
+
Scroll the stream:
|
103
|
+
|
104
|
+
ayadn -gl -s
|
105
|
+
|
106
|
+
Show only new posts:
|
107
|
+
|
108
|
+
ayadn -gl -n
|
109
|
+
\n\n
|
110
|
+
USAGE
|
111
|
+
end
|
112
|
+
def self.trending
|
113
|
+
<<-USAGE
|
114
|
+
Show the Trending Stream.
|
115
|
+
|
116
|
+
Basic usage:
|
117
|
+
|
118
|
+
ayadn trending
|
119
|
+
|
120
|
+
ayadn -tr
|
121
|
+
|
122
|
+
Retrieves only 5 posts:
|
123
|
+
|
124
|
+
ayadn -tr -c5
|
125
|
+
|
126
|
+
Shows index instead of post numbers:
|
127
|
+
|
128
|
+
ayadn -tr -i
|
129
|
+
|
130
|
+
Shows index and retrieves 30 posts:
|
131
|
+
|
132
|
+
ayadn -tr -i -c30
|
133
|
+
|
134
|
+
Scroll the stream:
|
135
|
+
|
136
|
+
ayadn -tr -s
|
137
|
+
|
138
|
+
Show only new posts:
|
139
|
+
|
140
|
+
ayadn -tr -n
|
141
|
+
\n\n
|
142
|
+
USAGE
|
143
|
+
end
|
144
|
+
def self.photos
|
145
|
+
<<-USAGE
|
146
|
+
Show the Photos Stream.
|
147
|
+
|
148
|
+
Basic usage:
|
149
|
+
|
150
|
+
ayadn photos
|
151
|
+
|
152
|
+
ayadn -ph
|
153
|
+
|
154
|
+
Retrieves only 5 posts:
|
155
|
+
|
156
|
+
ayadn -ph -c5
|
157
|
+
|
158
|
+
Shows index instead of post numbers:
|
159
|
+
|
160
|
+
ayadn -ph -i
|
161
|
+
|
162
|
+
Shows index and retrieves 30 posts:
|
163
|
+
|
164
|
+
ayadn -ph -i -c30
|
165
|
+
|
166
|
+
Scroll the stream:
|
167
|
+
|
168
|
+
ayadn -ph -s
|
169
|
+
|
170
|
+
Show only new posts:
|
171
|
+
|
172
|
+
ayadn -ph -n
|
173
|
+
\n\n
|
174
|
+
USAGE
|
175
|
+
end
|
176
|
+
def self.conversations
|
177
|
+
<<-USAGE
|
178
|
+
Show the Conversations Stream.
|
179
|
+
|
180
|
+
Basic usage:
|
181
|
+
|
182
|
+
ayadn conversations
|
183
|
+
|
184
|
+
ayadn -cq
|
185
|
+
|
186
|
+
Retrieves only 5 posts:
|
187
|
+
|
188
|
+
ayadn -cq -c5
|
189
|
+
|
190
|
+
Shows index instead of post numbers:
|
191
|
+
|
192
|
+
ayadn -cq -i
|
193
|
+
|
194
|
+
Shows index and retrieves 30 posts:
|
195
|
+
|
196
|
+
ayadn -cq -i -c30
|
197
|
+
|
198
|
+
Scroll the stream:
|
199
|
+
|
200
|
+
ayadn -cq -s
|
201
|
+
|
202
|
+
Show only new posts:
|
203
|
+
|
204
|
+
ayadn -cq -n
|
205
|
+
\n\n
|
206
|
+
USAGE
|
207
|
+
end
|
208
|
+
def self.mentions
|
209
|
+
<<-USAGE
|
210
|
+
Show posts containing a mention of @username.
|
211
|
+
|
212
|
+
Basic usage:
|
213
|
+
|
214
|
+
ayadn mentions @ericd
|
215
|
+
|
216
|
+
ayadn -m @ericd
|
217
|
+
|
218
|
+
Retrieves only 5 posts:
|
219
|
+
|
220
|
+
ayadn -m -c5 @ericd
|
221
|
+
|
222
|
+
Shows index instead of post numbers:
|
223
|
+
|
224
|
+
ayadn -m -i @ericd
|
225
|
+
|
226
|
+
Shows index and retrieves 30 posts:
|
227
|
+
|
228
|
+
ayadn -m -i -c30 @ericd
|
229
|
+
|
230
|
+
Scroll mentions:
|
231
|
+
|
232
|
+
ayadn -m -s @ericd
|
233
|
+
\n\n
|
234
|
+
USAGE
|
235
|
+
end
|
236
|
+
def self.posts
|
237
|
+
<<-USAGE
|
238
|
+
Show @username's posts.
|
239
|
+
|
240
|
+
Basic usage:
|
241
|
+
|
242
|
+
ayadn userposts @ericd
|
243
|
+
|
244
|
+
ayadn -up @ericd
|
245
|
+
|
246
|
+
Retrieves only 5 posts:
|
247
|
+
|
248
|
+
ayadn -up -c5 @ericd
|
249
|
+
|
250
|
+
Shows index instead of post numbers:
|
251
|
+
|
252
|
+
ayadn -up -i @ericd
|
253
|
+
|
254
|
+
Shows index and retrieves 30 posts:
|
255
|
+
|
256
|
+
ayadn -up -i -c30 @ericd
|
257
|
+
|
258
|
+
Scroll posts:
|
259
|
+
|
260
|
+
ayadn -up -s @ericd
|
261
|
+
\n\n
|
262
|
+
USAGE
|
263
|
+
end
|
264
|
+
def self.whatstarred
|
265
|
+
<<-USAGE
|
266
|
+
Show posts starred by @username.
|
267
|
+
|
268
|
+
Basic usage:
|
269
|
+
|
270
|
+
ayadn whatstarred @ericd
|
271
|
+
|
272
|
+
ayadn -was @ericd
|
273
|
+
|
274
|
+
Retrieves only 5 posts:
|
275
|
+
|
276
|
+
ayadn -was -c5 @ericd
|
277
|
+
|
278
|
+
Shows index instead of post numbers:
|
279
|
+
|
280
|
+
ayadn -was -i @ericd
|
281
|
+
|
282
|
+
Shows index and retrieves 30 posts:
|
283
|
+
|
284
|
+
ayadn -was -i -c30 @ericd
|
285
|
+
\n\n
|
286
|
+
USAGE
|
287
|
+
end
|
288
|
+
def self.interactions
|
289
|
+
<<-USAGE
|
290
|
+
Show your recent ADN interactions.
|
291
|
+
|
292
|
+
Usage:
|
293
|
+
|
294
|
+
ayadn interactions
|
295
|
+
|
296
|
+
ayadn -int
|
297
|
+
\n\n
|
298
|
+
USAGE
|
299
|
+
end
|
300
|
+
def self.whoreposted
|
301
|
+
<<-USAGE
|
302
|
+
List users who reposted post n°POST.
|
303
|
+
|
304
|
+
Usage:
|
305
|
+
|
306
|
+
ayadn whoreposted 22790201
|
307
|
+
|
308
|
+
ayadn -wor 22790201
|
309
|
+
\n\n
|
310
|
+
USAGE
|
311
|
+
end
|
312
|
+
def self.whostarred
|
313
|
+
<<-USAGE
|
314
|
+
List users who starred post n°POST.
|
315
|
+
|
316
|
+
Usage:
|
317
|
+
|
318
|
+
ayadn whostarred 22790201
|
319
|
+
|
320
|
+
ayadn -wos 22790201
|
321
|
+
\n\n
|
322
|
+
USAGE
|
323
|
+
end
|
324
|
+
def self.convo
|
325
|
+
<<-USAGE
|
326
|
+
Show the conversation thread around post n°POST.
|
327
|
+
|
328
|
+
Usage:
|
329
|
+
|
330
|
+
ayadn convo 23362788
|
331
|
+
|
332
|
+
ayadn -co 23362788
|
333
|
+
|
334
|
+
Show index instead of post numbers:
|
335
|
+
|
336
|
+
ayadn -co -i 23362788
|
337
|
+
|
338
|
+
Scroll the conversation:
|
339
|
+
|
340
|
+
ayadn -co -s 23362788
|
341
|
+
\n\n
|
342
|
+
USAGE
|
343
|
+
end
|
344
|
+
def self.followings
|
345
|
+
<<-USAGE
|
346
|
+
List users @username is following.
|
347
|
+
|
348
|
+
Usage:
|
349
|
+
|
350
|
+
ayadn followings @ericd
|
351
|
+
|
352
|
+
ayadn -fwg @ericd
|
353
|
+
\n\n
|
354
|
+
USAGE
|
355
|
+
end
|
356
|
+
def self.followers
|
357
|
+
<<-USAGE
|
358
|
+
List users following @username.
|
359
|
+
|
360
|
+
Usage:
|
361
|
+
|
362
|
+
ayadn followers @ericd
|
363
|
+
|
364
|
+
ayadn -fwr @ericd
|
365
|
+
\n\n
|
366
|
+
USAGE
|
367
|
+
end
|
368
|
+
def self.muted
|
369
|
+
<<-USAGE
|
370
|
+
List the users you muted.
|
371
|
+
|
372
|
+
Usage:
|
373
|
+
|
374
|
+
ayadn muted
|
375
|
+
|
376
|
+
ayadn -mtd
|
377
|
+
\n\n
|
378
|
+
USAGE
|
379
|
+
end
|
380
|
+
def self.blocked
|
381
|
+
<<-USAGE
|
382
|
+
List the users you blocked.
|
383
|
+
|
384
|
+
Usage:
|
385
|
+
|
386
|
+
ayadn blocked
|
387
|
+
|
388
|
+
ayadn -bkd
|
389
|
+
\n\n
|
390
|
+
USAGE
|
391
|
+
end
|
392
|
+
def self.hashtag
|
393
|
+
<<-USAGE
|
394
|
+
Show recent posts containing HASHTAG.
|
395
|
+
|
396
|
+
Usage:
|
397
|
+
|
398
|
+
ayadn hashtag thememonday
|
399
|
+
|
400
|
+
ayadn -t thememonday
|
401
|
+
\n\n
|
402
|
+
USAGE
|
403
|
+
end
|
404
|
+
def self.search
|
405
|
+
<<-USAGE
|
406
|
+
Show recents posts containing WORD(S).
|
407
|
+
|
408
|
+
Basic usage:
|
409
|
+
|
410
|
+
ayadn search screenshot iterm
|
411
|
+
|
412
|
+
ayadn -s screenshot iterm
|
413
|
+
|
414
|
+
Retrieves only 5 posts:
|
415
|
+
|
416
|
+
ayadn -s -c5 screenshot iterm
|
417
|
+
|
418
|
+
Shows index instead of post numbers:
|
419
|
+
|
420
|
+
ayadn -s -i screenshot iterm
|
421
|
+
|
422
|
+
Shows index and retrieves 30 posts:
|
423
|
+
|
424
|
+
ayadn -s -i -c30 screenshot iterm
|
425
|
+
\n\n
|
426
|
+
USAGE
|
427
|
+
end
|
428
|
+
def self.settings
|
429
|
+
<<-USAGE
|
430
|
+
List current Ayadn settings.
|
431
|
+
|
432
|
+
Usage:
|
433
|
+
|
434
|
+
ayadn settings
|
435
|
+
|
436
|
+
ayadn -sg
|
437
|
+
\n\n
|
438
|
+
USAGE
|
439
|
+
end
|
440
|
+
def self.userinfo
|
441
|
+
<<-USAGE
|
442
|
+
Show detailed informations about @username.
|
443
|
+
|
444
|
+
Usage:
|
445
|
+
|
446
|
+
ayadn userinfo @ericd
|
447
|
+
|
448
|
+
ayadn -ui @ericd
|
449
|
+
\n\n
|
450
|
+
USAGE
|
451
|
+
end
|
452
|
+
def self.postinfo
|
453
|
+
<<-USAGE
|
454
|
+
Show detailed informations about post n°POST.
|
455
|
+
|
456
|
+
Usage:
|
457
|
+
|
458
|
+
ayadn postinfo 23365251
|
459
|
+
|
460
|
+
ayadn -pi 23365251
|
461
|
+
\n\n
|
462
|
+
USAGE
|
463
|
+
end
|
464
|
+
def self.files
|
465
|
+
<<-USAGE
|
466
|
+
List the files in your ADN storage.
|
467
|
+
|
468
|
+
Basic usage:
|
469
|
+
|
470
|
+
ayadn files
|
471
|
+
|
472
|
+
ayadn -fl
|
473
|
+
|
474
|
+
Retrieves only 5 files:
|
475
|
+
|
476
|
+
ayadn -fl -c5
|
477
|
+
|
478
|
+
Retrieves all files:
|
479
|
+
|
480
|
+
ayadn -fl -a
|
481
|
+
|
482
|
+
You can then download a file with its id: 'ayadn -df 23344556'
|
483
|
+
\n\n
|
484
|
+
USAGE
|
485
|
+
end
|
486
|
+
def self.delete
|
487
|
+
<<-USAGE
|
488
|
+
Delete a post.
|
489
|
+
|
490
|
+
Usage:
|
491
|
+
|
492
|
+
ayadn delete 23365251
|
493
|
+
|
494
|
+
ayadn -D 23365251
|
495
|
+
\n\n
|
496
|
+
USAGE
|
497
|
+
end
|
498
|
+
def self.unfollow
|
499
|
+
<<-USAGE
|
500
|
+
Unfollow a user.
|
501
|
+
|
502
|
+
Usage:
|
503
|
+
|
504
|
+
ayadn unfollow @spammer
|
505
|
+
|
506
|
+
ayadn -UF @spammer
|
507
|
+
\n\n
|
508
|
+
USAGE
|
509
|
+
end
|
510
|
+
def self.unmute
|
511
|
+
<<-USAGE
|
512
|
+
Unmute a user.
|
513
|
+
|
514
|
+
Usage:
|
515
|
+
|
516
|
+
ayadn unmute @ericd
|
517
|
+
|
518
|
+
ayadn -UM @ericd
|
519
|
+
\n\n
|
520
|
+
USAGE
|
521
|
+
end
|
522
|
+
def self.unblock
|
523
|
+
<<-USAGE
|
524
|
+
Unblock a user.
|
525
|
+
|
526
|
+
Usage:
|
527
|
+
|
528
|
+
ayadn unblock @notspammeractually
|
529
|
+
|
530
|
+
ayadn -UB @notspammeractually
|
531
|
+
\n\n
|
532
|
+
USAGE
|
533
|
+
end
|
534
|
+
def self.unrepost
|
535
|
+
<<-USAGE
|
536
|
+
Unrepost a post.
|
537
|
+
|
538
|
+
Usage:
|
539
|
+
|
540
|
+
ayadn unrepost 23365251
|
541
|
+
|
542
|
+
ayadn -UR 23365251
|
543
|
+
\n\n
|
544
|
+
USAGE
|
545
|
+
end
|
546
|
+
def self.unstar
|
547
|
+
<<-USAGE
|
548
|
+
Unstar a post.
|
549
|
+
|
550
|
+
Usage:
|
551
|
+
|
552
|
+
ayadn unstar 23365251
|
553
|
+
|
554
|
+
ayadn -US 23365251
|
555
|
+
\n\n
|
556
|
+
USAGE
|
557
|
+
end
|
558
|
+
def self.star
|
559
|
+
<<-USAGE
|
560
|
+
Star a post.
|
561
|
+
|
562
|
+
Usage:
|
563
|
+
|
564
|
+
ayadn star 23365251
|
565
|
+
|
566
|
+
ayadn -ST 23365251
|
567
|
+
\n\n
|
568
|
+
USAGE
|
569
|
+
end
|
570
|
+
def self.repost
|
571
|
+
<<-USAGE
|
572
|
+
Repost a post.
|
573
|
+
|
574
|
+
Usage:
|
575
|
+
|
576
|
+
ayadn repost 23365251
|
577
|
+
|
578
|
+
ayadn -O 23365251
|
579
|
+
\n\n
|
580
|
+
USAGE
|
581
|
+
end
|
582
|
+
def self.follow
|
583
|
+
<<-USAGE
|
584
|
+
Follow a user.
|
585
|
+
|
586
|
+
Usage:
|
587
|
+
|
588
|
+
ayadn follow @ericd
|
589
|
+
|
590
|
+
ayadn -FO @ericd
|
591
|
+
\n\n
|
592
|
+
USAGE
|
593
|
+
end
|
594
|
+
def self.mute
|
595
|
+
<<-USAGE
|
596
|
+
Mute a user.
|
597
|
+
|
598
|
+
Usage:
|
599
|
+
|
600
|
+
ayadn mute @spammer
|
601
|
+
|
602
|
+
ayadn -MU @spammer
|
603
|
+
\n\n
|
604
|
+
USAGE
|
605
|
+
end
|
606
|
+
def self.block
|
607
|
+
<<-USAGE
|
608
|
+
Block a user.
|
609
|
+
|
610
|
+
Usage:
|
611
|
+
|
612
|
+
ayadn block @spammer
|
613
|
+
|
614
|
+
ayadn -BL @spammer
|
615
|
+
\n\n
|
616
|
+
USAGE
|
617
|
+
end
|
618
|
+
def self.channels
|
619
|
+
<<-USAGE
|
620
|
+
List your active channels.
|
621
|
+
|
622
|
+
Usage:
|
623
|
+
|
624
|
+
ayadn channels
|
625
|
+
|
626
|
+
ayadn -ch
|
627
|
+
\n\n
|
628
|
+
USAGE
|
629
|
+
end
|
630
|
+
def self.messages
|
631
|
+
<<-USAGE
|
632
|
+
Show recent messages in a channel.
|
633
|
+
|
634
|
+
Basic usage:
|
635
|
+
|
636
|
+
ayadn messages 46217
|
637
|
+
|
638
|
+
ayadn -ms 46217
|
639
|
+
|
640
|
+
Retrieves only 5 messages:
|
641
|
+
|
642
|
+
ayadn -ms -c5 46217
|
643
|
+
|
644
|
+
Retrieves only new messages:
|
645
|
+
|
646
|
+
ayadn -ms -n 46217
|
647
|
+
|
648
|
+
Scroll messages:
|
649
|
+
|
650
|
+
ayadn -ms -s 46217
|
651
|
+
|
652
|
+
If you've set an alias for the channel, you can display its messages with 'ayadn -ms my_alias'
|
653
|
+
\n\n
|
654
|
+
USAGE
|
655
|
+
end
|
656
|
+
def self.pin
|
657
|
+
<<-USAGE
|
658
|
+
Export a POST's link and text with tags to Pinboard.
|
659
|
+
|
660
|
+
Usage:
|
661
|
+
|
662
|
+
ayadn pin 23365251 screenshot iterm
|
663
|
+
\n\n
|
664
|
+
USAGE
|
665
|
+
end
|
666
|
+
def self.post
|
667
|
+
<<-USAGE
|
668
|
+
Simple post to App.net.
|
669
|
+
|
670
|
+
Usage:
|
671
|
+
|
672
|
+
ayadn post 'Hello from Ayadn!'
|
673
|
+
|
674
|
+
ayadn -P 'Hello from Ayadn!'
|
675
|
+
|
676
|
+
ayadn -P Watching a movie with friends
|
677
|
+
|
678
|
+
You don't have to put quotes around your text, but it's better to do it.
|
679
|
+
|
680
|
+
The 'write' method is recommended over this one: it's more secure and offers multi-line support.
|
681
|
+
\n\n
|
682
|
+
USAGE
|
683
|
+
end
|
684
|
+
def self.write
|
685
|
+
<<-USAGE
|
686
|
+
Multi-line post to App.net.
|
687
|
+
|
688
|
+
Usage:
|
689
|
+
|
690
|
+
ayadn write
|
691
|
+
|
692
|
+
ayadn -W
|
693
|
+
|
694
|
+
It enters the writing mode where you will type your post.
|
695
|
+
\n\n
|
696
|
+
USAGE
|
697
|
+
end
|
698
|
+
def self.pmess
|
699
|
+
<<-USAGE
|
700
|
+
Send a private message to @username.
|
701
|
+
|
702
|
+
Usage:
|
703
|
+
|
704
|
+
ayadn pm @ericd
|
705
|
+
|
706
|
+
It enters the writing mode where you will type your message.
|
707
|
+
\n\n
|
708
|
+
USAGE
|
709
|
+
end
|
710
|
+
def self.send_to_channel
|
711
|
+
<<-USAGE
|
712
|
+
Send a message to a channel.
|
713
|
+
|
714
|
+
Usage:
|
715
|
+
|
716
|
+
ayadn send 46217
|
717
|
+
|
718
|
+
ayadn -C 46217
|
719
|
+
|
720
|
+
It enters the writing mode where you will type your message.
|
721
|
+
|
722
|
+
If you've set an alias for the channel, you can post to it with 'ayadn -C my_alias'
|
723
|
+
\n\n
|
724
|
+
USAGE
|
725
|
+
end
|
726
|
+
def self.reply
|
727
|
+
<<-USAGE
|
728
|
+
Reply to post n°POST.
|
729
|
+
|
730
|
+
Usage:
|
731
|
+
|
732
|
+
ayadn reply 23365251
|
733
|
+
|
734
|
+
ayadn -R 23365251
|
735
|
+
|
736
|
+
It enters the writing mode where you will type your reply.
|
737
|
+
|
738
|
+
Mentions and/or username will be detected and your text will be inserted appropriately.
|
739
|
+
|
740
|
+
If you reply to a repost, Ayadn will automatically replace it by the original post.
|
741
|
+
|
742
|
+
If you just viewed a stream with the -i (--index) option, you can also reply to a post by its index.
|
743
|
+
|
744
|
+
Example: ayadn -R 3
|
745
|
+
\n\n
|
746
|
+
USAGE
|
747
|
+
end
|
748
|
+
def self.set
|
749
|
+
<<-USAGE
|
750
|
+
Set (configure) a parameter and save it.
|
751
|
+
|
752
|
+
Example: ayadn set color mentions blue
|
753
|
+
|
754
|
+
See the list of configurable parameters with: ayadn -sg
|
755
|
+
\n\n
|
756
|
+
USAGE
|
757
|
+
end
|
758
|
+
def self.set_color
|
759
|
+
<<-USAGE
|
760
|
+
Set ITEM to color COLOR.
|
761
|
+
|
762
|
+
Example: ayadn set color mentions blue
|
763
|
+
\n\n
|
764
|
+
USAGE
|
765
|
+
end
|
766
|
+
def self.set_timeline
|
767
|
+
<<-USAGE
|
768
|
+
Set ITEM to true or false.
|
769
|
+
|
770
|
+
Example: ayadn set directed true
|
771
|
+
\n\n
|
772
|
+
USAGE
|
773
|
+
end
|
774
|
+
def self.set_backup
|
775
|
+
<<-USAGE
|
776
|
+
Set ITEM to be activated or not.
|
777
|
+
|
778
|
+
Example: ayadn set auto_save_lists true
|
779
|
+
\n\n
|
780
|
+
USAGE
|
781
|
+
end
|
782
|
+
def self.set_counts
|
783
|
+
<<-USAGE
|
784
|
+
Set ITEM to retrieve NUMBER of elements by default.
|
785
|
+
|
786
|
+
Example: ayadn set count unified 100
|
787
|
+
\n\n
|
788
|
+
USAGE
|
789
|
+
end
|
790
|
+
def self.set_defaults
|
791
|
+
<<-USAGE
|
792
|
+
Sets back the configuration to default values.
|
793
|
+
|
794
|
+
ayadn set defaults
|
795
|
+
\n\n
|
796
|
+
USAGE
|
797
|
+
end
|
798
|
+
def self.alias
|
799
|
+
<<-USAGE
|
800
|
+
Manage your channel aliases. Commands: create, delete, list, import.
|
801
|
+
|
802
|
+
Usage:
|
803
|
+
|
804
|
+
ayadn alias list
|
805
|
+
|
806
|
+
ayadn -A list
|
807
|
+
|
808
|
+
ayadn -A create 33666 my_alias
|
809
|
+
|
810
|
+
ayadn -A delete my_alias
|
811
|
+
|
812
|
+
ayadn -A import '/Users/blah/backups/aliases.db'
|
813
|
+
|
814
|
+
(Once an alias is set, you can display the messages in this channel with 'ayadn -ms my_alias', post to it with 'ayadn -C my_alias', etc)
|
815
|
+
\n\n
|
816
|
+
USAGE
|
817
|
+
end
|
818
|
+
def self.alias_create
|
819
|
+
<<-USAGE
|
820
|
+
Creates an alias for a channel.
|
821
|
+
|
822
|
+
Usage:
|
823
|
+
|
824
|
+
ayadn alias create 33666 my_alias
|
825
|
+
|
826
|
+
ayadn -A create 33666 my_alias
|
827
|
+
|
828
|
+
(Once an alias is set, you can display the messages in this channel with 'ayadn -ms my_alias', post to it with 'ayadn -C my_alias', etc)
|
829
|
+
\n\n
|
830
|
+
USAGE
|
831
|
+
end
|
832
|
+
def self.alias_delete
|
833
|
+
<<-USAGE
|
834
|
+
Deletes a previously created alias.
|
835
|
+
|
836
|
+
Usage:
|
837
|
+
|
838
|
+
ayadn alias delete my_alias
|
839
|
+
|
840
|
+
ayadn -A delete my_alias
|
841
|
+
\n\n
|
842
|
+
USAGE
|
843
|
+
end
|
844
|
+
def self.alias_import
|
845
|
+
<<-USAGE
|
846
|
+
Imports an aliases database from a backed up Ayadn account.
|
847
|
+
|
848
|
+
Usage:
|
849
|
+
|
850
|
+
ayadn alias import '/Users/blah/ayadn/blah/db/aliases.db'
|
851
|
+
|
852
|
+
ayadn -A import '/Users/blah/backups/aliases.db'
|
853
|
+
\n\n
|
854
|
+
USAGE
|
855
|
+
end
|
856
|
+
def self.alias_list
|
857
|
+
<<-USAGE
|
858
|
+
Lists previously created aliases.
|
859
|
+
|
860
|
+
Usage:
|
861
|
+
|
862
|
+
ayadn alias list
|
863
|
+
|
864
|
+
ayadn -A list
|
865
|
+
\n\n
|
866
|
+
USAGE
|
867
|
+
end
|
868
|
+
def self.download
|
869
|
+
<<-USAGE
|
870
|
+
Download the file with id FILE.
|
871
|
+
|
872
|
+
Usage:
|
873
|
+
|
874
|
+
ayadn download 23344556
|
875
|
+
|
876
|
+
ayadn -df 23344556
|
877
|
+
|
878
|
+
(you can list your files with 'ayadn -fl')
|
879
|
+
\n\n
|
880
|
+
USAGE
|
881
|
+
end
|
882
|
+
def self.blacklist
|
883
|
+
<<-USAGE
|
884
|
+
Manage your blacklist. Commands: add, remove, list, import.
|
885
|
+
|
886
|
+
Usage:
|
887
|
+
|
888
|
+
ayadn blacklist list
|
889
|
+
|
890
|
+
ayadn -K list
|
891
|
+
|
892
|
+
ayadn -K add mention @shmuck
|
893
|
+
|
894
|
+
ayadn blacklist add hashtag sports
|
895
|
+
|
896
|
+
ayadn -K add client IFTTT
|
897
|
+
|
898
|
+
ayadn -K add client 'Spammy Unknown Client'
|
899
|
+
|
900
|
+
ayadn blacklist remove mention @shmuck
|
901
|
+
|
902
|
+
ayadn -K remove hashtag sports
|
903
|
+
|
904
|
+
ayadn -K remove client IFTTT
|
905
|
+
|
906
|
+
ayadn -K import '/Users/blah/backups/blacklist.db'
|
907
|
+
\n\n
|
908
|
+
USAGE
|
909
|
+
end
|
910
|
+
def self.blacklist_add
|
911
|
+
<<-USAGE
|
912
|
+
Adds a mention, hashtag or client to your blacklist.
|
913
|
+
|
914
|
+
Usage:
|
915
|
+
|
916
|
+
ayadn blacklist add mention @shmuck
|
917
|
+
|
918
|
+
ayadn -K add mention @shmuck
|
919
|
+
|
920
|
+
ayadn -K add hashtag sports
|
921
|
+
|
922
|
+
ayadn -K add client IFTTT
|
923
|
+
|
924
|
+
ayadn -K add client 'Spammy Unknown Client'
|
925
|
+
\n\n
|
926
|
+
USAGE
|
927
|
+
end
|
928
|
+
def self.blacklist_remove
|
929
|
+
<<-USAGE
|
930
|
+
Removes a mention, hashtag or client from your blacklist.
|
931
|
+
|
932
|
+
Usage:
|
933
|
+
|
934
|
+
ayadn blacklist remove mention @shmuck
|
935
|
+
|
936
|
+
ayadn -K remove mention @shmuck
|
937
|
+
|
938
|
+
ayadn -K remove hashtag sports
|
939
|
+
|
940
|
+
ayadn -K remove client IFTTT
|
941
|
+
\n\n
|
942
|
+
USAGE
|
943
|
+
end
|
944
|
+
def self.blacklist_import
|
945
|
+
<<-USAGE
|
946
|
+
Imports a blacklist database from another Ayadn account.
|
947
|
+
|
948
|
+
Usage:
|
949
|
+
|
950
|
+
ayadn blacklist import '/Users/blah/ayadn/blah/db/blacklist.db'
|
951
|
+
|
952
|
+
ayadn -K import '/Users/blah/backups/blacklist.db'
|
953
|
+
\n\n
|
954
|
+
USAGE
|
955
|
+
end
|
956
|
+
def self.blacklist_list
|
957
|
+
<<-USAGE
|
958
|
+
Lists the content of your blacklist.
|
959
|
+
|
960
|
+
Usage:
|
961
|
+
|
962
|
+
ayadn blacklist list
|
963
|
+
|
964
|
+
ayadn -K list
|
965
|
+
\n\n
|
966
|
+
USAGE
|
967
|
+
end
|
968
|
+
def self.nowplaying
|
969
|
+
<<-USAGE
|
970
|
+
Post the track you're listening to.
|
971
|
+
|
972
|
+
Usage:
|
973
|
+
|
974
|
+
ayadn nowplaying
|
975
|
+
|
976
|
+
ayadn -np
|
977
|
+
|
978
|
+
(works only with iTunes and Mac Os X)
|
979
|
+
\n\n
|
980
|
+
USAGE
|
981
|
+
end
|
982
|
+
def self.random_posts
|
983
|
+
<<-USAGE
|
984
|
+
Show random posts from App.net.
|
985
|
+
|
986
|
+
Usage:
|
987
|
+
|
988
|
+
ayadn random
|
989
|
+
|
990
|
+
ayadn -rnd
|
991
|
+
|
992
|
+
With 'wait 2 seconds' option:
|
993
|
+
|
994
|
+
ayadn -rnd -w2
|
995
|
+
\n\n
|
996
|
+
USAGE
|
997
|
+
end
|
998
|
+
def self.authorize
|
999
|
+
<<-USAGE
|
1000
|
+
Authorize Ayadn to access your App.net account.
|
1001
|
+
|
1002
|
+
Usage:
|
1003
|
+
|
1004
|
+
ayadn authorize
|
1005
|
+
|
1006
|
+
ayadn -auth
|
1007
|
+
|
1008
|
+
Ayadn will give you a link to an App.net login page.
|
1009
|
+
|
1010
|
+
After a successful login, you will be redirected to the Ayadn user token page.
|
1011
|
+
|
1012
|
+
Copy this token and paste it into Ayadn.
|
1013
|
+
\n\n
|
1014
|
+
USAGE
|
1015
|
+
end
|
1016
|
+
def self.switch
|
1017
|
+
<<-USAGE
|
1018
|
+
Switch between already authorized App.net accounts.
|
1019
|
+
|
1020
|
+
Usage:
|
1021
|
+
|
1022
|
+
ayadn switch @myotheraccount
|
1023
|
+
|
1024
|
+
ayadn -@ myotheraccount
|
1025
|
+
|
1026
|
+
List your authorized accounts:
|
1027
|
+
|
1028
|
+
ayadn -@ -l
|
1029
|
+
\n\n
|
1030
|
+
USAGE
|
1031
|
+
end
|
1032
|
+
def self.auto
|
1033
|
+
<<-USAGE
|
1034
|
+
Auto post every line of input.
|
1035
|
+
|
1036
|
+
In this mode, each line you type (each time you hit ENTER!) is automatically posted to ADN.
|
1037
|
+
|
1038
|
+
Hit CTRL+C to exit this mode at any moment.
|
1039
|
+
\n\n
|
1040
|
+
USAGE
|
1041
|
+
end
|
1042
|
+
end
|
1043
|
+
end
|