@superagnt/reddit-data 2.0.3 → 2.0.5
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.
- package/index.js +60 -59
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -7,7 +7,8 @@ import { homedir as _homedir } from 'node:os'
|
|
|
7
7
|
import { join as _join } from 'node:path'
|
|
8
8
|
import { existsSync as _existsSync, readFileSync as _readFileSync } from 'node:fs'
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// SUPERAGNT_API_URL overrides the API origin (QA/staging); customers never set it.
|
|
11
|
+
const BASE_URL = (process.env.SUPERAGNT_API_URL || 'https://api.superagnt.com') + '/v1/data/reddit'
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
// ── Auth Module (inlined) ────────────────────────────────────────────────────
|
|
@@ -95,7 +96,7 @@ export default function register(api) {
|
|
|
95
96
|
api.registerTool({
|
|
96
97
|
name: 'superagnt_reddit_Similar_Subreddits',
|
|
97
98
|
description: "Similar Subreddits",
|
|
98
|
-
|
|
99
|
+
parameters: {
|
|
99
100
|
"type": "object",
|
|
100
101
|
"properties": {
|
|
101
102
|
"cursor": {
|
|
@@ -111,7 +112,7 @@ export default function register(api) {
|
|
|
111
112
|
"subreddit"
|
|
112
113
|
]
|
|
113
114
|
},
|
|
114
|
-
execute: async (input) => {
|
|
115
|
+
execute: async (_toolCallId, input) => {
|
|
115
116
|
const key = ensureApiKey()
|
|
116
117
|
const params = parseToolInput(input)
|
|
117
118
|
return callSuperagnt(key, 'GET', '/getSimilarSubreddits', params)
|
|
@@ -121,7 +122,7 @@ export default function register(api) {
|
|
|
121
122
|
api.registerTool({
|
|
122
123
|
name: 'superagnt_reddit_Post_Duplicates',
|
|
123
124
|
description: "Post Duplicates",
|
|
124
|
-
|
|
125
|
+
parameters: {
|
|
125
126
|
"type": "object",
|
|
126
127
|
"properties": {
|
|
127
128
|
"cursor": {
|
|
@@ -137,7 +138,7 @@ export default function register(api) {
|
|
|
137
138
|
"post_url"
|
|
138
139
|
]
|
|
139
140
|
},
|
|
140
|
-
execute: async (input) => {
|
|
141
|
+
execute: async (_toolCallId, input) => {
|
|
141
142
|
const key = ensureApiKey()
|
|
142
143
|
const params = parseToolInput(input)
|
|
143
144
|
return callSuperagnt(key, 'GET', '/getPostDuplicates', params)
|
|
@@ -147,7 +148,7 @@ export default function register(api) {
|
|
|
147
148
|
api.registerTool({
|
|
148
149
|
name: 'superagnt_reddit_Subreddit_Moderators',
|
|
149
150
|
description: "Subreddit Moderators",
|
|
150
|
-
|
|
151
|
+
parameters: {
|
|
151
152
|
"type": "object",
|
|
152
153
|
"properties": {
|
|
153
154
|
"subreddit": {
|
|
@@ -159,7 +160,7 @@ export default function register(api) {
|
|
|
159
160
|
"subreddit"
|
|
160
161
|
]
|
|
161
162
|
},
|
|
162
|
-
execute: async (input) => {
|
|
163
|
+
execute: async (_toolCallId, input) => {
|
|
163
164
|
const key = ensureApiKey()
|
|
164
165
|
const params = parseToolInput(input)
|
|
165
166
|
return callSuperagnt(key, 'GET', '/getSubredditModerators', params)
|
|
@@ -169,7 +170,7 @@ export default function register(api) {
|
|
|
169
170
|
api.registerTool({
|
|
170
171
|
name: 'superagnt_reddit_Subreddit_Rules',
|
|
171
172
|
description: "Subreddit Rules",
|
|
172
|
-
|
|
173
|
+
parameters: {
|
|
173
174
|
"type": "object",
|
|
174
175
|
"properties": {
|
|
175
176
|
"subreddit": {
|
|
@@ -181,7 +182,7 @@ export default function register(api) {
|
|
|
181
182
|
"subreddit"
|
|
182
183
|
]
|
|
183
184
|
},
|
|
184
|
-
execute: async (input) => {
|
|
185
|
+
execute: async (_toolCallId, input) => {
|
|
185
186
|
const key = ensureApiKey()
|
|
186
187
|
const params = parseToolInput(input)
|
|
187
188
|
return callSuperagnt(key, 'GET', '/getSubredditRules', params)
|
|
@@ -191,7 +192,7 @@ export default function register(api) {
|
|
|
191
192
|
api.registerTool({
|
|
192
193
|
name: 'superagnt_reddit_User_Overview',
|
|
193
194
|
description: "User Overview",
|
|
194
|
-
|
|
195
|
+
parameters: {
|
|
195
196
|
"type": "object",
|
|
196
197
|
"properties": {
|
|
197
198
|
"sort": {
|
|
@@ -216,7 +217,7 @@ export default function register(api) {
|
|
|
216
217
|
"username"
|
|
217
218
|
]
|
|
218
219
|
},
|
|
219
|
-
execute: async (input) => {
|
|
220
|
+
execute: async (_toolCallId, input) => {
|
|
220
221
|
const key = ensureApiKey()
|
|
221
222
|
const params = parseToolInput(input)
|
|
222
223
|
return callSuperagnt(key, 'GET', '/getUserOverview', params)
|
|
@@ -226,7 +227,7 @@ export default function register(api) {
|
|
|
226
227
|
api.registerTool({
|
|
227
228
|
name: 'superagnt_reddit_Search_Users',
|
|
228
229
|
description: "Search Users",
|
|
229
|
-
|
|
230
|
+
parameters: {
|
|
230
231
|
"type": "object",
|
|
231
232
|
"properties": {
|
|
232
233
|
"query": {
|
|
@@ -242,7 +243,7 @@ export default function register(api) {
|
|
|
242
243
|
"query"
|
|
243
244
|
]
|
|
244
245
|
},
|
|
245
|
-
execute: async (input) => {
|
|
246
|
+
execute: async (_toolCallId, input) => {
|
|
246
247
|
const key = ensureApiKey()
|
|
247
248
|
const params = parseToolInput(input)
|
|
248
249
|
return callSuperagnt(key, 'GET', '/getSearchUsers', params)
|
|
@@ -252,7 +253,7 @@ export default function register(api) {
|
|
|
252
253
|
api.registerTool({
|
|
253
254
|
name: 'superagnt_reddit_Best_Popular_Posts',
|
|
254
255
|
description: "Best Popular Posts",
|
|
255
|
-
|
|
256
|
+
parameters: {
|
|
256
257
|
"type": "object",
|
|
257
258
|
"properties": {
|
|
258
259
|
"cursor": {
|
|
@@ -261,7 +262,7 @@ export default function register(api) {
|
|
|
261
262
|
}
|
|
262
263
|
}
|
|
263
264
|
},
|
|
264
|
-
execute: async (input) => {
|
|
265
|
+
execute: async (_toolCallId, input) => {
|
|
265
266
|
const key = ensureApiKey()
|
|
266
267
|
const params = parseToolInput(input)
|
|
267
268
|
return callSuperagnt(key, 'GET', '/getBestPopularPosts', params)
|
|
@@ -271,7 +272,7 @@ export default function register(api) {
|
|
|
271
272
|
api.registerTool({
|
|
272
273
|
name: 'superagnt_reddit_Controversial_Posts_By_Subreddit',
|
|
273
274
|
description: "Controversial Posts By Subreddit",
|
|
274
|
-
|
|
275
|
+
parameters: {
|
|
275
276
|
"type": "object",
|
|
276
277
|
"properties": {
|
|
277
278
|
"cursor": {
|
|
@@ -292,7 +293,7 @@ export default function register(api) {
|
|
|
292
293
|
"time"
|
|
293
294
|
]
|
|
294
295
|
},
|
|
295
|
-
execute: async (input) => {
|
|
296
|
+
execute: async (_toolCallId, input) => {
|
|
296
297
|
const key = ensureApiKey()
|
|
297
298
|
const params = parseToolInput(input)
|
|
298
299
|
return callSuperagnt(key, 'GET', '/getControversialPostsBySubreddit', params)
|
|
@@ -302,7 +303,7 @@ export default function register(api) {
|
|
|
302
303
|
api.registerTool({
|
|
303
304
|
name: 'superagnt_reddit_User_Post_Rank_In_Subreddit',
|
|
304
305
|
description: "User Post Rank In Subreddit",
|
|
305
|
-
|
|
306
|
+
parameters: {
|
|
306
307
|
"type": "object",
|
|
307
308
|
"properties": {
|
|
308
309
|
"sort": {
|
|
@@ -332,7 +333,7 @@ export default function register(api) {
|
|
|
332
333
|
"subreddit"
|
|
333
334
|
]
|
|
334
335
|
},
|
|
335
|
-
execute: async (input) => {
|
|
336
|
+
execute: async (_toolCallId, input) => {
|
|
336
337
|
const key = ensureApiKey()
|
|
337
338
|
const params = parseToolInput(input)
|
|
338
339
|
return callSuperagnt(key, 'GET', '/getUserPostRankInSubreddit', params)
|
|
@@ -342,7 +343,7 @@ export default function register(api) {
|
|
|
342
343
|
api.registerTool({
|
|
343
344
|
name: 'superagnt_reddit_Subreddit_Info',
|
|
344
345
|
description: "Subreddit Info",
|
|
345
|
-
|
|
346
|
+
parameters: {
|
|
346
347
|
"type": "object",
|
|
347
348
|
"properties": {
|
|
348
349
|
"subreddit": {
|
|
@@ -354,7 +355,7 @@ export default function register(api) {
|
|
|
354
355
|
"subreddit"
|
|
355
356
|
]
|
|
356
357
|
},
|
|
357
|
-
execute: async (input) => {
|
|
358
|
+
execute: async (_toolCallId, input) => {
|
|
358
359
|
const key = ensureApiKey()
|
|
359
360
|
const params = parseToolInput(input)
|
|
360
361
|
return callSuperagnt(key, 'GET', '/getSubredditInfo', params)
|
|
@@ -364,7 +365,7 @@ export default function register(api) {
|
|
|
364
365
|
api.registerTool({
|
|
365
366
|
name: 'superagnt_reddit_Comments_By_Subreddit',
|
|
366
367
|
description: "Comments By Subreddit",
|
|
367
|
-
|
|
368
|
+
parameters: {
|
|
368
369
|
"type": "object",
|
|
369
370
|
"properties": {
|
|
370
371
|
"subreddit": {
|
|
@@ -380,7 +381,7 @@ export default function register(api) {
|
|
|
380
381
|
"subreddit"
|
|
381
382
|
]
|
|
382
383
|
},
|
|
383
|
-
execute: async (input) => {
|
|
384
|
+
execute: async (_toolCallId, input) => {
|
|
384
385
|
const key = ensureApiKey()
|
|
385
386
|
const params = parseToolInput(input)
|
|
386
387
|
return callSuperagnt(key, 'GET', '/getCommentsBySubreddit', params)
|
|
@@ -390,7 +391,7 @@ export default function register(api) {
|
|
|
390
391
|
api.registerTool({
|
|
391
392
|
name: 'superagnt_reddit_Post_Comments_With_Sort',
|
|
392
393
|
description: "Post Comments With Sort",
|
|
393
|
-
|
|
394
|
+
parameters: {
|
|
394
395
|
"type": "object",
|
|
395
396
|
"properties": {
|
|
396
397
|
"sort": {
|
|
@@ -411,7 +412,7 @@ export default function register(api) {
|
|
|
411
412
|
"post_url"
|
|
412
413
|
]
|
|
413
414
|
},
|
|
414
|
-
execute: async (input) => {
|
|
415
|
+
execute: async (_toolCallId, input) => {
|
|
415
416
|
const key = ensureApiKey()
|
|
416
417
|
const params = parseToolInput(input)
|
|
417
418
|
return callSuperagnt(key, 'GET', '/getPostCommentsWithSort', params)
|
|
@@ -421,7 +422,7 @@ export default function register(api) {
|
|
|
421
422
|
api.registerTool({
|
|
422
423
|
name: 'superagnt_reddit_Profile',
|
|
423
424
|
description: "Profile",
|
|
424
|
-
|
|
425
|
+
parameters: {
|
|
425
426
|
"type": "object",
|
|
426
427
|
"properties": {
|
|
427
428
|
"username": {
|
|
@@ -433,7 +434,7 @@ export default function register(api) {
|
|
|
433
434
|
"username"
|
|
434
435
|
]
|
|
435
436
|
},
|
|
436
|
-
execute: async (input) => {
|
|
437
|
+
execute: async (_toolCallId, input) => {
|
|
437
438
|
const key = ensureApiKey()
|
|
438
439
|
const params = parseToolInput(input)
|
|
439
440
|
return callSuperagnt(key, 'GET', '/getProfile', params)
|
|
@@ -443,7 +444,7 @@ export default function register(api) {
|
|
|
443
444
|
api.registerTool({
|
|
444
445
|
name: 'superagnt_reddit_Post_Comments',
|
|
445
446
|
description: "Post Comments",
|
|
446
|
-
|
|
447
|
+
parameters: {
|
|
447
448
|
"type": "object",
|
|
448
449
|
"properties": {
|
|
449
450
|
"post_url": {
|
|
@@ -455,7 +456,7 @@ export default function register(api) {
|
|
|
455
456
|
"post_url"
|
|
456
457
|
]
|
|
457
458
|
},
|
|
458
|
-
execute: async (input) => {
|
|
459
|
+
execute: async (_toolCallId, input) => {
|
|
459
460
|
const key = ensureApiKey()
|
|
460
461
|
const params = parseToolInput(input)
|
|
461
462
|
return callSuperagnt(key, 'GET', '/getPostComments', params)
|
|
@@ -465,7 +466,7 @@ export default function register(api) {
|
|
|
465
466
|
api.registerTool({
|
|
466
467
|
name: 'superagnt_reddit_User_Stats',
|
|
467
468
|
description: "User Stats",
|
|
468
|
-
|
|
469
|
+
parameters: {
|
|
469
470
|
"type": "object",
|
|
470
471
|
"properties": {
|
|
471
472
|
"username": {
|
|
@@ -477,7 +478,7 @@ export default function register(api) {
|
|
|
477
478
|
"username"
|
|
478
479
|
]
|
|
479
480
|
},
|
|
480
|
-
execute: async (input) => {
|
|
481
|
+
execute: async (_toolCallId, input) => {
|
|
481
482
|
const key = ensureApiKey()
|
|
482
483
|
const params = parseToolInput(input)
|
|
483
484
|
return callSuperagnt(key, 'GET', '/getUserStats', params)
|
|
@@ -487,7 +488,7 @@ export default function register(api) {
|
|
|
487
488
|
api.registerTool({
|
|
488
489
|
name: 'superagnt_reddit_Search_Posts',
|
|
489
490
|
description: "Search Posts",
|
|
490
|
-
|
|
491
|
+
parameters: {
|
|
491
492
|
"type": "object",
|
|
492
493
|
"properties": {
|
|
493
494
|
"query": {
|
|
@@ -515,7 +516,7 @@ export default function register(api) {
|
|
|
515
516
|
"query"
|
|
516
517
|
]
|
|
517
518
|
},
|
|
518
|
-
execute: async (input) => {
|
|
519
|
+
execute: async (_toolCallId, input) => {
|
|
519
520
|
const key = ensureApiKey()
|
|
520
521
|
const params = parseToolInput(input)
|
|
521
522
|
return callSuperagnt(key, 'GET', '/getSearchPosts', params)
|
|
@@ -525,7 +526,7 @@ export default function register(api) {
|
|
|
525
526
|
api.registerTool({
|
|
526
527
|
name: 'superagnt_reddit_Search_Subreddits',
|
|
527
528
|
description: "Search Subreddits",
|
|
528
|
-
|
|
529
|
+
parameters: {
|
|
529
530
|
"type": "object",
|
|
530
531
|
"properties": {
|
|
531
532
|
"cursor": {
|
|
@@ -541,7 +542,7 @@ export default function register(api) {
|
|
|
541
542
|
"query"
|
|
542
543
|
]
|
|
543
544
|
},
|
|
544
|
-
execute: async (input) => {
|
|
545
|
+
execute: async (_toolCallId, input) => {
|
|
545
546
|
const key = ensureApiKey()
|
|
546
547
|
const params = parseToolInput(input)
|
|
547
548
|
return callSuperagnt(key, 'GET', '/getSearchSubreddits', params)
|
|
@@ -551,7 +552,7 @@ export default function register(api) {
|
|
|
551
552
|
api.registerTool({
|
|
552
553
|
name: 'superagnt_reddit_New_Subreddits',
|
|
553
554
|
description: "New Subreddits",
|
|
554
|
-
|
|
555
|
+
parameters: {
|
|
555
556
|
"type": "object",
|
|
556
557
|
"properties": {
|
|
557
558
|
"cursor": {
|
|
@@ -560,7 +561,7 @@ export default function register(api) {
|
|
|
560
561
|
}
|
|
561
562
|
}
|
|
562
563
|
},
|
|
563
|
-
execute: async (input) => {
|
|
564
|
+
execute: async (_toolCallId, input) => {
|
|
564
565
|
const key = ensureApiKey()
|
|
565
566
|
const params = parseToolInput(input)
|
|
566
567
|
return callSuperagnt(key, 'GET', '/getNewSubreddits', params)
|
|
@@ -570,7 +571,7 @@ export default function register(api) {
|
|
|
570
571
|
api.registerTool({
|
|
571
572
|
name: 'superagnt_reddit_Popular_Subreddits',
|
|
572
573
|
description: "Popular Subreddits",
|
|
573
|
-
|
|
574
|
+
parameters: {
|
|
574
575
|
"type": "object",
|
|
575
576
|
"properties": {
|
|
576
577
|
"cursor": {
|
|
@@ -579,7 +580,7 @@ export default function register(api) {
|
|
|
579
580
|
}
|
|
580
581
|
}
|
|
581
582
|
},
|
|
582
|
-
execute: async (input) => {
|
|
583
|
+
execute: async (_toolCallId, input) => {
|
|
583
584
|
const key = ensureApiKey()
|
|
584
585
|
const params = parseToolInput(input)
|
|
585
586
|
return callSuperagnt(key, 'GET', '/getPopularSubreddits', params)
|
|
@@ -589,7 +590,7 @@ export default function register(api) {
|
|
|
589
590
|
api.registerTool({
|
|
590
591
|
name: 'superagnt_reddit_Post_Details',
|
|
591
592
|
description: "Post Details",
|
|
592
|
-
|
|
593
|
+
parameters: {
|
|
593
594
|
"type": "object",
|
|
594
595
|
"properties": {
|
|
595
596
|
"post_url": {
|
|
@@ -601,7 +602,7 @@ export default function register(api) {
|
|
|
601
602
|
"post_url"
|
|
602
603
|
]
|
|
603
604
|
},
|
|
604
|
-
execute: async (input) => {
|
|
605
|
+
execute: async (_toolCallId, input) => {
|
|
605
606
|
const key = ensureApiKey()
|
|
606
607
|
const params = parseToolInput(input)
|
|
607
608
|
return callSuperagnt(key, 'GET', '/getPostDetails', params)
|
|
@@ -611,7 +612,7 @@ export default function register(api) {
|
|
|
611
612
|
api.registerTool({
|
|
612
613
|
name: 'superagnt_reddit_Posts_By_Subreddit',
|
|
613
614
|
description: "Posts By Subreddit",
|
|
614
|
-
|
|
615
|
+
parameters: {
|
|
615
616
|
"type": "object",
|
|
616
617
|
"properties": {
|
|
617
618
|
"subreddit": {
|
|
@@ -632,7 +633,7 @@ export default function register(api) {
|
|
|
632
633
|
"sort"
|
|
633
634
|
]
|
|
634
635
|
},
|
|
635
|
-
execute: async (input) => {
|
|
636
|
+
execute: async (_toolCallId, input) => {
|
|
636
637
|
const key = ensureApiKey()
|
|
637
638
|
const params = parseToolInput(input)
|
|
638
639
|
return callSuperagnt(key, 'GET', '/getPostsBySubreddit', params)
|
|
@@ -642,7 +643,7 @@ export default function register(api) {
|
|
|
642
643
|
api.registerTool({
|
|
643
644
|
name: 'superagnt_reddit_Top_Comments_By_Username',
|
|
644
645
|
description: "Top Comments By Username",
|
|
645
|
-
|
|
646
|
+
parameters: {
|
|
646
647
|
"type": "object",
|
|
647
648
|
"properties": {
|
|
648
649
|
"time": {
|
|
@@ -663,7 +664,7 @@ export default function register(api) {
|
|
|
663
664
|
"username"
|
|
664
665
|
]
|
|
665
666
|
},
|
|
666
|
-
execute: async (input) => {
|
|
667
|
+
execute: async (_toolCallId, input) => {
|
|
667
668
|
const key = ensureApiKey()
|
|
668
669
|
const params = parseToolInput(input)
|
|
669
670
|
return callSuperagnt(key, 'GET', '/getTopCommentsByUsername', params)
|
|
@@ -673,7 +674,7 @@ export default function register(api) {
|
|
|
673
674
|
api.registerTool({
|
|
674
675
|
name: 'superagnt_reddit_Popular_Posts',
|
|
675
676
|
description: "Popular Posts",
|
|
676
|
-
|
|
677
|
+
parameters: {
|
|
677
678
|
"type": "object",
|
|
678
679
|
"properties": {
|
|
679
680
|
"cursor": {
|
|
@@ -689,7 +690,7 @@ export default function register(api) {
|
|
|
689
690
|
"sort"
|
|
690
691
|
]
|
|
691
692
|
},
|
|
692
|
-
execute: async (input) => {
|
|
693
|
+
execute: async (_toolCallId, input) => {
|
|
693
694
|
const key = ensureApiKey()
|
|
694
695
|
const params = parseToolInput(input)
|
|
695
696
|
return callSuperagnt(key, 'GET', '/getPopularPosts', params)
|
|
@@ -699,7 +700,7 @@ export default function register(api) {
|
|
|
699
700
|
api.registerTool({
|
|
700
701
|
name: 'superagnt_reddit_Top_Posts_By_Subreddit',
|
|
701
702
|
description: "Top Posts By Subreddit",
|
|
702
|
-
|
|
703
|
+
parameters: {
|
|
703
704
|
"type": "object",
|
|
704
705
|
"properties": {
|
|
705
706
|
"time": {
|
|
@@ -720,7 +721,7 @@ export default function register(api) {
|
|
|
720
721
|
"subreddit"
|
|
721
722
|
]
|
|
722
723
|
},
|
|
723
|
-
execute: async (input) => {
|
|
724
|
+
execute: async (_toolCallId, input) => {
|
|
724
725
|
const key = ensureApiKey()
|
|
725
726
|
const params = parseToolInput(input)
|
|
726
727
|
return callSuperagnt(key, 'GET', '/getTopPostsBySubreddit', params)
|
|
@@ -730,7 +731,7 @@ export default function register(api) {
|
|
|
730
731
|
api.registerTool({
|
|
731
732
|
name: 'superagnt_reddit_Comments_By_Username',
|
|
732
733
|
description: "Comments By Username",
|
|
733
|
-
|
|
734
|
+
parameters: {
|
|
734
735
|
"type": "object",
|
|
735
736
|
"properties": {
|
|
736
737
|
"sort": {
|
|
@@ -751,7 +752,7 @@ export default function register(api) {
|
|
|
751
752
|
"username"
|
|
752
753
|
]
|
|
753
754
|
},
|
|
754
|
-
execute: async (input) => {
|
|
755
|
+
execute: async (_toolCallId, input) => {
|
|
755
756
|
const key = ensureApiKey()
|
|
756
757
|
const params = parseToolInput(input)
|
|
757
758
|
return callSuperagnt(key, 'GET', '/getCommentsByUsername', params)
|
|
@@ -761,7 +762,7 @@ export default function register(api) {
|
|
|
761
762
|
api.registerTool({
|
|
762
763
|
name: 'superagnt_reddit_Top_Posts_By_Username',
|
|
763
764
|
description: "Top Posts By Username",
|
|
764
|
-
|
|
765
|
+
parameters: {
|
|
765
766
|
"type": "object",
|
|
766
767
|
"properties": {
|
|
767
768
|
"cursor": {
|
|
@@ -782,7 +783,7 @@ export default function register(api) {
|
|
|
782
783
|
"time"
|
|
783
784
|
]
|
|
784
785
|
},
|
|
785
|
-
execute: async (input) => {
|
|
786
|
+
execute: async (_toolCallId, input) => {
|
|
786
787
|
const key = ensureApiKey()
|
|
787
788
|
const params = parseToolInput(input)
|
|
788
789
|
return callSuperagnt(key, 'GET', '/getTopPostsByUsername', params)
|
|
@@ -792,7 +793,7 @@ export default function register(api) {
|
|
|
792
793
|
api.registerTool({
|
|
793
794
|
name: 'superagnt_reddit_Posts_By_Username',
|
|
794
795
|
description: "Posts By Username",
|
|
795
|
-
|
|
796
|
+
parameters: {
|
|
796
797
|
"type": "object",
|
|
797
798
|
"properties": {
|
|
798
799
|
"username": {
|
|
@@ -813,7 +814,7 @@ export default function register(api) {
|
|
|
813
814
|
"sort"
|
|
814
815
|
]
|
|
815
816
|
},
|
|
816
|
-
execute: async (input) => {
|
|
817
|
+
execute: async (_toolCallId, input) => {
|
|
817
818
|
const key = ensureApiKey()
|
|
818
819
|
const params = parseToolInput(input)
|
|
819
820
|
return callSuperagnt(key, 'GET', '/getPostsByUsername', params)
|
|
@@ -823,7 +824,7 @@ export default function register(api) {
|
|
|
823
824
|
api.registerTool({
|
|
824
825
|
name: 'superagnt_reddit_Rising_Popular_Posts',
|
|
825
826
|
description: "Rising Popular Posts",
|
|
826
|
-
|
|
827
|
+
parameters: {
|
|
827
828
|
"type": "object",
|
|
828
829
|
"properties": {
|
|
829
830
|
"cursor": {
|
|
@@ -832,7 +833,7 @@ export default function register(api) {
|
|
|
832
833
|
}
|
|
833
834
|
}
|
|
834
835
|
},
|
|
835
|
-
execute: async (input) => {
|
|
836
|
+
execute: async (_toolCallId, input) => {
|
|
836
837
|
const key = ensureApiKey()
|
|
837
838
|
const params = parseToolInput(input)
|
|
838
839
|
return callSuperagnt(key, 'GET', '/getRisingPopularPosts', params)
|
|
@@ -842,7 +843,7 @@ export default function register(api) {
|
|
|
842
843
|
api.registerTool({
|
|
843
844
|
name: 'superagnt_reddit_Top_Popular_Posts',
|
|
844
845
|
description: "Top Popular Posts",
|
|
845
|
-
|
|
846
|
+
parameters: {
|
|
846
847
|
"type": "object",
|
|
847
848
|
"properties": {
|
|
848
849
|
"time": {
|
|
@@ -858,7 +859,7 @@ export default function register(api) {
|
|
|
858
859
|
"time"
|
|
859
860
|
]
|
|
860
861
|
},
|
|
861
|
-
execute: async (input) => {
|
|
862
|
+
execute: async (_toolCallId, input) => {
|
|
862
863
|
const key = ensureApiKey()
|
|
863
864
|
const params = parseToolInput(input)
|
|
864
865
|
return callSuperagnt(key, 'GET', '/getTopPopularPosts', params)
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "reddit-data",
|
|
3
3
|
"name": "Reddit Data",
|
|
4
4
|
"description": "Unified access to subreddit metadata, post threads, user activity, and search. Built for LLMs and automation — not one-off scraping.",
|
|
5
|
-
"version": "2.0.
|
|
5
|
+
"version": "2.0.5",
|
|
6
6
|
"contracts": {
|
|
7
7
|
"tools": [
|
|
8
8
|
"superagnt_reddit_Similar_Subreddits",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superagnt/reddit-data",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Unified access to subreddit metadata, post threads, user activity, and search. Built for LLMs and automation — not one-off scraping.",
|
|
6
6
|
"main": "index.js",
|