universal-mcp-applications 0.1.13__py3-none-any.whl → 0.1.15__py3-none-any.whl
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.
Potentially problematic release.
This version of universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/aws_s3/app.py +71 -71
- universal_mcp/applications/calendly/app.py +199 -199
- universal_mcp/applications/canva/app.py +189 -189
- universal_mcp/applications/domain_checker/app.py +31 -24
- universal_mcp/applications/e2b/app.py +6 -7
- universal_mcp/applications/elevenlabs/app.py +24 -20
- universal_mcp/applications/exa/app.py +25 -20
- universal_mcp/applications/falai/app.py +44 -41
- universal_mcp/applications/file_system/app.py +20 -12
- universal_mcp/applications/firecrawl/app.py +46 -47
- universal_mcp/applications/fireflies/app.py +79 -79
- universal_mcp/applications/fpl/app.py +83 -74
- universal_mcp/applications/github/README.md +0 -1028
- universal_mcp/applications/github/app.py +55 -50227
- universal_mcp/applications/google_calendar/app.py +63 -65
- universal_mcp/applications/google_docs/app.py +78 -78
- universal_mcp/applications/google_drive/app.py +361 -440
- universal_mcp/applications/google_gemini/app.py +34 -17
- universal_mcp/applications/google_mail/app.py +117 -117
- universal_mcp/applications/google_searchconsole/app.py +41 -47
- universal_mcp/applications/google_sheet/app.py +157 -164
- universal_mcp/applications/http_tools/app.py +16 -16
- universal_mcp/applications/linkedin/app.py +26 -31
- universal_mcp/applications/ms_teams/app.py +190 -190
- universal_mcp/applications/openai/app.py +55 -56
- universal_mcp/applications/outlook/app.py +71 -71
- universal_mcp/applications/perplexity/app.py +17 -17
- universal_mcp/applications/reddit/app.py +225 -4053
- universal_mcp/applications/replicate/app.py +40 -42
- universal_mcp/applications/resend/app.py +157 -154
- universal_mcp/applications/scraper/app.py +24 -24
- universal_mcp/applications/serpapi/app.py +18 -20
- universal_mcp/applications/sharepoint/app.py +46 -36
- universal_mcp/applications/slack/app.py +66 -66
- universal_mcp/applications/tavily/app.py +7 -7
- universal_mcp/applications/twitter/api_segments/compliance_api.py +17 -20
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +35 -40
- universal_mcp/applications/twitter/api_segments/dm_events_api.py +18 -21
- universal_mcp/applications/twitter/api_segments/likes_api.py +19 -22
- universal_mcp/applications/twitter/api_segments/lists_api.py +59 -68
- universal_mcp/applications/twitter/api_segments/spaces_api.py +36 -42
- universal_mcp/applications/twitter/api_segments/trends_api.py +7 -8
- universal_mcp/applications/twitter/api_segments/tweets_api.py +159 -185
- universal_mcp/applications/twitter/api_segments/usage_api.py +5 -6
- universal_mcp/applications/twitter/api_segments/users_api.py +230 -264
- universal_mcp/applications/unipile/app.py +99 -105
- universal_mcp/applications/whatsapp/app.py +86 -82
- universal_mcp/applications/whatsapp_business/app.py +147 -147
- universal_mcp/applications/youtube/app.py +290 -290
- universal_mcp/applications/zenquotes/app.py +6 -6
- {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.15.dist-info}/METADATA +2 -2
- {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.15.dist-info}/RECORD +54 -54
- {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.15.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.15.dist-info}/licenses/LICENSE +0 -0
|
@@ -49,7 +49,7 @@ class RedditApp(APIApplication):
|
|
|
49
49
|
self, subreddit: str, limit: int = 5, timeframe: str = "day"
|
|
50
50
|
) -> dict[str, Any]:
|
|
51
51
|
"""
|
|
52
|
-
|
|
52
|
+
Fetches top posts from a given subreddit, filterable by time.
|
|
53
53
|
|
|
54
54
|
Args:
|
|
55
55
|
subreddit: The name of the subreddit (e.g., 'python', 'worldnews') without the 'r/' prefix
|
|
@@ -114,8 +114,6 @@ class RedditApp(APIApplication):
|
|
|
114
114
|
"q": query,
|
|
115
115
|
"limit": limit,
|
|
116
116
|
"sort": sort,
|
|
117
|
-
# Optionally include NSFW results? Defaulting to false for safety.
|
|
118
|
-
# "include_over_18": "false"
|
|
119
117
|
}
|
|
120
118
|
logger.info(
|
|
121
119
|
f"Searching for subreddits matching '{query}' (limit: {limit}, sort: {sort})"
|
|
@@ -315,7 +313,7 @@ class RedditApp(APIApplication):
|
|
|
315
313
|
response.raise_for_status()
|
|
316
314
|
return {"message": f"Content {content_id} deleted successfully."}
|
|
317
315
|
|
|
318
|
-
def
|
|
316
|
+
def get_current_user_info(self) -> Any:
|
|
319
317
|
"""
|
|
320
318
|
Get the current user's information.
|
|
321
319
|
Returns:
|
|
@@ -330,7 +328,7 @@ class RedditApp(APIApplication):
|
|
|
330
328
|
response.raise_for_status()
|
|
331
329
|
return response.json()
|
|
332
330
|
|
|
333
|
-
def
|
|
331
|
+
def get_current_user_karma(self) -> Any:
|
|
334
332
|
"""
|
|
335
333
|
Get the current user's karma.
|
|
336
334
|
|
|
@@ -346,3478 +344,52 @@ class RedditApp(APIApplication):
|
|
|
346
344
|
response.raise_for_status()
|
|
347
345
|
return response.json()
|
|
348
346
|
|
|
349
|
-
def
|
|
350
|
-
"""
|
|
351
|
-
Get the current user's preferences.
|
|
352
|
-
|
|
353
|
-
Returns:
|
|
354
|
-
Any: API response data.
|
|
355
|
-
|
|
356
|
-
Tags:
|
|
357
|
-
account
|
|
358
|
-
"""
|
|
359
|
-
url = f"{self.base_url}/api/v1/me/prefs"
|
|
360
|
-
query_params = {}
|
|
361
|
-
response = self._get(url, params=query_params)
|
|
362
|
-
response.raise_for_status()
|
|
363
|
-
return response.json()
|
|
364
|
-
|
|
365
|
-
def api_v1_me_prefs1(
|
|
366
|
-
self,
|
|
367
|
-
accept_pms=None,
|
|
368
|
-
activity_relevant_ads=None,
|
|
369
|
-
allow_clicktracking=None,
|
|
370
|
-
bad_comment_autocollapse=None,
|
|
371
|
-
beta=None,
|
|
372
|
-
clickgadget=None,
|
|
373
|
-
collapse_read_messages=None,
|
|
374
|
-
compress=None,
|
|
375
|
-
country_code=None,
|
|
376
|
-
creddit_autorenew=None,
|
|
377
|
-
default_comment_sort=None,
|
|
378
|
-
domain_details=None,
|
|
379
|
-
email_chat_request=None,
|
|
380
|
-
email_comment_reply=None,
|
|
381
|
-
email_community_discovery=None,
|
|
382
|
-
email_digests=None,
|
|
383
|
-
email_messages=None,
|
|
384
|
-
email_new_user_welcome=None,
|
|
385
|
-
email_post_reply=None,
|
|
386
|
-
email_private_message=None,
|
|
387
|
-
email_unsubscribe_all=None,
|
|
388
|
-
email_upvote_comment=None,
|
|
389
|
-
email_upvote_post=None,
|
|
390
|
-
email_user_new_follower=None,
|
|
391
|
-
email_username_mention=None,
|
|
392
|
-
enable_default_themes=None,
|
|
393
|
-
enable_followers=None,
|
|
394
|
-
feed_recommendations_enabled=None,
|
|
395
|
-
g=None,
|
|
396
|
-
hide_ads=None,
|
|
397
|
-
hide_downs=None,
|
|
398
|
-
hide_from_robots=None,
|
|
399
|
-
hide_ups=None,
|
|
400
|
-
highlight_controversial=None,
|
|
401
|
-
highlight_new_comments=None,
|
|
402
|
-
ignore_suggested_sort=None,
|
|
403
|
-
in_redesign_beta=None,
|
|
404
|
-
label_nsfw=None,
|
|
405
|
-
lang=None,
|
|
406
|
-
legacy_search=None,
|
|
407
|
-
live_bar_recommendations_enabled=None,
|
|
408
|
-
live_orangereds=None,
|
|
409
|
-
mark_messages_read=None,
|
|
410
|
-
media=None,
|
|
411
|
-
media_preview=None,
|
|
412
|
-
min_comment_score=None,
|
|
413
|
-
min_link_score=None,
|
|
414
|
-
monitor_mentions=None,
|
|
415
|
-
newwindow=None,
|
|
416
|
-
nightmode=None,
|
|
417
|
-
no_profanity=None,
|
|
418
|
-
num_comments=None,
|
|
419
|
-
numsites=None,
|
|
420
|
-
organic=None,
|
|
421
|
-
other_theme=None,
|
|
422
|
-
over_18=None,
|
|
423
|
-
private_feeds=None,
|
|
424
|
-
profile_opt_out=None,
|
|
425
|
-
public_votes=None,
|
|
426
|
-
research=None,
|
|
427
|
-
search_include_over_18=None,
|
|
428
|
-
send_crosspost_messages=None,
|
|
429
|
-
send_welcome_messages=None,
|
|
430
|
-
show_flair=None,
|
|
431
|
-
show_gold_expiration=None,
|
|
432
|
-
show_link_flair=None,
|
|
433
|
-
show_location_based_recommendations=None,
|
|
434
|
-
show_presence=None,
|
|
435
|
-
show_promote=None,
|
|
436
|
-
show_stylesheets=None,
|
|
437
|
-
show_trending=None,
|
|
438
|
-
show_twitter=None,
|
|
439
|
-
sms_notifications_enabled=None,
|
|
440
|
-
store_visits=None,
|
|
441
|
-
survey_last_seen_time=None,
|
|
442
|
-
theme_selector=None,
|
|
443
|
-
third_party_data_personalized_ads=None,
|
|
444
|
-
third_party_personalized_ads=None,
|
|
445
|
-
third_party_site_data_personalized_ads=None,
|
|
446
|
-
third_party_site_data_personalized_content=None,
|
|
447
|
-
threaded_messages=None,
|
|
448
|
-
threaded_modmail=None,
|
|
449
|
-
top_karma_subreddits=None,
|
|
450
|
-
use_global_defaults=None,
|
|
451
|
-
video_autoplay=None,
|
|
452
|
-
whatsapp_comment_reply=None,
|
|
453
|
-
whatsapp_enabled=None,
|
|
454
|
-
) -> Any:
|
|
455
|
-
"""
|
|
456
|
-
Update the current user's preferences.
|
|
457
|
-
|
|
458
|
-
Args:
|
|
459
|
-
accept_pms (string): accept_pms Example: 'whitelisted'.
|
|
460
|
-
activity_relevant_ads (boolean): activity_relevant_ads Example: 'False'.
|
|
461
|
-
allow_clicktracking (boolean): allow_clicktracking Example: 'False'.
|
|
462
|
-
bad_comment_autocollapse (string): bad_comment_autocollapse Example: 'off'.
|
|
463
|
-
beta (boolean): beta Example: 'False'.
|
|
464
|
-
clickgadget (boolean): clickgadget Example: 'True'.
|
|
465
|
-
collapse_read_messages (boolean): collapse_read_messages Example: 'False'.
|
|
466
|
-
compress (boolean): compress Example: 'False'.
|
|
467
|
-
country_code (string): country_code Example: 'ZZ'.
|
|
468
|
-
creddit_autorenew (boolean): creddit_autorenew Example: 'False'.
|
|
469
|
-
default_comment_sort (string): default_comment_sort Example: 'new'.
|
|
470
|
-
domain_details (boolean): domain_details Example: 'False'.
|
|
471
|
-
email_chat_request (boolean): email_chat_request Example: 'False'.
|
|
472
|
-
email_comment_reply (boolean): email_comment_reply Example: 'False'.
|
|
473
|
-
email_community_discovery (boolean): email_community_discovery Example: 'False'.
|
|
474
|
-
email_digests (boolean): email_digests Example: 'False'.
|
|
475
|
-
email_messages (boolean): email_messages Example: 'False'.
|
|
476
|
-
email_new_user_welcome (boolean): email_new_user_welcome Example: 'False'.
|
|
477
|
-
email_post_reply (boolean): email_post_reply Example: 'False'.
|
|
478
|
-
email_private_message (boolean): email_private_message Example: 'False'.
|
|
479
|
-
email_unsubscribe_all (boolean): email_unsubscribe_all Example: 'True'.
|
|
480
|
-
email_upvote_comment (boolean): email_upvote_comment Example: 'False'.
|
|
481
|
-
email_upvote_post (boolean): email_upvote_post Example: 'False'.
|
|
482
|
-
email_user_new_follower (boolean): email_user_new_follower Example: 'False'.
|
|
483
|
-
email_username_mention (boolean): email_username_mention Example: 'False'.
|
|
484
|
-
enable_default_themes (boolean): enable_default_themes Example: 'False'.
|
|
485
|
-
enable_followers (boolean): enable_followers Example: 'False'.
|
|
486
|
-
feed_recommendations_enabled (boolean): feed_recommendations_enabled Example: 'False'.
|
|
487
|
-
g (string): g
|
|
488
|
-
hide_ads (boolean): hide_ads Example: 'True'.
|
|
489
|
-
hide_downs (boolean): hide_downs Example: 'False'.
|
|
490
|
-
hide_from_robots (boolean): hide_from_robots Example: 'True'.
|
|
491
|
-
hide_ups (boolean): hide_ups Example: 'False'.
|
|
492
|
-
highlight_controversial (boolean): highlight_controversial Example: 'False'.
|
|
493
|
-
highlight_new_comments (boolean): highlight_new_comments Example: 'True'.
|
|
494
|
-
ignore_suggested_sort (boolean): ignore_suggested_sort Example: 'True'.
|
|
495
|
-
in_redesign_beta (boolean): in_redesign_beta Example: 'True'.
|
|
496
|
-
label_nsfw (boolean): label_nsfw Example: 'True'.
|
|
497
|
-
lang (string): lang Example: 'en'.
|
|
498
|
-
legacy_search (boolean): legacy_search Example: 'False'.
|
|
499
|
-
live_bar_recommendations_enabled (boolean): live_bar_recommendations_enabled Example: 'False'.
|
|
500
|
-
live_orangereds (boolean): live_orangereds Example: 'False'.
|
|
501
|
-
mark_messages_read (boolean): mark_messages_read Example: 'True'.
|
|
502
|
-
media (string): media Example: 'subreddit'.
|
|
503
|
-
media_preview (string): media_preview Example: 'subreddit'.
|
|
504
|
-
min_comment_score (number): min_comment_score Example: '-100'.
|
|
505
|
-
min_link_score (number): min_link_score Example: '-100'.
|
|
506
|
-
monitor_mentions (boolean): monitor_mentions Example: 'True'.
|
|
507
|
-
newwindow (boolean): newwindow Example: 'False'.
|
|
508
|
-
nightmode (boolean): nightmode Example: 'True'.
|
|
509
|
-
no_profanity (boolean): no_profanity Example: 'False'.
|
|
510
|
-
num_comments (number): num_comments Example: '500'.
|
|
511
|
-
numsites (number): numsites Example: '100'.
|
|
512
|
-
organic (string): organic
|
|
513
|
-
other_theme (string): other_theme
|
|
514
|
-
over_18 (boolean): over_18 Example: 'True'.
|
|
515
|
-
private_feeds (boolean): private_feeds Example: 'True'.
|
|
516
|
-
profile_opt_out (boolean): profile_opt_out Example: 'False'.
|
|
517
|
-
public_votes (boolean): public_votes Example: 'False'.
|
|
518
|
-
research (boolean): research Example: 'False'.
|
|
519
|
-
search_include_over_18 (boolean): search_include_over_18 Example: 'True'.
|
|
520
|
-
send_crosspost_messages (boolean): send_crosspost_messages Example: 'True'.
|
|
521
|
-
send_welcome_messages (boolean): send_welcome_messages Example: 'True'.
|
|
522
|
-
show_flair (boolean): show_flair Example: 'True'.
|
|
523
|
-
show_gold_expiration (boolean): show_gold_expiration Example: 'True'.
|
|
524
|
-
show_link_flair (boolean): show_link_flair Example: 'True'.
|
|
525
|
-
show_location_based_recommendations (boolean): show_location_based_recommendations Example: 'False'.
|
|
526
|
-
show_presence (boolean): show_presence Example: 'False'.
|
|
527
|
-
show_promote (boolean): show_promote Example: 'False'.
|
|
528
|
-
show_stylesheets (boolean): show_stylesheets Example: 'True'.
|
|
529
|
-
show_trending (boolean): show_trending Example: 'False'.
|
|
530
|
-
show_twitter (boolean): show_twitter Example: 'False'.
|
|
531
|
-
sms_notifications_enabled (boolean): sms_notifications_enabled Example: 'False'.
|
|
532
|
-
store_visits (boolean): store_visits Example: 'False'.
|
|
533
|
-
survey_last_seen_time (string): survey_last_seen_time
|
|
534
|
-
theme_selector (string): theme_selector
|
|
535
|
-
third_party_data_personalized_ads (boolean): third_party_data_personalized_ads Example: 'False'.
|
|
536
|
-
third_party_personalized_ads (boolean): third_party_personalized_ads Example: 'False'.
|
|
537
|
-
third_party_site_data_personalized_ads (boolean): third_party_site_data_personalized_ads Example: 'False'.
|
|
538
|
-
third_party_site_data_personalized_content (boolean): third_party_site_data_personalized_content Example: 'False'.
|
|
539
|
-
threaded_messages (boolean): threaded_messages Example: 'True'.
|
|
540
|
-
threaded_modmail (boolean): threaded_modmail Example: 'True'.
|
|
541
|
-
top_karma_subreddits (boolean): top_karma_subreddits Example: 'False'.
|
|
542
|
-
use_global_defaults (boolean): use_global_defaults Example: 'False'.
|
|
543
|
-
video_autoplay (boolean): video_autoplay Example: 'False'.
|
|
544
|
-
whatsapp_comment_reply (boolean): whatsapp_comment_reply Example: 'False'.
|
|
545
|
-
whatsapp_enabled (boolean): whatsapp_enabled
|
|
546
|
-
Example:
|
|
547
|
-
```json
|
|
548
|
-
{
|
|
549
|
-
"accept_pms": "whitelisted",
|
|
550
|
-
"activity_relevant_ads": false,
|
|
551
|
-
"allow_clicktracking": false,
|
|
552
|
-
"bad_comment_autocollapse": "off",
|
|
553
|
-
"beta": false,
|
|
554
|
-
"clickgadget": true,
|
|
555
|
-
"collapse_read_messages": false,
|
|
556
|
-
"compress": false,
|
|
557
|
-
"country_code": "ZZ",
|
|
558
|
-
"creddit_autorenew": false,
|
|
559
|
-
"default_comment_sort": "new",
|
|
560
|
-
"domain_details": false,
|
|
561
|
-
"email_chat_request": false,
|
|
562
|
-
"email_comment_reply": false,
|
|
563
|
-
"email_community_discovery": false,
|
|
564
|
-
"email_digests": false,
|
|
565
|
-
"email_messages": false,
|
|
566
|
-
"email_new_user_welcome": false,
|
|
567
|
-
"email_post_reply": false,
|
|
568
|
-
"email_private_message": false,
|
|
569
|
-
"email_unsubscribe_all": true,
|
|
570
|
-
"email_upvote_comment": false,
|
|
571
|
-
"email_upvote_post": false,
|
|
572
|
-
"email_user_new_follower": false,
|
|
573
|
-
"email_username_mention": false,
|
|
574
|
-
"enable_default_themes": false,
|
|
575
|
-
"enable_followers": false,
|
|
576
|
-
"feed_recommendations_enabled": false,
|
|
577
|
-
"g": "",
|
|
578
|
-
"hide_ads": true,
|
|
579
|
-
"hide_downs": false,
|
|
580
|
-
"hide_from_robots": true,
|
|
581
|
-
"hide_ups": false,
|
|
582
|
-
"highlight_controversial": false,
|
|
583
|
-
"highlight_new_comments": true,
|
|
584
|
-
"ignore_suggested_sort": true,
|
|
585
|
-
"in_redesign_beta": true,
|
|
586
|
-
"label_nsfw": true,
|
|
587
|
-
"lang": "en",
|
|
588
|
-
"legacy_search": false,
|
|
589
|
-
"live_bar_recommendations_enabled": false,
|
|
590
|
-
"live_orangereds": false,
|
|
591
|
-
"mark_messages_read": true,
|
|
592
|
-
"media": "subreddit",
|
|
593
|
-
"media_preview": "subreddit",
|
|
594
|
-
"min_comment_score": -100,
|
|
595
|
-
"min_link_score": -100,
|
|
596
|
-
"monitor_mentions": true,
|
|
597
|
-
"newwindow": false,
|
|
598
|
-
"nightmode": true,
|
|
599
|
-
"no_profanity": false,
|
|
600
|
-
"num_comments": 500,
|
|
601
|
-
"numsites": 100,
|
|
602
|
-
"organic": null,
|
|
603
|
-
"other_theme": "",
|
|
604
|
-
"over_18": true,
|
|
605
|
-
"private_feeds": true,
|
|
606
|
-
"profile_opt_out": false,
|
|
607
|
-
"public_votes": false,
|
|
608
|
-
"research": false,
|
|
609
|
-
"search_include_over_18": true,
|
|
610
|
-
"send_crosspost_messages": true,
|
|
611
|
-
"send_welcome_messages": true,
|
|
612
|
-
"show_flair": true,
|
|
613
|
-
"show_gold_expiration": true,
|
|
614
|
-
"show_link_flair": true,
|
|
615
|
-
"show_location_based_recommendations": false,
|
|
616
|
-
"show_presence": false,
|
|
617
|
-
"show_promote": false,
|
|
618
|
-
"show_stylesheets": true,
|
|
619
|
-
"show_trending": false,
|
|
620
|
-
"show_twitter": false,
|
|
621
|
-
"sms_notifications_enabled": false,
|
|
622
|
-
"store_visits": false,
|
|
623
|
-
"survey_last_seen_time": null,
|
|
624
|
-
"theme_selector": "",
|
|
625
|
-
"third_party_data_personalized_ads": false,
|
|
626
|
-
"third_party_personalized_ads": false,
|
|
627
|
-
"third_party_site_data_personalized_ads": false,
|
|
628
|
-
"third_party_site_data_personalized_content": false,
|
|
629
|
-
"threaded_messages": true,
|
|
630
|
-
"threaded_modmail": true,
|
|
631
|
-
"top_karma_subreddits": false,
|
|
632
|
-
"use_global_defaults": false,
|
|
633
|
-
"video_autoplay": false,
|
|
634
|
-
"whatsapp_comment_reply": false,
|
|
635
|
-
"whatsapp_enabled": false
|
|
636
|
-
}
|
|
637
|
-
```
|
|
638
|
-
|
|
639
|
-
Returns:
|
|
640
|
-
Any: API response data.
|
|
641
|
-
|
|
642
|
-
Tags:
|
|
643
|
-
account
|
|
644
|
-
"""
|
|
645
|
-
request_body = {
|
|
646
|
-
"accept_pms": accept_pms,
|
|
647
|
-
"activity_relevant_ads": activity_relevant_ads,
|
|
648
|
-
"allow_clicktracking": allow_clicktracking,
|
|
649
|
-
"bad_comment_autocollapse": bad_comment_autocollapse,
|
|
650
|
-
"beta": beta,
|
|
651
|
-
"clickgadget": clickgadget,
|
|
652
|
-
"collapse_read_messages": collapse_read_messages,
|
|
653
|
-
"compress": compress,
|
|
654
|
-
"country_code": country_code,
|
|
655
|
-
"creddit_autorenew": creddit_autorenew,
|
|
656
|
-
"default_comment_sort": default_comment_sort,
|
|
657
|
-
"domain_details": domain_details,
|
|
658
|
-
"email_chat_request": email_chat_request,
|
|
659
|
-
"email_comment_reply": email_comment_reply,
|
|
660
|
-
"email_community_discovery": email_community_discovery,
|
|
661
|
-
"email_digests": email_digests,
|
|
662
|
-
"email_messages": email_messages,
|
|
663
|
-
"email_new_user_welcome": email_new_user_welcome,
|
|
664
|
-
"email_post_reply": email_post_reply,
|
|
665
|
-
"email_private_message": email_private_message,
|
|
666
|
-
"email_unsubscribe_all": email_unsubscribe_all,
|
|
667
|
-
"email_upvote_comment": email_upvote_comment,
|
|
668
|
-
"email_upvote_post": email_upvote_post,
|
|
669
|
-
"email_user_new_follower": email_user_new_follower,
|
|
670
|
-
"email_username_mention": email_username_mention,
|
|
671
|
-
"enable_default_themes": enable_default_themes,
|
|
672
|
-
"enable_followers": enable_followers,
|
|
673
|
-
"feed_recommendations_enabled": feed_recommendations_enabled,
|
|
674
|
-
"g": g,
|
|
675
|
-
"hide_ads": hide_ads,
|
|
676
|
-
"hide_downs": hide_downs,
|
|
677
|
-
"hide_from_robots": hide_from_robots,
|
|
678
|
-
"hide_ups": hide_ups,
|
|
679
|
-
"highlight_controversial": highlight_controversial,
|
|
680
|
-
"highlight_new_comments": highlight_new_comments,
|
|
681
|
-
"ignore_suggested_sort": ignore_suggested_sort,
|
|
682
|
-
"in_redesign_beta": in_redesign_beta,
|
|
683
|
-
"label_nsfw": label_nsfw,
|
|
684
|
-
"lang": lang,
|
|
685
|
-
"legacy_search": legacy_search,
|
|
686
|
-
"live_bar_recommendations_enabled": live_bar_recommendations_enabled,
|
|
687
|
-
"live_orangereds": live_orangereds,
|
|
688
|
-
"mark_messages_read": mark_messages_read,
|
|
689
|
-
"media": media,
|
|
690
|
-
"media_preview": media_preview,
|
|
691
|
-
"min_comment_score": min_comment_score,
|
|
692
|
-
"min_link_score": min_link_score,
|
|
693
|
-
"monitor_mentions": monitor_mentions,
|
|
694
|
-
"newwindow": newwindow,
|
|
695
|
-
"nightmode": nightmode,
|
|
696
|
-
"no_profanity": no_profanity,
|
|
697
|
-
"num_comments": num_comments,
|
|
698
|
-
"numsites": numsites,
|
|
699
|
-
"organic": organic,
|
|
700
|
-
"other_theme": other_theme,
|
|
701
|
-
"over_18": over_18,
|
|
702
|
-
"private_feeds": private_feeds,
|
|
703
|
-
"profile_opt_out": profile_opt_out,
|
|
704
|
-
"public_votes": public_votes,
|
|
705
|
-
"research": research,
|
|
706
|
-
"search_include_over_18": search_include_over_18,
|
|
707
|
-
"send_crosspost_messages": send_crosspost_messages,
|
|
708
|
-
"send_welcome_messages": send_welcome_messages,
|
|
709
|
-
"show_flair": show_flair,
|
|
710
|
-
"show_gold_expiration": show_gold_expiration,
|
|
711
|
-
"show_link_flair": show_link_flair,
|
|
712
|
-
"show_location_based_recommendations": show_location_based_recommendations,
|
|
713
|
-
"show_presence": show_presence,
|
|
714
|
-
"show_promote": show_promote,
|
|
715
|
-
"show_stylesheets": show_stylesheets,
|
|
716
|
-
"show_trending": show_trending,
|
|
717
|
-
"show_twitter": show_twitter,
|
|
718
|
-
"sms_notifications_enabled": sms_notifications_enabled,
|
|
719
|
-
"store_visits": store_visits,
|
|
720
|
-
"survey_last_seen_time": survey_last_seen_time,
|
|
721
|
-
"theme_selector": theme_selector,
|
|
722
|
-
"third_party_data_personalized_ads": third_party_data_personalized_ads,
|
|
723
|
-
"third_party_personalized_ads": third_party_personalized_ads,
|
|
724
|
-
"third_party_site_data_personalized_ads": third_party_site_data_personalized_ads,
|
|
725
|
-
"third_party_site_data_personalized_content": third_party_site_data_personalized_content,
|
|
726
|
-
"threaded_messages": threaded_messages,
|
|
727
|
-
"threaded_modmail": threaded_modmail,
|
|
728
|
-
"top_karma_subreddits": top_karma_subreddits,
|
|
729
|
-
"use_global_defaults": use_global_defaults,
|
|
730
|
-
"video_autoplay": video_autoplay,
|
|
731
|
-
"whatsapp_comment_reply": whatsapp_comment_reply,
|
|
732
|
-
"whatsapp_enabled": whatsapp_enabled,
|
|
733
|
-
}
|
|
734
|
-
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
735
|
-
url = f"{self.base_url}/api/v1/me/prefs"
|
|
736
|
-
query_params = {}
|
|
737
|
-
response = self._patch(url, data=request_body, params=query_params)
|
|
738
|
-
response.raise_for_status()
|
|
739
|
-
return response.json()
|
|
740
|
-
|
|
741
|
-
def api_v1_me_trophies(self) -> Any:
|
|
742
|
-
"""
|
|
743
|
-
Get the current user's trophies.
|
|
744
|
-
|
|
745
|
-
Returns:
|
|
746
|
-
Any: API response data.
|
|
747
|
-
|
|
748
|
-
Tags:
|
|
749
|
-
account
|
|
750
|
-
"""
|
|
751
|
-
url = f"{self.base_url}/api/v1/me/trophies"
|
|
752
|
-
query_params = {}
|
|
753
|
-
response = self._get(url, params=query_params)
|
|
754
|
-
response.raise_for_status()
|
|
755
|
-
return response.json()
|
|
756
|
-
|
|
757
|
-
def prefs_friends(
|
|
758
|
-
self, after=None, before=None, count=None, limit=None, show=None, sr_detail=None
|
|
759
|
-
) -> Any:
|
|
760
|
-
"""
|
|
761
|
-
Get the current user's friends.
|
|
762
|
-
|
|
763
|
-
Args:
|
|
764
|
-
after (string): fullname of a thing
|
|
765
|
-
before (string): fullname of a thing
|
|
766
|
-
count (string): a positive integer (default: 0)
|
|
767
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
768
|
-
show (string): (optional) the string "all"
|
|
769
|
-
sr_detail (string): (optional) expand subreddits
|
|
770
|
-
|
|
771
|
-
Returns:
|
|
772
|
-
Any: API response data.
|
|
773
|
-
|
|
774
|
-
Tags:
|
|
775
|
-
account
|
|
776
|
-
"""
|
|
777
|
-
url = f"{self.base_url}/prefs/friends"
|
|
778
|
-
query_params = {
|
|
779
|
-
k: v
|
|
780
|
-
for k, v in [
|
|
781
|
-
("after", after),
|
|
782
|
-
("before", before),
|
|
783
|
-
("count", count),
|
|
784
|
-
("limit", limit),
|
|
785
|
-
("show", show),
|
|
786
|
-
("sr_detail", sr_detail),
|
|
787
|
-
]
|
|
788
|
-
if v is not None
|
|
789
|
-
}
|
|
790
|
-
response = self._get(url, params=query_params)
|
|
791
|
-
response.raise_for_status()
|
|
792
|
-
return response.json()
|
|
793
|
-
|
|
794
|
-
def prefs_blocked(
|
|
795
|
-
self, after=None, before=None, count=None, limit=None, show=None, sr_detail=None
|
|
796
|
-
) -> Any:
|
|
797
|
-
"""
|
|
798
|
-
Get the current user's blocked users.
|
|
799
|
-
|
|
800
|
-
Args:
|
|
801
|
-
after (string): fullname of a thing
|
|
802
|
-
before (string): fullname of a thing
|
|
803
|
-
count (string): a positive integer (default: 0)
|
|
804
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
805
|
-
show (string): (optional) the string "all"
|
|
806
|
-
sr_detail (string): (optional) expand subreddits
|
|
807
|
-
|
|
808
|
-
Returns:
|
|
809
|
-
Any: API response data.
|
|
810
|
-
|
|
811
|
-
Tags:
|
|
812
|
-
account
|
|
813
|
-
"""
|
|
814
|
-
url = f"{self.base_url}/prefs/blocked"
|
|
815
|
-
query_params = {
|
|
816
|
-
k: v
|
|
817
|
-
for k, v in [
|
|
818
|
-
("after", after),
|
|
819
|
-
("before", before),
|
|
820
|
-
("count", count),
|
|
821
|
-
("limit", limit),
|
|
822
|
-
("show", show),
|
|
823
|
-
("sr_detail", sr_detail),
|
|
824
|
-
]
|
|
825
|
-
if v is not None
|
|
826
|
-
}
|
|
827
|
-
response = self._get(url, params=query_params)
|
|
828
|
-
response.raise_for_status()
|
|
829
|
-
return response.json()
|
|
830
|
-
|
|
831
|
-
def prefs_messaging(
|
|
832
|
-
self, after=None, before=None, count=None, limit=None, show=None, sr_detail=None
|
|
833
|
-
) -> Any:
|
|
834
|
-
"""
|
|
835
|
-
Get the current user's messaging preferences.
|
|
836
|
-
|
|
837
|
-
Args:
|
|
838
|
-
after (string): fullname of a thing
|
|
839
|
-
before (string): fullname of a thing
|
|
840
|
-
count (string): a positive integer (default: 0)
|
|
841
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
842
|
-
show (string): (optional) the string "all"
|
|
843
|
-
sr_detail (string): (optional) expand subreddits
|
|
844
|
-
|
|
845
|
-
Returns:
|
|
846
|
-
Any: API response data.
|
|
847
|
-
|
|
848
|
-
Tags:
|
|
849
|
-
account
|
|
850
|
-
"""
|
|
851
|
-
url = f"{self.base_url}/prefs/messaging"
|
|
852
|
-
query_params = {
|
|
853
|
-
k: v
|
|
854
|
-
for k, v in [
|
|
855
|
-
("after", after),
|
|
856
|
-
("before", before),
|
|
857
|
-
("count", count),
|
|
858
|
-
("limit", limit),
|
|
859
|
-
("show", show),
|
|
860
|
-
("sr_detail", sr_detail),
|
|
861
|
-
]
|
|
862
|
-
if v is not None
|
|
863
|
-
}
|
|
864
|
-
response = self._get(url, params=query_params)
|
|
865
|
-
response.raise_for_status()
|
|
866
|
-
return response.json()
|
|
867
|
-
|
|
868
|
-
def prefs_trusted(
|
|
869
|
-
self, after=None, before=None, count=None, limit=None, show=None, sr_detail=None
|
|
870
|
-
) -> Any:
|
|
871
|
-
"""
|
|
872
|
-
Get the current user's trusted users.
|
|
873
|
-
|
|
874
|
-
Args:
|
|
875
|
-
after (string): fullname of a thing
|
|
876
|
-
before (string): fullname of a thing
|
|
877
|
-
count (string): a positive integer (default: 0)
|
|
878
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
879
|
-
show (string): (optional) the string "all"
|
|
880
|
-
sr_detail (string): (optional) expand subreddits
|
|
881
|
-
|
|
882
|
-
Returns:
|
|
883
|
-
Any: API response data.
|
|
884
|
-
|
|
885
|
-
Tags:
|
|
886
|
-
account
|
|
887
|
-
"""
|
|
888
|
-
url = f"{self.base_url}/prefs/trusted"
|
|
889
|
-
query_params = {
|
|
890
|
-
k: v
|
|
891
|
-
for k, v in [
|
|
892
|
-
("after", after),
|
|
893
|
-
("before", before),
|
|
894
|
-
("count", count),
|
|
895
|
-
("limit", limit),
|
|
896
|
-
("show", show),
|
|
897
|
-
("sr_detail", sr_detail),
|
|
898
|
-
]
|
|
899
|
-
if v is not None
|
|
900
|
-
}
|
|
901
|
-
response = self._get(url, params=query_params)
|
|
902
|
-
response.raise_for_status()
|
|
903
|
-
return response.json()
|
|
904
|
-
|
|
905
|
-
def api_needs_captcha(self) -> Any:
|
|
906
|
-
"""
|
|
907
|
-
Check if the current user needs a captcha.
|
|
908
|
-
|
|
909
|
-
Returns:
|
|
910
|
-
Any: API response data.
|
|
911
|
-
|
|
912
|
-
Tags:
|
|
913
|
-
captcha
|
|
914
|
-
"""
|
|
915
|
-
url = f"{self.base_url}/api/needs_captcha"
|
|
916
|
-
query_params = {}
|
|
917
|
-
response = self._get(url, params=query_params)
|
|
918
|
-
response.raise_for_status()
|
|
919
|
-
return response.json()
|
|
920
|
-
|
|
921
|
-
def api_v1_collections_collection(
|
|
922
|
-
self, collection_id=None, include_links=None
|
|
923
|
-
) -> Any:
|
|
924
|
-
"""
|
|
925
|
-
Get a collection by ID.
|
|
926
|
-
|
|
927
|
-
Args:
|
|
928
|
-
collection_id (string): the UUID of a collection
|
|
929
|
-
include_links (string): boolean value(true, false)
|
|
930
|
-
|
|
931
|
-
Returns:
|
|
932
|
-
Any: API response data.
|
|
933
|
-
|
|
934
|
-
Tags:
|
|
935
|
-
collections
|
|
936
|
-
"""
|
|
937
|
-
url = f"{self.base_url}/api/v1/collections/collection"
|
|
938
|
-
query_params = {
|
|
939
|
-
k: v
|
|
940
|
-
for k, v in [
|
|
941
|
-
("collection_id", collection_id),
|
|
942
|
-
("include_links", include_links),
|
|
943
|
-
]
|
|
944
|
-
if v is not None
|
|
945
|
-
}
|
|
946
|
-
response = self._get(url, params=query_params)
|
|
947
|
-
response.raise_for_status()
|
|
948
|
-
return response.json()
|
|
949
|
-
|
|
950
|
-
def api_v1_collections_subreddit_collections(self) -> Any:
|
|
951
|
-
"""
|
|
952
|
-
Get the current user's subreddit collections.
|
|
953
|
-
|
|
954
|
-
Returns:
|
|
955
|
-
Any: API response data.
|
|
956
|
-
|
|
957
|
-
Tags:
|
|
958
|
-
collections
|
|
959
|
-
"""
|
|
960
|
-
url = f"{self.base_url}/api/v1/collections/subreddit_collections"
|
|
961
|
-
query_params = {}
|
|
962
|
-
response = self._get(url, params=query_params)
|
|
963
|
-
response.raise_for_status()
|
|
964
|
-
return response.json()
|
|
965
|
-
|
|
966
|
-
def api_v1_subreddit_emoji_emoji_name(self, subreddit, emoji_name) -> Any:
|
|
967
|
-
"""
|
|
968
|
-
Get an emoji by name.
|
|
969
|
-
|
|
970
|
-
Args:
|
|
971
|
-
subreddit (string): subreddit
|
|
972
|
-
emoji_name (string): emoji_name
|
|
973
|
-
|
|
974
|
-
Returns:
|
|
975
|
-
Any: API response data.
|
|
976
|
-
|
|
977
|
-
Tags:
|
|
978
|
-
emoji
|
|
979
|
-
"""
|
|
980
|
-
if subreddit is None:
|
|
981
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
982
|
-
if emoji_name is None:
|
|
983
|
-
raise ValueError("Missing required parameter 'emoji_name'")
|
|
984
|
-
url = f"{self.base_url}/api/v1/{subreddit}/emoji/{emoji_name}"
|
|
985
|
-
query_params = {}
|
|
986
|
-
response = self._delete(url, params=query_params)
|
|
987
|
-
response.raise_for_status()
|
|
988
|
-
return response.json()
|
|
989
|
-
|
|
990
|
-
def api_v1_subreddit_emojis_all(self, subreddit) -> Any:
|
|
991
|
-
"""
|
|
992
|
-
Get all emojis for a subreddit.
|
|
993
|
-
|
|
994
|
-
Args:
|
|
995
|
-
subreddit (string): subreddit
|
|
996
|
-
|
|
997
|
-
Returns:
|
|
998
|
-
Any: API response data.
|
|
999
|
-
|
|
1000
|
-
Tags:
|
|
1001
|
-
emoji
|
|
1002
|
-
"""
|
|
1003
|
-
if subreddit is None:
|
|
1004
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1005
|
-
url = f"{self.base_url}/api/v1/{subreddit}/emojis/all"
|
|
1006
|
-
query_params = {}
|
|
1007
|
-
response = self._get(url, params=query_params)
|
|
1008
|
-
response.raise_for_status()
|
|
1009
|
-
return response.json()
|
|
1010
|
-
|
|
1011
|
-
def r_subreddit_api_flair(self, subreddit) -> Any:
|
|
1012
|
-
"""
|
|
1013
|
-
Get the current user's flair for a subreddit.
|
|
1014
|
-
|
|
1015
|
-
Args:
|
|
1016
|
-
subreddit (string): subreddit
|
|
1017
|
-
|
|
1018
|
-
Returns:
|
|
1019
|
-
Any: API response data.
|
|
1020
|
-
|
|
1021
|
-
Tags:
|
|
1022
|
-
flair
|
|
1023
|
-
"""
|
|
1024
|
-
if subreddit is None:
|
|
1025
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1026
|
-
url = f"{self.base_url}/r/{subreddit}/api/flair"
|
|
1027
|
-
query_params = {}
|
|
1028
|
-
response = self._get(url, params=query_params)
|
|
1029
|
-
response.raise_for_status()
|
|
1030
|
-
return response.json()
|
|
1031
|
-
|
|
1032
|
-
def r_subreddit_api_flairlist(
|
|
1033
|
-
self,
|
|
1034
|
-
subreddit,
|
|
1035
|
-
after=None,
|
|
1036
|
-
before=None,
|
|
1037
|
-
count=None,
|
|
1038
|
-
limit=None,
|
|
1039
|
-
name=None,
|
|
1040
|
-
show=None,
|
|
1041
|
-
sr_detail=None,
|
|
1042
|
-
) -> Any:
|
|
1043
|
-
"""
|
|
1044
|
-
Get the current user's flair list for a subreddit.
|
|
1045
|
-
|
|
1046
|
-
Args:
|
|
1047
|
-
subreddit (string): subreddit
|
|
1048
|
-
after (string): fullname of a thing
|
|
1049
|
-
before (string): fullname of a thing
|
|
1050
|
-
count (string): a positive integer (default: 0)
|
|
1051
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 1000)
|
|
1052
|
-
name (string): a user by name
|
|
1053
|
-
show (string): (optional) the string "all" Example: 'all'.
|
|
1054
|
-
sr_detail (string): (optional) expand subreddits
|
|
1055
|
-
|
|
1056
|
-
Returns:
|
|
1057
|
-
Any: API response data.
|
|
1058
|
-
|
|
1059
|
-
Tags:
|
|
1060
|
-
flair
|
|
1061
|
-
"""
|
|
1062
|
-
if subreddit is None:
|
|
1063
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1064
|
-
url = f"{self.base_url}/r/{subreddit}/api/flairlist"
|
|
1065
|
-
query_params = {
|
|
1066
|
-
k: v
|
|
1067
|
-
for k, v in [
|
|
1068
|
-
("after", after),
|
|
1069
|
-
("before", before),
|
|
1070
|
-
("count", count),
|
|
1071
|
-
("limit", limit),
|
|
1072
|
-
("name", name),
|
|
1073
|
-
("show", show),
|
|
1074
|
-
("sr_detail", sr_detail),
|
|
1075
|
-
]
|
|
1076
|
-
if v is not None
|
|
1077
|
-
}
|
|
1078
|
-
response = self._get(url, params=query_params)
|
|
1079
|
-
response.raise_for_status()
|
|
1080
|
-
return response.json()
|
|
1081
|
-
|
|
1082
|
-
def r_subreddit_api_link_flair(self, subreddit) -> Any:
|
|
1083
|
-
"""
|
|
1084
|
-
Get the current user's link flair for a subreddit.
|
|
1085
|
-
|
|
1086
|
-
Args:
|
|
1087
|
-
subreddit (string): subreddit
|
|
1088
|
-
|
|
1089
|
-
Returns:
|
|
1090
|
-
Any: API response data.
|
|
1091
|
-
|
|
1092
|
-
Tags:
|
|
1093
|
-
flair
|
|
1094
|
-
"""
|
|
1095
|
-
if subreddit is None:
|
|
1096
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1097
|
-
url = f"{self.base_url}/r/{subreddit}/api/link_flair"
|
|
1098
|
-
query_params = {}
|
|
1099
|
-
response = self._get(url, params=query_params)
|
|
1100
|
-
response.raise_for_status()
|
|
1101
|
-
return response.json()
|
|
1102
|
-
|
|
1103
|
-
def r_subreddit_api_link_flair_v2(self, subreddit) -> Any:
|
|
1104
|
-
"""
|
|
1105
|
-
Get the current user's link flair for a subreddit.
|
|
1106
|
-
|
|
1107
|
-
Args:
|
|
1108
|
-
subreddit (string): subreddit
|
|
1109
|
-
|
|
1110
|
-
Returns:
|
|
1111
|
-
Any: API response data.
|
|
1112
|
-
|
|
1113
|
-
Tags:
|
|
1114
|
-
flair
|
|
1115
|
-
"""
|
|
1116
|
-
if subreddit is None:
|
|
1117
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1118
|
-
url = f"{self.base_url}/r/{subreddit}/api/link_flair_v2"
|
|
1119
|
-
query_params = {}
|
|
1120
|
-
response = self._get(url, params=query_params)
|
|
1121
|
-
response.raise_for_status()
|
|
1122
|
-
return response.json()
|
|
1123
|
-
|
|
1124
|
-
def r_subreddit_api_user_flair(self, subreddit) -> Any:
|
|
1125
|
-
"""
|
|
1126
|
-
Get the current user's user flair for a subreddit.
|
|
1127
|
-
|
|
1128
|
-
Args:
|
|
1129
|
-
subreddit (string): subreddit
|
|
1130
|
-
|
|
1131
|
-
Returns:
|
|
1132
|
-
Any: API response data.
|
|
1133
|
-
|
|
1134
|
-
Tags:
|
|
1135
|
-
flair
|
|
1136
|
-
"""
|
|
1137
|
-
if subreddit is None:
|
|
1138
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1139
|
-
url = f"{self.base_url}/r/{subreddit}/api/user_flair"
|
|
1140
|
-
query_params = {}
|
|
1141
|
-
response = self._get(url, params=query_params)
|
|
1142
|
-
response.raise_for_status()
|
|
1143
|
-
return response.json()
|
|
1144
|
-
|
|
1145
|
-
def r_subreddit_api_user_flair_v2(self, subreddit) -> Any:
|
|
1146
|
-
"""
|
|
1147
|
-
Get the current user's user flair for a subreddit.
|
|
1148
|
-
|
|
1149
|
-
Args:
|
|
1150
|
-
subreddit (string): subreddit
|
|
1151
|
-
|
|
1152
|
-
Returns:
|
|
1153
|
-
Any: API response data.
|
|
1154
|
-
|
|
1155
|
-
Tags:
|
|
1156
|
-
flair
|
|
1157
|
-
"""
|
|
1158
|
-
if subreddit is None:
|
|
1159
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1160
|
-
url = f"{self.base_url}/r/{subreddit}/api/user_flair_v2"
|
|
1161
|
-
query_params = {}
|
|
1162
|
-
response = self._get(url, params=query_params)
|
|
1163
|
-
response.raise_for_status()
|
|
1164
|
-
return response.json()
|
|
1165
|
-
|
|
1166
|
-
def api_info(self, id=None, sr_name=None, url=None) -> Any:
|
|
1167
|
-
"""
|
|
1168
|
-
Get information about a link or comment.
|
|
1169
|
-
|
|
1170
|
-
Args:
|
|
1171
|
-
id (string): A comma-separated list of thing fullnames
|
|
1172
|
-
sr_name (string): A comma-separated list of subreddit names
|
|
1173
|
-
url (string): a valid URL
|
|
1174
|
-
|
|
1175
|
-
Returns:
|
|
1176
|
-
Any: API response data.
|
|
1177
|
-
|
|
1178
|
-
Tags:
|
|
1179
|
-
links & comments
|
|
1180
|
-
"""
|
|
1181
|
-
url = f"{self.base_url}/api/info"
|
|
1182
|
-
query_params = {
|
|
1183
|
-
k: v
|
|
1184
|
-
for k, v in [("id", id), ("sr_name", sr_name), ("url", url)]
|
|
1185
|
-
if v is not None
|
|
1186
|
-
}
|
|
1187
|
-
response = self._get(url, params=query_params)
|
|
1188
|
-
response.raise_for_status()
|
|
1189
|
-
return response.json()
|
|
1190
|
-
|
|
1191
|
-
def r_subreddit_api_info(self, subreddit, id=None, sr_name=None, url=None) -> Any:
|
|
1192
|
-
"""
|
|
1193
|
-
Get information about a link or comment in a subreddit.
|
|
1194
|
-
|
|
1195
|
-
Args:
|
|
1196
|
-
subreddit (string): subreddit
|
|
1197
|
-
id (string): A comma-separated list of thing fullnames
|
|
1198
|
-
sr_name (string): A comma-separated list of subreddit names
|
|
1199
|
-
url (string): a valid URL
|
|
1200
|
-
|
|
1201
|
-
Returns:
|
|
1202
|
-
Any: API response data.
|
|
1203
|
-
|
|
1204
|
-
Tags:
|
|
1205
|
-
links & comments
|
|
1206
|
-
"""
|
|
1207
|
-
if subreddit is None:
|
|
1208
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1209
|
-
url = f"{self.base_url}/{subreddit}/api/info"
|
|
1210
|
-
query_params = {
|
|
1211
|
-
k: v
|
|
1212
|
-
for k, v in [("id", id), ("sr_name", sr_name), ("url", url)]
|
|
1213
|
-
if v is not None
|
|
1214
|
-
}
|
|
1215
|
-
response = self._get(url, params=query_params)
|
|
1216
|
-
response.raise_for_status()
|
|
1217
|
-
return response.json()
|
|
1218
|
-
|
|
1219
|
-
def api_morechildren(
|
|
1220
|
-
self,
|
|
1221
|
-
api_type=None,
|
|
1222
|
-
children=None,
|
|
1223
|
-
depth=None,
|
|
1224
|
-
id=None,
|
|
1225
|
-
limit_children=None,
|
|
1226
|
-
link_id=None,
|
|
1227
|
-
sort=None,
|
|
1228
|
-
) -> Any:
|
|
1229
|
-
"""
|
|
1230
|
-
Get more children for a link or comment.
|
|
1231
|
-
|
|
1232
|
-
Args:
|
|
1233
|
-
api_type (string): the string "json" Example: 'json'.
|
|
1234
|
-
children (string): No description provided.
|
|
1235
|
-
depth (string): (optional) an integer
|
|
1236
|
-
id (string): (optional) id of the associated MoreChildren object
|
|
1237
|
-
limit_children (string): boolean value (true, false)
|
|
1238
|
-
link_id (string): fullname of a link
|
|
1239
|
-
sort (string): one of (confidence, top, new, controversial, old, random, qa, live)
|
|
1240
|
-
|
|
1241
|
-
Returns:
|
|
1242
|
-
Any: API response data.
|
|
1243
|
-
|
|
1244
|
-
Tags:
|
|
1245
|
-
links & comments
|
|
1246
|
-
"""
|
|
1247
|
-
url = f"{self.base_url}/api/morechildren"
|
|
1248
|
-
query_params = {
|
|
1249
|
-
k: v
|
|
1250
|
-
for k, v in [
|
|
1251
|
-
("api_type", api_type),
|
|
1252
|
-
("children", children),
|
|
1253
|
-
("depth", depth),
|
|
1254
|
-
("id", id),
|
|
1255
|
-
("limit_children", limit_children),
|
|
1256
|
-
("link_id", link_id),
|
|
1257
|
-
("sort", sort),
|
|
1258
|
-
]
|
|
1259
|
-
if v is not None
|
|
1260
|
-
}
|
|
1261
|
-
response = self._get(url, params=query_params)
|
|
1262
|
-
response.raise_for_status()
|
|
1263
|
-
return response.json()
|
|
1264
|
-
|
|
1265
|
-
def api_saved_categories(self) -> Any:
|
|
1266
|
-
"""
|
|
1267
|
-
Get the current user's saved categories.
|
|
1268
|
-
|
|
1269
|
-
Returns:
|
|
1270
|
-
Any: API response data.
|
|
1271
|
-
|
|
1272
|
-
Tags:
|
|
1273
|
-
links & comments
|
|
1274
|
-
"""
|
|
1275
|
-
url = f"{self.base_url}/api/saved_categories"
|
|
1276
|
-
query_params = {}
|
|
1277
|
-
response = self._get(url, params=query_params)
|
|
1278
|
-
response.raise_for_status()
|
|
1279
|
-
return response.json()
|
|
1280
|
-
|
|
1281
|
-
def req(self) -> Any:
|
|
1282
|
-
"""
|
|
1283
|
-
Get the current user's requests.
|
|
1284
|
-
|
|
1285
|
-
Returns:
|
|
1286
|
-
Any: API response data.
|
|
1287
|
-
|
|
1288
|
-
Tags:
|
|
1289
|
-
listings
|
|
1290
|
-
"""
|
|
1291
|
-
url = f"{self.base_url}/req"
|
|
1292
|
-
query_params = {}
|
|
1293
|
-
response = self._get(url, params=query_params)
|
|
1294
|
-
response.raise_for_status()
|
|
1295
|
-
return response.json()
|
|
1296
|
-
|
|
1297
|
-
def best(
|
|
1298
|
-
self, after=None, before=None, count=None, limit=None, show=None, sr_detail=None
|
|
1299
|
-
) -> Any:
|
|
1300
|
-
"""
|
|
1301
|
-
Get the best posts.
|
|
1302
|
-
|
|
1303
|
-
Args:
|
|
1304
|
-
after (string): fullname of a thing
|
|
1305
|
-
before (string): fullname of a thing
|
|
1306
|
-
count (string): a positive integer (default: 0)
|
|
1307
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1308
|
-
show (string): (optional) the string all
|
|
1309
|
-
sr_detail (string): (optional) expand subreddits
|
|
1310
|
-
|
|
1311
|
-
Returns:
|
|
1312
|
-
Any: API response data.
|
|
1313
|
-
|
|
1314
|
-
Tags:
|
|
1315
|
-
listings
|
|
1316
|
-
"""
|
|
1317
|
-
url = f"{self.base_url}/best"
|
|
1318
|
-
query_params = {
|
|
1319
|
-
k: v
|
|
1320
|
-
for k, v in [
|
|
1321
|
-
("after", after),
|
|
1322
|
-
("before", before),
|
|
1323
|
-
("count", count),
|
|
1324
|
-
("limit", limit),
|
|
1325
|
-
("show", show),
|
|
1326
|
-
("sr_detail", sr_detail),
|
|
1327
|
-
]
|
|
1328
|
-
if v is not None
|
|
1329
|
-
}
|
|
1330
|
-
response = self._get(url, params=query_params)
|
|
1331
|
-
response.raise_for_status()
|
|
1332
|
-
return response.json()
|
|
1333
|
-
|
|
1334
|
-
def by_id_names(self, names) -> Any:
|
|
1335
|
-
"""
|
|
1336
|
-
Get posts by ID.
|
|
1337
|
-
|
|
1338
|
-
Args:
|
|
1339
|
-
names (string): names
|
|
1340
|
-
|
|
1341
|
-
Returns:
|
|
1342
|
-
Any: API response data.
|
|
1343
|
-
|
|
1344
|
-
Tags:
|
|
1345
|
-
listings
|
|
1346
|
-
"""
|
|
1347
|
-
if names is None:
|
|
1348
|
-
raise ValueError("Missing required parameter 'names'")
|
|
1349
|
-
url = f"{self.base_url}/by_id/{names}"
|
|
1350
|
-
query_params = {}
|
|
1351
|
-
response = self._get(url, params=query_params)
|
|
1352
|
-
response.raise_for_status()
|
|
1353
|
-
return response.json()
|
|
1354
|
-
|
|
1355
|
-
def comments_article(
|
|
1356
|
-
self,
|
|
1357
|
-
article,
|
|
1358
|
-
comment=None,
|
|
1359
|
-
context=None,
|
|
1360
|
-
depth=None,
|
|
1361
|
-
limit=None,
|
|
1362
|
-
showedits=None,
|
|
1363
|
-
showmedia=None,
|
|
1364
|
-
showmore=None,
|
|
1365
|
-
showtitle=None,
|
|
1366
|
-
sort=None,
|
|
1367
|
-
sr_detail=None,
|
|
1368
|
-
theme=None,
|
|
1369
|
-
threaded=None,
|
|
1370
|
-
truncate=None,
|
|
1371
|
-
) -> Any:
|
|
1372
|
-
"""
|
|
1373
|
-
Get comments for a post.
|
|
1374
|
-
|
|
1375
|
-
Args:
|
|
1376
|
-
article (string): article
|
|
1377
|
-
comment (string): (optional) ID36 of a comment
|
|
1378
|
-
context (string): an integer between 0 and 8
|
|
1379
|
-
depth (string): (optional) an integer
|
|
1380
|
-
limit (string): (optional) an integer
|
|
1381
|
-
showedits (string): boolean value (true, false)
|
|
1382
|
-
showmedia (string): boolean value (true, false)
|
|
1383
|
-
showmore (string): boolean value (true, false)
|
|
1384
|
-
showtitle (string): boolean value (true, false)
|
|
1385
|
-
sort (string): one of (confidence, top, new, controversial, old, random, qa, live)
|
|
1386
|
-
sr_detail (string): (optional) expand subreddits
|
|
1387
|
-
theme (string): one of (default, dark)
|
|
1388
|
-
threaded (string): boolean value (true, false)
|
|
1389
|
-
truncate (string): an integer between 0 and 50
|
|
1390
|
-
|
|
1391
|
-
Returns:
|
|
1392
|
-
Any: API response data.
|
|
1393
|
-
|
|
1394
|
-
Tags:
|
|
1395
|
-
listings
|
|
1396
|
-
"""
|
|
1397
|
-
if article is None:
|
|
1398
|
-
raise ValueError("Missing required parameter 'article'")
|
|
1399
|
-
url = f"{self.base_url}/comments/{article}"
|
|
1400
|
-
query_params = {
|
|
1401
|
-
k: v
|
|
1402
|
-
for k, v in [
|
|
1403
|
-
("comment", comment),
|
|
1404
|
-
("context", context),
|
|
1405
|
-
("depth", depth),
|
|
1406
|
-
("limit", limit),
|
|
1407
|
-
("showedits", showedits),
|
|
1408
|
-
("showmedia", showmedia),
|
|
1409
|
-
("showmore", showmore),
|
|
1410
|
-
("showtitle", showtitle),
|
|
1411
|
-
("sort", sort),
|
|
1412
|
-
("sr_detail", sr_detail),
|
|
1413
|
-
("theme", theme),
|
|
1414
|
-
("threaded", threaded),
|
|
1415
|
-
("truncate", truncate),
|
|
1416
|
-
]
|
|
1417
|
-
if v is not None
|
|
1418
|
-
}
|
|
1419
|
-
response = self._get(url, params=query_params)
|
|
1420
|
-
response.raise_for_status()
|
|
1421
|
-
return response.json()
|
|
1422
|
-
|
|
1423
|
-
def get_post_comments_details(self, post_id: str) -> Any:
|
|
1424
|
-
"""
|
|
1425
|
-
Get post details and comments like title, author, score, etc.
|
|
1426
|
-
|
|
1427
|
-
Args:
|
|
1428
|
-
post_id (string): The Reddit post ID ( e.g. '1m734tx' for https://www.reddit.com/r/mcp/comments/1m734tx/comment/n4occ77/)
|
|
1429
|
-
|
|
1430
|
-
Returns:
|
|
1431
|
-
Any: API response data containing post details and comments.
|
|
1432
|
-
|
|
1433
|
-
Tags:
|
|
1434
|
-
listings, comments, posts, important
|
|
1435
|
-
"""
|
|
1436
|
-
|
|
1437
|
-
url = f"{self.base_url}/comments/{post_id}.json"
|
|
1438
|
-
query_params = {}
|
|
1439
|
-
response = self._get(url, params=query_params)
|
|
1440
|
-
return self._handle_response(response)
|
|
1441
|
-
|
|
1442
|
-
def controversial(
|
|
1443
|
-
self, after=None, before=None, count=None, limit=None, show=None, sr_detail=None
|
|
1444
|
-
) -> Any:
|
|
1445
|
-
"""
|
|
1446
|
-
Get the most controversial posts.
|
|
1447
|
-
|
|
1448
|
-
Args:
|
|
1449
|
-
after (string): fullname of a thing
|
|
1450
|
-
before (string): fullname of a thing
|
|
1451
|
-
count (string): a positive integer (default: 0)
|
|
1452
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1453
|
-
show (string): (optional) the string "all"
|
|
1454
|
-
sr_detail (string): (optional) expand subreddits
|
|
1455
|
-
|
|
1456
|
-
Returns:
|
|
1457
|
-
Any: API response data.
|
|
1458
|
-
|
|
1459
|
-
Tags:
|
|
1460
|
-
listings
|
|
1461
|
-
"""
|
|
1462
|
-
url = f"{self.base_url}/controversial"
|
|
1463
|
-
query_params = {
|
|
1464
|
-
k: v
|
|
1465
|
-
for k, v in [
|
|
1466
|
-
("after", after),
|
|
1467
|
-
("before", before),
|
|
1468
|
-
("count", count),
|
|
1469
|
-
("limit", limit),
|
|
1470
|
-
("show", show),
|
|
1471
|
-
("sr_detail", sr_detail),
|
|
1472
|
-
]
|
|
1473
|
-
if v is not None
|
|
1474
|
-
}
|
|
1475
|
-
response = self._get(url, params=query_params)
|
|
1476
|
-
response.raise_for_status()
|
|
1477
|
-
return response.json()
|
|
1478
|
-
|
|
1479
|
-
def duplicates_article(
|
|
1480
|
-
self,
|
|
1481
|
-
article,
|
|
1482
|
-
after=None,
|
|
1483
|
-
before=None,
|
|
1484
|
-
count=None,
|
|
1485
|
-
crossposts_only=None,
|
|
1486
|
-
limit=None,
|
|
1487
|
-
show=None,
|
|
1488
|
-
sort=None,
|
|
1489
|
-
sr=None,
|
|
1490
|
-
sr_detail=None,
|
|
1491
|
-
) -> Any:
|
|
1492
|
-
"""
|
|
1493
|
-
Get duplicate posts.
|
|
1494
|
-
|
|
1495
|
-
Args:
|
|
1496
|
-
article (string): article
|
|
1497
|
-
after (string): fullname of a thing
|
|
1498
|
-
before (string): fullname of a thing
|
|
1499
|
-
count (string): a positive integer (default: 0)
|
|
1500
|
-
crossposts_only (string): boolean value (true, false)
|
|
1501
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1502
|
-
show (string): (optional) the string "all"
|
|
1503
|
-
sort (string): one of (num_comments, new)
|
|
1504
|
-
sr (string): subreddit name
|
|
1505
|
-
sr_detail (string): (optional) expand subreddits
|
|
1506
|
-
|
|
1507
|
-
Returns:
|
|
1508
|
-
Any: API response data.
|
|
1509
|
-
|
|
1510
|
-
Tags:
|
|
1511
|
-
listings
|
|
1512
|
-
"""
|
|
1513
|
-
if article is None:
|
|
1514
|
-
raise ValueError("Missing required parameter 'article'")
|
|
1515
|
-
url = f"{self.base_url}/duplicates/{article}"
|
|
1516
|
-
query_params = {
|
|
1517
|
-
k: v
|
|
1518
|
-
for k, v in [
|
|
1519
|
-
("after", after),
|
|
1520
|
-
("before", before),
|
|
1521
|
-
("count", count),
|
|
1522
|
-
("crossposts_only", crossposts_only),
|
|
1523
|
-
("limit", limit),
|
|
1524
|
-
("show", show),
|
|
1525
|
-
("sort", sort),
|
|
1526
|
-
("sr", sr),
|
|
1527
|
-
("sr_detail", sr_detail),
|
|
1528
|
-
]
|
|
1529
|
-
if v is not None
|
|
1530
|
-
}
|
|
1531
|
-
response = self._get(url, params=query_params)
|
|
1532
|
-
response.raise_for_status()
|
|
1533
|
-
return response.json()
|
|
1534
|
-
|
|
1535
|
-
def hot(
|
|
1536
|
-
self,
|
|
1537
|
-
g=None,
|
|
1538
|
-
after=None,
|
|
1539
|
-
before=None,
|
|
1540
|
-
count=None,
|
|
1541
|
-
limit=None,
|
|
1542
|
-
show=None,
|
|
1543
|
-
sr_detail=None,
|
|
1544
|
-
) -> Any:
|
|
1545
|
-
"""
|
|
1546
|
-
Get the hottest posts.
|
|
1547
|
-
|
|
1548
|
-
Args:
|
|
1549
|
-
g (string): one of (GLOBAL, US, AR, AU, BG, CA, CL, CO, HR, CZ, FI, FR, DE, GR, HU, IS, IN, IE, IT, JP, MY, MX, NZ, PH, PL, PT, PR, RO, RS, SG, ES, SE, TW, TH, TR, GB, US_WA, US_DE, US_DC, US_WI, US_WV, US_HI, US_FL, US_WY, US_NH, US_NJ, US_NM, US_TX, US_LA, US_NC, US_ND, US_NE, US_TN, US_NY, US_PA, US_CA, US_NV, US_VA, US_CO, US_AK, US_AL, US_AR, US_VT, US_IL, US_GA, US_IN, US_IA, US_OK, US_AZ, US_ID, US_CT, US_ME, US_MD, US_MA, US_OH, US_UT, US_MO, US_MN, US_MI, US_RI, US_KS, US_MT, US_MS, US_SC, US_KY, US_OR, US_SD)
|
|
1550
|
-
after (string): fullname of a thing
|
|
1551
|
-
before (string): fullname of a thing
|
|
1552
|
-
count (string): a positive integer (default: 0)
|
|
1553
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1554
|
-
show (string): (optional) the string "all"
|
|
1555
|
-
sr_detail (string): (optional) expand subreddits
|
|
1556
|
-
|
|
1557
|
-
Returns:
|
|
1558
|
-
Any: API response data.
|
|
1559
|
-
|
|
1560
|
-
Tags:
|
|
1561
|
-
listings
|
|
1562
|
-
"""
|
|
1563
|
-
url = f"{self.base_url}/hot"
|
|
1564
|
-
query_params = {
|
|
1565
|
-
k: v
|
|
1566
|
-
for k, v in [
|
|
1567
|
-
("g", g),
|
|
1568
|
-
("after", after),
|
|
1569
|
-
("before", before),
|
|
1570
|
-
("count", count),
|
|
1571
|
-
("limit", limit),
|
|
1572
|
-
("show", show),
|
|
1573
|
-
("sr_detail", sr_detail),
|
|
1574
|
-
]
|
|
1575
|
-
if v is not None
|
|
1576
|
-
}
|
|
1577
|
-
response = self._get(url, params=query_params)
|
|
1578
|
-
response.raise_for_status()
|
|
1579
|
-
return response.json()
|
|
1580
|
-
|
|
1581
|
-
def new(
|
|
1582
|
-
self, after=None, before=None, count=None, limit=None, show=None, sr_detail=None
|
|
1583
|
-
) -> Any:
|
|
1584
|
-
"""
|
|
1585
|
-
Get the newest posts.
|
|
1586
|
-
|
|
1587
|
-
Args:
|
|
1588
|
-
after (string): fullname of a thing
|
|
1589
|
-
before (string): fullname of a thing
|
|
1590
|
-
count (string): a positive integer (default: 0)
|
|
1591
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1592
|
-
show (string): (optional) the string "all"
|
|
1593
|
-
sr_detail (string): (optional) expand subreddits
|
|
1594
|
-
|
|
1595
|
-
Returns:
|
|
1596
|
-
Any: API response data.
|
|
1597
|
-
|
|
1598
|
-
Tags:
|
|
1599
|
-
listings
|
|
1600
|
-
"""
|
|
1601
|
-
url = f"{self.base_url}/new"
|
|
1602
|
-
query_params = {
|
|
1603
|
-
k: v
|
|
1604
|
-
for k, v in [
|
|
1605
|
-
("after", after),
|
|
1606
|
-
("before", before),
|
|
1607
|
-
("count", count),
|
|
1608
|
-
("limit", limit),
|
|
1609
|
-
("show", show),
|
|
1610
|
-
("sr_detail", sr_detail),
|
|
1611
|
-
]
|
|
1612
|
-
if v is not None
|
|
1613
|
-
}
|
|
1614
|
-
response = self._get(url, params=query_params)
|
|
1615
|
-
response.raise_for_status()
|
|
1616
|
-
return response.json()
|
|
1617
|
-
|
|
1618
|
-
def r_subreddit_comments_article(
|
|
1619
|
-
self,
|
|
1620
|
-
subreddit,
|
|
1621
|
-
article,
|
|
1622
|
-
comment=None,
|
|
1623
|
-
context=None,
|
|
1624
|
-
depth=None,
|
|
1625
|
-
limit=None,
|
|
1626
|
-
showedits=None,
|
|
1627
|
-
showmedia=None,
|
|
1628
|
-
showmore=None,
|
|
1629
|
-
showtitle=None,
|
|
1630
|
-
sort=None,
|
|
1631
|
-
sr_detail=None,
|
|
1632
|
-
theme=None,
|
|
1633
|
-
threaded=None,
|
|
1634
|
-
truncate=None,
|
|
1635
|
-
) -> Any:
|
|
1636
|
-
"""
|
|
1637
|
-
Get comments for a post in a subreddit.
|
|
1638
|
-
|
|
1639
|
-
Args:
|
|
1640
|
-
subreddit (string): subreddit
|
|
1641
|
-
article (string): article
|
|
1642
|
-
comment (string): (optional) ID36 of a comment
|
|
1643
|
-
context (string): an integer between 0 and 8
|
|
1644
|
-
depth (string): (optional) an integer
|
|
1645
|
-
limit (string): (optional) an integer
|
|
1646
|
-
showedits (string): boolean value (true, false)
|
|
1647
|
-
showmedia (string): boolean value (true, false)
|
|
1648
|
-
showmore (string): boolean value (true, false)
|
|
1649
|
-
showtitle (string): boolean value (true, false)
|
|
1650
|
-
sort (string): one of (confidence, top, new, controversial, old, random, qa, live)
|
|
1651
|
-
sr_detail (string): (optional) expand subreddits
|
|
1652
|
-
theme (string): one of (default, dark)
|
|
1653
|
-
threaded (string): boolean value (true, false)
|
|
1654
|
-
truncate (string): an integer between 0 and 50
|
|
1655
|
-
|
|
1656
|
-
Returns:
|
|
1657
|
-
Any: API response data.
|
|
1658
|
-
|
|
1659
|
-
Tags:
|
|
1660
|
-
listings
|
|
1661
|
-
"""
|
|
1662
|
-
if subreddit is None:
|
|
1663
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1664
|
-
if article is None:
|
|
1665
|
-
raise ValueError("Missing required parameter 'article'")
|
|
1666
|
-
url = f"{self.base_url}/r/{subreddit}/comments/{article}"
|
|
1667
|
-
query_params = {
|
|
1668
|
-
k: v
|
|
1669
|
-
for k, v in [
|
|
1670
|
-
("comment", comment),
|
|
1671
|
-
("context", context),
|
|
1672
|
-
("depth", depth),
|
|
1673
|
-
("limit", limit),
|
|
1674
|
-
("showedits", showedits),
|
|
1675
|
-
("showmedia", showmedia),
|
|
1676
|
-
("showmore", showmore),
|
|
1677
|
-
("showtitle", showtitle),
|
|
1678
|
-
("sort", sort),
|
|
1679
|
-
("sr_detail", sr_detail),
|
|
1680
|
-
("theme", theme),
|
|
1681
|
-
("threaded", threaded),
|
|
1682
|
-
("truncate", truncate),
|
|
1683
|
-
]
|
|
1684
|
-
if v is not None
|
|
1685
|
-
}
|
|
1686
|
-
response = self._get(url, params=query_params)
|
|
1687
|
-
response.raise_for_status()
|
|
1688
|
-
return response.json()
|
|
1689
|
-
|
|
1690
|
-
def r_subreddit_controversial(
|
|
1691
|
-
self,
|
|
1692
|
-
subreddit,
|
|
1693
|
-
after=None,
|
|
1694
|
-
before=None,
|
|
1695
|
-
count=None,
|
|
1696
|
-
limit=None,
|
|
1697
|
-
show=None,
|
|
1698
|
-
sr_detail=None,
|
|
1699
|
-
) -> Any:
|
|
1700
|
-
"""
|
|
1701
|
-
Get the most controversial posts in a subreddit.
|
|
1702
|
-
|
|
1703
|
-
Args:
|
|
1704
|
-
subreddit (string): subreddit
|
|
1705
|
-
after (string): fullname of a thing
|
|
1706
|
-
before (string): fullname of a thing
|
|
1707
|
-
count (string): a positive integer (default: 0)
|
|
1708
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1709
|
-
show (string): (optional) the string "all"
|
|
1710
|
-
sr_detail (string): (optional) expand subreddits
|
|
1711
|
-
|
|
1712
|
-
Returns:
|
|
1713
|
-
Any: API response data.
|
|
1714
|
-
|
|
1715
|
-
Tags:
|
|
1716
|
-
listings
|
|
1717
|
-
"""
|
|
1718
|
-
if subreddit is None:
|
|
1719
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1720
|
-
url = f"{self.base_url}/r/{subreddit}/controversial"
|
|
1721
|
-
query_params = {
|
|
1722
|
-
k: v
|
|
1723
|
-
for k, v in [
|
|
1724
|
-
("after", after),
|
|
1725
|
-
("before", before),
|
|
1726
|
-
("count", count),
|
|
1727
|
-
("limit", limit),
|
|
1728
|
-
("show", show),
|
|
1729
|
-
("sr_detail", sr_detail),
|
|
1730
|
-
]
|
|
1731
|
-
if v is not None
|
|
1732
|
-
}
|
|
1733
|
-
response = self._get(url, params=query_params)
|
|
1734
|
-
response.raise_for_status()
|
|
1735
|
-
return response.json()
|
|
1736
|
-
|
|
1737
|
-
def r_subreddit_hot(
|
|
1738
|
-
self,
|
|
1739
|
-
subreddit,
|
|
1740
|
-
g=None,
|
|
1741
|
-
after=None,
|
|
1742
|
-
before=None,
|
|
1743
|
-
count=None,
|
|
1744
|
-
limit=None,
|
|
1745
|
-
show=None,
|
|
1746
|
-
sr_detail=None,
|
|
1747
|
-
) -> Any:
|
|
1748
|
-
"""
|
|
1749
|
-
Get the hottest posts in a subreddit.
|
|
1750
|
-
|
|
1751
|
-
Args:
|
|
1752
|
-
subreddit (string): subreddit
|
|
1753
|
-
g (string): one of (GLOBAL, US, AR, AU, BG, CA, CL, CO, HR, CZ, FI, FR, DE, GR, HU, IS, IN, IE, IT, JP, MY, MX, NZ, PH, PL, PT, PR, RO, RS, SG, ES, SE, TW, TH, TR, GB, US_WA, US_DE, US_DC, US_WI, US_WV, US_HI, US_FL, US_WY, US_NH, US_NJ, US_NM, US_TX, US_LA, US_NC, US_ND, US_NE, US_TN, US_NY, US_PA, US_CA, US_NV, US_VA, US_CO, US_AK, US_AL, US_AR, US_VT, US_IL, US_GA, US_IN, US_IA, US_OK, US_AZ, US_ID, US_CT, US_ME, US_MD, US_MA, US_OH, US_UT, US_MO, US_MN, US_MI, US_RI, US_KS, US_MT, US_MS, US_SC, US_KY, US_OR, US_SD)
|
|
1754
|
-
after (string): fullname of a thing
|
|
1755
|
-
before (string): fullname of a thing
|
|
1756
|
-
count (string): a positive integer (default: 0)
|
|
1757
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1758
|
-
show (string): (optional) the string "all"
|
|
1759
|
-
sr_detail (string): (optional) expand subreddits
|
|
1760
|
-
|
|
1761
|
-
Returns:
|
|
1762
|
-
Any: API response data.
|
|
1763
|
-
|
|
1764
|
-
Tags:
|
|
1765
|
-
listings
|
|
1766
|
-
"""
|
|
1767
|
-
if subreddit is None:
|
|
1768
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1769
|
-
url = f"{self.base_url}/r/{subreddit}/hot"
|
|
1770
|
-
query_params = {
|
|
1771
|
-
k: v
|
|
1772
|
-
for k, v in [
|
|
1773
|
-
("g", g),
|
|
1774
|
-
("after", after),
|
|
1775
|
-
("before", before),
|
|
1776
|
-
("count", count),
|
|
1777
|
-
("limit", limit),
|
|
1778
|
-
("show", show),
|
|
1779
|
-
("sr_detail", sr_detail),
|
|
1780
|
-
]
|
|
1781
|
-
if v is not None
|
|
1782
|
-
}
|
|
1783
|
-
response = self._get(url, params=query_params)
|
|
1784
|
-
response.raise_for_status()
|
|
1785
|
-
return response.json()
|
|
1786
|
-
|
|
1787
|
-
def r_subreddit_new(
|
|
1788
|
-
self,
|
|
1789
|
-
subreddit,
|
|
1790
|
-
after=None,
|
|
1791
|
-
before=None,
|
|
1792
|
-
count=None,
|
|
1793
|
-
limit=None,
|
|
1794
|
-
show=None,
|
|
1795
|
-
sr_detail=None,
|
|
1796
|
-
) -> Any:
|
|
1797
|
-
"""
|
|
1798
|
-
Get the newest posts in a subreddit.
|
|
1799
|
-
|
|
1800
|
-
Args:
|
|
1801
|
-
subreddit (string): subreddit
|
|
1802
|
-
after (string): fullname of a thing
|
|
1803
|
-
before (string): fullname of a thing
|
|
1804
|
-
count (string): a positive integer (default: 0)
|
|
1805
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1806
|
-
show (string): (optional) the string "all"
|
|
1807
|
-
sr_detail (string): (optional) expand subreddits
|
|
1808
|
-
|
|
1809
|
-
Returns:
|
|
1810
|
-
Any: API response data.
|
|
1811
|
-
|
|
1812
|
-
Tags:
|
|
1813
|
-
listings
|
|
1814
|
-
"""
|
|
1815
|
-
if subreddit is None:
|
|
1816
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1817
|
-
url = f"{self.base_url}/r/{subreddit}/new"
|
|
1818
|
-
query_params = {
|
|
1819
|
-
k: v
|
|
1820
|
-
for k, v in [
|
|
1821
|
-
("after", after),
|
|
1822
|
-
("before", before),
|
|
1823
|
-
("count", count),
|
|
1824
|
-
("limit", limit),
|
|
1825
|
-
("show", show),
|
|
1826
|
-
("sr_detail", sr_detail),
|
|
1827
|
-
]
|
|
1828
|
-
if v is not None
|
|
1829
|
-
}
|
|
1830
|
-
response = self._get(url, params=query_params)
|
|
1831
|
-
response.raise_for_status()
|
|
1832
|
-
return response.json()
|
|
1833
|
-
|
|
1834
|
-
def r_subreddit_random(
|
|
1835
|
-
self,
|
|
1836
|
-
subreddit,
|
|
1837
|
-
after=None,
|
|
1838
|
-
before=None,
|
|
1839
|
-
count=None,
|
|
1840
|
-
limit=None,
|
|
1841
|
-
show=None,
|
|
1842
|
-
sr_detail=None,
|
|
1843
|
-
) -> Any:
|
|
1844
|
-
"""
|
|
1845
|
-
Get a random post in a subreddit.
|
|
1846
|
-
|
|
1847
|
-
Args:
|
|
1848
|
-
subreddit (string): subreddit
|
|
1849
|
-
after (string): fullname of a thing
|
|
1850
|
-
before (string): fullname of a thing
|
|
1851
|
-
count (string): a positive integer (default: 0)
|
|
1852
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1853
|
-
show (string): (optional) the string "all"
|
|
1854
|
-
sr_detail (string): (optional) expand subreddits
|
|
1855
|
-
|
|
1856
|
-
Returns:
|
|
1857
|
-
Any: API response data.
|
|
1858
|
-
|
|
1859
|
-
Tags:
|
|
1860
|
-
listings
|
|
1861
|
-
"""
|
|
1862
|
-
if subreddit is None:
|
|
1863
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1864
|
-
url = f"{self.base_url}/r/{subreddit}/random"
|
|
1865
|
-
query_params = {
|
|
1866
|
-
k: v
|
|
1867
|
-
for k, v in [
|
|
1868
|
-
("after", after),
|
|
1869
|
-
("before", before),
|
|
1870
|
-
("count", count),
|
|
1871
|
-
("limit", limit),
|
|
1872
|
-
("show", show),
|
|
1873
|
-
("sr_detail", sr_detail),
|
|
1874
|
-
]
|
|
1875
|
-
if v is not None
|
|
1876
|
-
}
|
|
1877
|
-
response = self._get(url, params=query_params)
|
|
1878
|
-
response.raise_for_status()
|
|
1879
|
-
return response.json()
|
|
1880
|
-
|
|
1881
|
-
def r_subreddit_rising(
|
|
1882
|
-
self,
|
|
1883
|
-
subreddit,
|
|
1884
|
-
after=None,
|
|
1885
|
-
before=None,
|
|
1886
|
-
count=None,
|
|
1887
|
-
limit=None,
|
|
1888
|
-
show=None,
|
|
1889
|
-
sr_detail=None,
|
|
1890
|
-
) -> Any:
|
|
1891
|
-
"""
|
|
1892
|
-
Get the rising posts in a subreddit.
|
|
1893
|
-
|
|
1894
|
-
Args:
|
|
1895
|
-
subreddit (string): subreddit
|
|
1896
|
-
after (string): fullname of a thing
|
|
1897
|
-
before (string): fullname of a thing
|
|
1898
|
-
count (string): a positive integer (default: 0)
|
|
1899
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1900
|
-
show (string): (optional) the string "all"
|
|
1901
|
-
sr_detail (string): (optional) expand subreddits
|
|
1902
|
-
|
|
1903
|
-
Returns:
|
|
1904
|
-
Any: API response data.
|
|
1905
|
-
|
|
1906
|
-
Tags:
|
|
1907
|
-
listings
|
|
1908
|
-
"""
|
|
1909
|
-
if subreddit is None:
|
|
1910
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1911
|
-
url = f"{self.base_url}/r/{subreddit}/rising"
|
|
1912
|
-
query_params = {
|
|
1913
|
-
k: v
|
|
1914
|
-
for k, v in [
|
|
1915
|
-
("after", after),
|
|
1916
|
-
("before", before),
|
|
1917
|
-
("count", count),
|
|
1918
|
-
("limit", limit),
|
|
1919
|
-
("show", show),
|
|
1920
|
-
("sr_detail", sr_detail),
|
|
1921
|
-
]
|
|
1922
|
-
if v is not None
|
|
1923
|
-
}
|
|
1924
|
-
response = self._get(url, params=query_params)
|
|
1925
|
-
response.raise_for_status()
|
|
1926
|
-
return response.json()
|
|
1927
|
-
|
|
1928
|
-
def r_subreddit_top(
|
|
1929
|
-
self,
|
|
1930
|
-
subreddit,
|
|
1931
|
-
after=None,
|
|
1932
|
-
before=None,
|
|
1933
|
-
count=None,
|
|
1934
|
-
limit=None,
|
|
1935
|
-
show=None,
|
|
1936
|
-
sr_detail=None,
|
|
1937
|
-
) -> Any:
|
|
1938
|
-
"""
|
|
1939
|
-
Get the top posts in a subreddit.
|
|
1940
|
-
|
|
1941
|
-
Args:
|
|
1942
|
-
subreddit (string): subreddit
|
|
1943
|
-
after (string): fullname of a thing
|
|
1944
|
-
before (string): fullname of a thing
|
|
1945
|
-
count (string): a positive integer (default: 0)
|
|
1946
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1947
|
-
show (string): (optional) the string "all"
|
|
1948
|
-
sr_detail (string): (optional) expand subreddits
|
|
1949
|
-
|
|
1950
|
-
Returns:
|
|
1951
|
-
Any: API response data.
|
|
1952
|
-
|
|
1953
|
-
Tags:
|
|
1954
|
-
listings
|
|
1955
|
-
"""
|
|
1956
|
-
if subreddit is None:
|
|
1957
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
1958
|
-
url = f"{self.base_url}/r/{subreddit}/top"
|
|
1959
|
-
query_params = {
|
|
1960
|
-
k: v
|
|
1961
|
-
for k, v in [
|
|
1962
|
-
("after", after),
|
|
1963
|
-
("before", before),
|
|
1964
|
-
("count", count),
|
|
1965
|
-
("limit", limit),
|
|
1966
|
-
("show", show),
|
|
1967
|
-
("sr_detail", sr_detail),
|
|
1968
|
-
]
|
|
1969
|
-
if v is not None
|
|
1970
|
-
}
|
|
1971
|
-
response = self._get(url, params=query_params)
|
|
1972
|
-
response.raise_for_status()
|
|
1973
|
-
return response.json()
|
|
1974
|
-
|
|
1975
|
-
def random(
|
|
1976
|
-
self, after=None, before=None, count=None, limit=None, show=None, sr_detail=None
|
|
1977
|
-
) -> Any:
|
|
1978
|
-
"""
|
|
1979
|
-
Get a random post.
|
|
1980
|
-
|
|
1981
|
-
Args:
|
|
1982
|
-
after (string): fullname of a thing
|
|
1983
|
-
before (string): fullname of a thing
|
|
1984
|
-
count (string): a positive integer (default: 0)
|
|
1985
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
1986
|
-
show (string): (optional) the string "all"
|
|
1987
|
-
sr_detail (string): (optional) expand subreddits
|
|
1988
|
-
|
|
1989
|
-
Returns:
|
|
1990
|
-
Any: API response data.
|
|
1991
|
-
|
|
1992
|
-
Tags:
|
|
1993
|
-
listings
|
|
1994
|
-
"""
|
|
1995
|
-
url = f"{self.base_url}/random"
|
|
1996
|
-
query_params = {
|
|
1997
|
-
k: v
|
|
1998
|
-
for k, v in [
|
|
1999
|
-
("after", after),
|
|
2000
|
-
("before", before),
|
|
2001
|
-
("count", count),
|
|
2002
|
-
("limit", limit),
|
|
2003
|
-
("show", show),
|
|
2004
|
-
("sr_detail", sr_detail),
|
|
2005
|
-
]
|
|
2006
|
-
if v is not None
|
|
2007
|
-
}
|
|
2008
|
-
response = self._get(url, params=query_params)
|
|
2009
|
-
response.raise_for_status()
|
|
2010
|
-
return response.json()
|
|
2011
|
-
|
|
2012
|
-
def rising(
|
|
2013
|
-
self, after=None, before=None, count=None, limit=None, show=None, sr_detail=None
|
|
2014
|
-
) -> Any:
|
|
2015
|
-
"""
|
|
2016
|
-
Get the rising posts.
|
|
2017
|
-
|
|
2018
|
-
Args:
|
|
2019
|
-
after (string): fullname of a thing
|
|
2020
|
-
before (string): fullname of a thing
|
|
2021
|
-
count (string): a positive integer (default: 0)
|
|
2022
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
2023
|
-
show (string): (optional) the string "all"
|
|
2024
|
-
sr_detail (string): (optional) expand subreddits
|
|
2025
|
-
|
|
2026
|
-
Returns:
|
|
2027
|
-
Any: API response data.
|
|
2028
|
-
|
|
2029
|
-
Tags:
|
|
2030
|
-
listings
|
|
2031
|
-
"""
|
|
2032
|
-
url = f"{self.base_url}/rising"
|
|
2033
|
-
query_params = {
|
|
2034
|
-
k: v
|
|
2035
|
-
for k, v in [
|
|
2036
|
-
("after", after),
|
|
2037
|
-
("before", before),
|
|
2038
|
-
("count", count),
|
|
2039
|
-
("limit", limit),
|
|
2040
|
-
("show", show),
|
|
2041
|
-
("sr_detail", sr_detail),
|
|
2042
|
-
]
|
|
2043
|
-
if v is not None
|
|
2044
|
-
}
|
|
2045
|
-
response = self._get(url, params=query_params)
|
|
2046
|
-
response.raise_for_status()
|
|
2047
|
-
return response.json()
|
|
2048
|
-
|
|
2049
|
-
def top(
|
|
2050
|
-
self, after=None, before=None, count=None, limit=None, show=None, sr_detail=None
|
|
2051
|
-
) -> Any:
|
|
2052
|
-
"""
|
|
2053
|
-
Get the top posts.
|
|
2054
|
-
|
|
2055
|
-
Args:
|
|
2056
|
-
after (string): fullname of a thing
|
|
2057
|
-
before (string): fullname of a thing
|
|
2058
|
-
count (string): a positive integer (default: 0)
|
|
2059
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
2060
|
-
show (string): (optional) the string "all"
|
|
2061
|
-
sr_detail (string): (optional) expand subreddits
|
|
2062
|
-
|
|
2063
|
-
Returns:
|
|
2064
|
-
Any: API response data.
|
|
2065
|
-
|
|
2066
|
-
Tags:
|
|
2067
|
-
listings
|
|
2068
|
-
"""
|
|
2069
|
-
url = f"{self.base_url}/top"
|
|
2070
|
-
query_params = {
|
|
2071
|
-
k: v
|
|
2072
|
-
for k, v in [
|
|
2073
|
-
("after", after),
|
|
2074
|
-
("before", before),
|
|
2075
|
-
("count", count),
|
|
2076
|
-
("limit", limit),
|
|
2077
|
-
("show", show),
|
|
2078
|
-
("sr_detail", sr_detail),
|
|
2079
|
-
]
|
|
2080
|
-
if v is not None
|
|
2081
|
-
}
|
|
2082
|
-
response = self._get(url, params=query_params)
|
|
2083
|
-
response.raise_for_status()
|
|
2084
|
-
return response.json()
|
|
2085
|
-
|
|
2086
|
-
def api_saved_media_text(self, url=None) -> Any:
|
|
2087
|
-
"""
|
|
2088
|
-
Get the text of a saved media.
|
|
2089
|
-
|
|
2090
|
-
Args:
|
|
2091
|
-
url (string): a valid URL
|
|
2092
|
-
|
|
2093
|
-
Returns:
|
|
2094
|
-
Any: API response data.
|
|
2095
|
-
|
|
2096
|
-
Tags:
|
|
2097
|
-
misc
|
|
2098
|
-
"""
|
|
2099
|
-
url = f"{self.base_url}/api/saved_media_text"
|
|
2100
|
-
query_params = {k: v for k, v in [("url", url)] if v is not None}
|
|
2101
|
-
response = self._get(url, params=query_params)
|
|
2102
|
-
response.raise_for_status()
|
|
2103
|
-
return response.json()
|
|
2104
|
-
|
|
2105
|
-
def api_v1_scopes(self, scopes=None) -> Any:
|
|
2106
|
-
"""
|
|
2107
|
-
Get the current user's scopes.
|
|
2108
|
-
|
|
2109
|
-
Args:
|
|
2110
|
-
scopes (string): (optional) An OAuth2 scope string
|
|
2111
|
-
|
|
2112
|
-
Returns:
|
|
2113
|
-
Any: API response data.
|
|
2114
|
-
|
|
2115
|
-
Tags:
|
|
2116
|
-
misc
|
|
2117
|
-
"""
|
|
2118
|
-
url = f"{self.base_url}/api/v1/scopes"
|
|
2119
|
-
query_params = {k: v for k, v in [("scopes", scopes)] if v is not None}
|
|
2120
|
-
response = self._get(url, params=query_params)
|
|
2121
|
-
response.raise_for_status()
|
|
2122
|
-
return response.json()
|
|
2123
|
-
|
|
2124
|
-
def r_subreddit_api_saved_media_text(self, subreddit, url=None) -> Any:
|
|
2125
|
-
"""
|
|
2126
|
-
Get the text of a saved media in a subreddit.
|
|
2127
|
-
|
|
2128
|
-
Args:
|
|
2129
|
-
subreddit (string): subreddit
|
|
2130
|
-
url (string): a valid URL
|
|
2131
|
-
|
|
2132
|
-
Returns:
|
|
2133
|
-
Any: API response data.
|
|
2134
|
-
|
|
2135
|
-
Tags:
|
|
2136
|
-
misc
|
|
2137
|
-
"""
|
|
2138
|
-
if subreddit is None:
|
|
2139
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
2140
|
-
url = f"{self.base_url}/r/{subreddit}/api/saved_media_text"
|
|
2141
|
-
query_params = {k: v for k, v in [("url", url)] if v is not None}
|
|
2142
|
-
response = self._get(url, params=query_params)
|
|
2143
|
-
response.raise_for_status()
|
|
2144
|
-
return response.json()
|
|
2145
|
-
|
|
2146
|
-
def r_subreddit_about_log(
|
|
2147
|
-
self,
|
|
2148
|
-
subreddit,
|
|
2149
|
-
after=None,
|
|
2150
|
-
before=None,
|
|
2151
|
-
count=None,
|
|
2152
|
-
limit=None,
|
|
2153
|
-
mod=None,
|
|
2154
|
-
show=None,
|
|
2155
|
-
sr_detail=None,
|
|
2156
|
-
type=None,
|
|
2157
|
-
) -> Any:
|
|
2158
|
-
"""
|
|
2159
|
-
Get the log of a subreddit.
|
|
2160
|
-
|
|
2161
|
-
Args:
|
|
2162
|
-
subreddit (string): subreddit
|
|
2163
|
-
after (string): a ModAction ID
|
|
2164
|
-
before (string): a ModAction ID
|
|
2165
|
-
count (string): a positive integer (default: 0)
|
|
2166
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 500)
|
|
2167
|
-
mod (string): (optional) a moderator filter
|
|
2168
|
-
show (string): (optional) the string "all"
|
|
2169
|
-
sr_detail (string): (optional) expand subreddits
|
|
2170
|
-
type (string): one of (banuser, unbanuser, spamlink, removelink, approvelink, spamcomment, removecomment, approvecomment, addmoderator, showcomment, invitemoderator, uninvitemoderator, acceptmoderatorinvite, removemoderator, addcontributor, removecontributor, editsettings, editflair, distinguish, marknsfw, wikibanned, wikicontributor, wikiunbanned, wikipagelisted, removewikicontributor, wikirevise, wikipermlevel, ignorereports, unignorereports, setpermissions, setsuggestedsort, sticky, unsticky, setcontestmode, unsetcontestmode, lock, unlock, muteuser, unmuteuser, createrule, editrule, reorderrules, deleterule, spoiler, unspoiler, modmail_enrollment, community_styling, community_widgets, markoriginalcontent, collections, events, hidden_award, add_community_topics, remove_community_topics, create_scheduled_post, edit_scheduled_post, delete_scheduled_post, submit_scheduled_post, edit_post_requirements, invitesubscriber, submit_content_rating_survey, adjust_post_crowd_control_level, enable_post_crowd_control_filter, disable_post_crowd_control_filter, deleteoverriddenclassification, overrideclassification, reordermoderators, snoozereports, unsnoozereports, addnote, deletenote, addremovalreason, createremovalreason, updateremovalreason, deleteremovalreason, reorderremovalreason, dev_platform_app_changed, dev_platform_app_disabled, dev_platform_app_enabled, dev_platform_app_installed, dev_platform_app_uninstalled)
|
|
2171
|
-
|
|
2172
|
-
Returns:
|
|
2173
|
-
Any: API response data.
|
|
2174
|
-
|
|
2175
|
-
Tags:
|
|
2176
|
-
moderation
|
|
2177
|
-
"""
|
|
2178
|
-
if subreddit is None:
|
|
2179
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
2180
|
-
url = f"{self.base_url}/r/{subreddit}/about/log"
|
|
2181
|
-
query_params = {
|
|
2182
|
-
k: v
|
|
2183
|
-
for k, v in [
|
|
2184
|
-
("after", after),
|
|
2185
|
-
("before", before),
|
|
2186
|
-
("count", count),
|
|
2187
|
-
("limit", limit),
|
|
2188
|
-
("mod", mod),
|
|
2189
|
-
("show", show),
|
|
2190
|
-
("sr_detail", sr_detail),
|
|
2191
|
-
("type", type),
|
|
2192
|
-
]
|
|
2193
|
-
if v is not None
|
|
2194
|
-
}
|
|
2195
|
-
response = self._get(url, params=query_params)
|
|
2196
|
-
response.raise_for_status()
|
|
2197
|
-
return response.json()
|
|
2198
|
-
|
|
2199
|
-
def r_subreddit_about_edited(
|
|
2200
|
-
self,
|
|
2201
|
-
subreddit,
|
|
2202
|
-
after=None,
|
|
2203
|
-
before=None,
|
|
2204
|
-
count=None,
|
|
2205
|
-
limit=None,
|
|
2206
|
-
location=None,
|
|
2207
|
-
only=None,
|
|
2208
|
-
show=None,
|
|
2209
|
-
sr_detail=None,
|
|
2210
|
-
) -> Any:
|
|
2211
|
-
"""
|
|
2212
|
-
Get the edited posts in a subreddit.
|
|
2213
|
-
|
|
2214
|
-
Args:
|
|
2215
|
-
subreddit (string): subreddit
|
|
2216
|
-
after (string): fullname of a thing
|
|
2217
|
-
before (string): fullname of a thing
|
|
2218
|
-
count (string): a positive integer (default: 0)
|
|
2219
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
2220
|
-
location (string): No description provided.
|
|
2221
|
-
only (string): one of (links, comments, chat_comments)
|
|
2222
|
-
show (string): (optional) the string "all"
|
|
2223
|
-
sr_detail (string): (optional) expand subreddits
|
|
2224
|
-
|
|
2225
|
-
Returns:
|
|
2226
|
-
Any: API response data.
|
|
2227
|
-
|
|
2228
|
-
Tags:
|
|
2229
|
-
moderation
|
|
2230
|
-
"""
|
|
2231
|
-
if subreddit is None:
|
|
2232
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
2233
|
-
url = f"{self.base_url}/r/{subreddit}/about/edited"
|
|
2234
|
-
query_params = {
|
|
2235
|
-
k: v
|
|
2236
|
-
for k, v in [
|
|
2237
|
-
("after", after),
|
|
2238
|
-
("before", before),
|
|
2239
|
-
("count", count),
|
|
2240
|
-
("limit", limit),
|
|
2241
|
-
("location", location),
|
|
2242
|
-
("only", only),
|
|
2243
|
-
("show", show),
|
|
2244
|
-
("sr_detail", sr_detail),
|
|
2245
|
-
]
|
|
2246
|
-
if v is not None
|
|
2247
|
-
}
|
|
2248
|
-
response = self._get(url, params=query_params)
|
|
2249
|
-
response.raise_for_status()
|
|
2250
|
-
return response.json()
|
|
2251
|
-
|
|
2252
|
-
def r_subreddit_about_modqueue(
|
|
2253
|
-
self,
|
|
2254
|
-
subreddit,
|
|
2255
|
-
after=None,
|
|
2256
|
-
before=None,
|
|
2257
|
-
count=None,
|
|
2258
|
-
limit=None,
|
|
2259
|
-
location=None,
|
|
2260
|
-
only=None,
|
|
2261
|
-
show=None,
|
|
2262
|
-
sr_detail=None,
|
|
2263
|
-
) -> Any:
|
|
2264
|
-
"""
|
|
2265
|
-
Get the modqueue in a subreddit.
|
|
2266
|
-
|
|
2267
|
-
Args:
|
|
2268
|
-
subreddit (string): subreddit
|
|
2269
|
-
after (string): fullname of a thing
|
|
2270
|
-
before (string): fullname of a thing
|
|
2271
|
-
count (string): a positive integer (default: 0)
|
|
2272
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
2273
|
-
location (string): No description provided.
|
|
2274
|
-
only (string): one of (links, comments, chat_comments)
|
|
2275
|
-
show (string): (optional) the string "all"
|
|
2276
|
-
sr_detail (string): (optional) expand subreddits
|
|
2277
|
-
|
|
2278
|
-
Returns:
|
|
2279
|
-
Any: API response data.
|
|
2280
|
-
|
|
2281
|
-
Tags:
|
|
2282
|
-
moderation
|
|
2283
|
-
"""
|
|
2284
|
-
if subreddit is None:
|
|
2285
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
2286
|
-
url = f"{self.base_url}/r/{subreddit}/about/modqueue"
|
|
2287
|
-
query_params = {
|
|
2288
|
-
k: v
|
|
2289
|
-
for k, v in [
|
|
2290
|
-
("after", after),
|
|
2291
|
-
("before", before),
|
|
2292
|
-
("count", count),
|
|
2293
|
-
("limit", limit),
|
|
2294
|
-
("location", location),
|
|
2295
|
-
("only", only),
|
|
2296
|
-
("show", show),
|
|
2297
|
-
("sr_detail", sr_detail),
|
|
2298
|
-
]
|
|
2299
|
-
if v is not None
|
|
2300
|
-
}
|
|
2301
|
-
response = self._get(url, params=query_params)
|
|
2302
|
-
response.raise_for_status()
|
|
2303
|
-
return response.json()
|
|
2304
|
-
|
|
2305
|
-
def r_subreddit_about_reports(
|
|
2306
|
-
self,
|
|
2307
|
-
subreddit,
|
|
2308
|
-
after=None,
|
|
2309
|
-
before=None,
|
|
2310
|
-
count=None,
|
|
2311
|
-
limit=None,
|
|
2312
|
-
location=None,
|
|
2313
|
-
only=None,
|
|
2314
|
-
show=None,
|
|
2315
|
-
sr_detail=None,
|
|
2316
|
-
) -> Any:
|
|
2317
|
-
"""
|
|
2318
|
-
Get the reports in a subreddit.
|
|
2319
|
-
|
|
2320
|
-
Args:
|
|
2321
|
-
subreddit (string): subreddit
|
|
2322
|
-
after (string): fullname of a thing
|
|
2323
|
-
before (string): fullname of a thing
|
|
2324
|
-
count (string): a positive integer (default: 0)
|
|
2325
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
2326
|
-
location (string): No description provided.
|
|
2327
|
-
only (string): one of (links, comments, chat_comments)
|
|
2328
|
-
show (string): (optional) the string "all"
|
|
2329
|
-
sr_detail (string): (optional) expand subreddits
|
|
2330
|
-
|
|
2331
|
-
Returns:
|
|
2332
|
-
Any: API response data.
|
|
2333
|
-
|
|
2334
|
-
Tags:
|
|
2335
|
-
moderation
|
|
2336
|
-
"""
|
|
2337
|
-
if subreddit is None:
|
|
2338
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
2339
|
-
url = f"{self.base_url}/r/{subreddit}/about/reports"
|
|
2340
|
-
query_params = {
|
|
2341
|
-
k: v
|
|
2342
|
-
for k, v in [
|
|
2343
|
-
("after", after),
|
|
2344
|
-
("before", before),
|
|
2345
|
-
("count", count),
|
|
2346
|
-
("limit", limit),
|
|
2347
|
-
("location", location),
|
|
2348
|
-
("only", only),
|
|
2349
|
-
("show", show),
|
|
2350
|
-
("sr_detail", sr_detail),
|
|
2351
|
-
]
|
|
2352
|
-
if v is not None
|
|
2353
|
-
}
|
|
2354
|
-
response = self._get(url, params=query_params)
|
|
2355
|
-
response.raise_for_status()
|
|
2356
|
-
return response.json()
|
|
2357
|
-
|
|
2358
|
-
def r_subreddit_about_spam(
|
|
2359
|
-
self,
|
|
2360
|
-
subreddit,
|
|
2361
|
-
after=None,
|
|
2362
|
-
before=None,
|
|
2363
|
-
count=None,
|
|
2364
|
-
limit=None,
|
|
2365
|
-
location=None,
|
|
2366
|
-
only=None,
|
|
2367
|
-
show=None,
|
|
2368
|
-
sr_detail=None,
|
|
2369
|
-
) -> Any:
|
|
2370
|
-
"""
|
|
2371
|
-
Get the spam posts in a subreddit.
|
|
2372
|
-
|
|
2373
|
-
Args:
|
|
2374
|
-
subreddit (string): subreddit
|
|
2375
|
-
after (string): fullname of a thing
|
|
2376
|
-
before (string): fullname of a thing
|
|
2377
|
-
count (string): a positive integer (default: 0)
|
|
2378
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
2379
|
-
location (string): No description provided.
|
|
2380
|
-
only (string): one of (links, comments, chat_comments)
|
|
2381
|
-
show (string): (optional) the string "all"
|
|
2382
|
-
sr_detail (string): (optional) expand subreddits
|
|
2383
|
-
|
|
2384
|
-
Returns:
|
|
2385
|
-
Any: API response data.
|
|
2386
|
-
|
|
2387
|
-
Tags:
|
|
2388
|
-
moderation
|
|
2389
|
-
"""
|
|
2390
|
-
if subreddit is None:
|
|
2391
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
2392
|
-
url = f"{self.base_url}/r/{subreddit}/about/spam"
|
|
2393
|
-
query_params = {
|
|
2394
|
-
k: v
|
|
2395
|
-
for k, v in [
|
|
2396
|
-
("after", after),
|
|
2397
|
-
("before", before),
|
|
2398
|
-
("count", count),
|
|
2399
|
-
("limit", limit),
|
|
2400
|
-
("location", location),
|
|
2401
|
-
("only", only),
|
|
2402
|
-
("show", show),
|
|
2403
|
-
("sr_detail", sr_detail),
|
|
2404
|
-
]
|
|
2405
|
-
if v is not None
|
|
2406
|
-
}
|
|
2407
|
-
response = self._get(url, params=query_params)
|
|
2408
|
-
response.raise_for_status()
|
|
2409
|
-
return response.json()
|
|
2410
|
-
|
|
2411
|
-
def r_subreddit_about_unmoderated(
|
|
2412
|
-
self,
|
|
2413
|
-
subreddit,
|
|
2414
|
-
after=None,
|
|
2415
|
-
before=None,
|
|
2416
|
-
count=None,
|
|
2417
|
-
limit=None,
|
|
2418
|
-
location=None,
|
|
2419
|
-
only=None,
|
|
2420
|
-
show=None,
|
|
2421
|
-
sr_detail=None,
|
|
2422
|
-
) -> Any:
|
|
2423
|
-
"""
|
|
2424
|
-
Get the unmoderated posts in a subreddit.
|
|
2425
|
-
|
|
2426
|
-
Args:
|
|
2427
|
-
subreddit (string): subreddit
|
|
2428
|
-
after (string): fullname of a thing
|
|
2429
|
-
before (string): fullname of a thing
|
|
2430
|
-
count (string): a positive integer (default: 0)
|
|
2431
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
2432
|
-
location (string): No description provided.
|
|
2433
|
-
only (string): one of (links, comments, chat_comments)
|
|
2434
|
-
show (string): (optional) the string "all"
|
|
2435
|
-
sr_detail (string): (optional) expand subreddits
|
|
2436
|
-
|
|
2437
|
-
Returns:
|
|
2438
|
-
Any: API response data.
|
|
2439
|
-
|
|
2440
|
-
Tags:
|
|
2441
|
-
moderation
|
|
2442
|
-
"""
|
|
2443
|
-
if subreddit is None:
|
|
2444
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
2445
|
-
url = f"{self.base_url}/r/{subreddit}/about/unmoderated"
|
|
2446
|
-
query_params = {
|
|
2447
|
-
k: v
|
|
2448
|
-
for k, v in [
|
|
2449
|
-
("after", after),
|
|
2450
|
-
("before", before),
|
|
2451
|
-
("count", count),
|
|
2452
|
-
("limit", limit),
|
|
2453
|
-
("location", location),
|
|
2454
|
-
("only", only),
|
|
2455
|
-
("show", show),
|
|
2456
|
-
("sr_detail", sr_detail),
|
|
2457
|
-
]
|
|
2458
|
-
if v is not None
|
|
2459
|
-
}
|
|
2460
|
-
response = self._get(url, params=query_params)
|
|
2461
|
-
response.raise_for_status()
|
|
2462
|
-
return response.json()
|
|
2463
|
-
|
|
2464
|
-
def r_subreddit_stylesheet(self, subreddit) -> Any:
|
|
2465
|
-
"""
|
|
2466
|
-
Get the stylesheet of a subreddit.
|
|
2467
|
-
|
|
2468
|
-
Args:
|
|
2469
|
-
subreddit (string): subreddit
|
|
2470
|
-
|
|
2471
|
-
Returns:
|
|
2472
|
-
Any: API response data.
|
|
2473
|
-
|
|
2474
|
-
Tags:
|
|
2475
|
-
moderation
|
|
2476
|
-
"""
|
|
2477
|
-
if subreddit is None:
|
|
2478
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
2479
|
-
url = f"{self.base_url}/r/{subreddit}/stylesheet"
|
|
2480
|
-
query_params = {}
|
|
2481
|
-
response = self._get(url, params=query_params)
|
|
2482
|
-
response.raise_for_status()
|
|
2483
|
-
return response.json()
|
|
2484
|
-
|
|
2485
|
-
def stylesheet(self) -> Any:
|
|
2486
|
-
"""
|
|
2487
|
-
Get the stylesheet of the current user.
|
|
2488
|
-
|
|
2489
|
-
Returns:
|
|
2490
|
-
Any: API response data.
|
|
2491
|
-
|
|
2492
|
-
Tags:
|
|
2493
|
-
moderation
|
|
2494
|
-
"""
|
|
2495
|
-
url = f"{self.base_url}/stylesheet"
|
|
2496
|
-
query_params = {}
|
|
2497
|
-
response = self._get(url, params=query_params)
|
|
2498
|
-
response.raise_for_status()
|
|
2499
|
-
return response.json()
|
|
2500
|
-
|
|
2501
|
-
def api_mod_notes1(
|
|
2502
|
-
self, before=None, filter=None, limit=None, subreddit=None, user=None
|
|
2503
|
-
) -> Any:
|
|
2504
|
-
"""
|
|
2505
|
-
Get the mod notes of a subreddit.
|
|
2506
|
-
|
|
2507
|
-
Args:
|
|
2508
|
-
before (string): (optional) an encoded string used for pagination with mod notes
|
|
2509
|
-
filter (string): (optional) one of (NOTE, APPROVAL, REMOVAL, BAN, MUTE, INVITE, SPAM, CONTENT_CHANGE, MOD_ACTION, ALL), to be used for querying specific types of mod notes (default: all)
|
|
2510
|
-
limit (string): (optional) the number of mod notes to return in the response payload (default: 25, max: 100)
|
|
2511
|
-
subreddit (string): subreddit name
|
|
2512
|
-
user (string): account username
|
|
2513
|
-
|
|
2514
|
-
Returns:
|
|
2515
|
-
Any: API response data.
|
|
2516
|
-
|
|
2517
|
-
Tags:
|
|
2518
|
-
modnote
|
|
2519
|
-
"""
|
|
2520
|
-
url = f"{self.base_url}/api/mod/notes"
|
|
2521
|
-
query_params = {
|
|
2522
|
-
k: v
|
|
2523
|
-
for k, v in [
|
|
2524
|
-
("before", before),
|
|
2525
|
-
("filter", filter),
|
|
2526
|
-
("limit", limit),
|
|
2527
|
-
("subreddit", subreddit),
|
|
2528
|
-
("user", user),
|
|
2529
|
-
]
|
|
2530
|
-
if v is not None
|
|
2531
|
-
}
|
|
2532
|
-
response = self._get(url, params=query_params)
|
|
2533
|
-
response.raise_for_status()
|
|
2534
|
-
return response.json()
|
|
2535
|
-
|
|
2536
|
-
def api_mod_notes(self, note_id=None, subreddit=None, user=None) -> Any:
|
|
2537
|
-
"""
|
|
2538
|
-
Delete a mod note.
|
|
2539
|
-
|
|
2540
|
-
Args:
|
|
2541
|
-
note_id (string): a unique ID for the note to be deleted (should have a ModNote_ prefix)
|
|
2542
|
-
subreddit (string): subreddit name
|
|
2543
|
-
user (string): account username
|
|
2544
|
-
|
|
2545
|
-
Returns:
|
|
2546
|
-
Any: API response data.
|
|
2547
|
-
|
|
2548
|
-
Tags:
|
|
2549
|
-
modnote
|
|
2550
|
-
"""
|
|
2551
|
-
url = f"{self.base_url}/api/mod/notes"
|
|
2552
|
-
query_params = {
|
|
2553
|
-
k: v
|
|
2554
|
-
for k, v in [("note_id", note_id), ("subreddit", subreddit), ("user", user)]
|
|
2555
|
-
if v is not None
|
|
2556
|
-
}
|
|
2557
|
-
response = self._delete(url, params=query_params)
|
|
2558
|
-
response.raise_for_status()
|
|
2559
|
-
return response.json()
|
|
2560
|
-
|
|
2561
|
-
def api_mod_notes_recent(
|
|
2562
|
-
self, before=None, filter=None, limit=None, subreddits=None, user=None
|
|
2563
|
-
) -> Any:
|
|
2564
|
-
"""
|
|
2565
|
-
Get the recent mod notes.
|
|
2566
|
-
|
|
2567
|
-
Args:
|
|
2568
|
-
before (string): (optional) an encoded string used for pagination with mod notes
|
|
2569
|
-
filter (string): (optional) one of (NOTE, APPROVAL, REMOVAL, BAN, MUTE, INVITE, SPAM, CONTENT_CHANGE, MOD_ACTION, ALL), to be used for querying specific types of mod notes (default: all)
|
|
2570
|
-
limit (string): (optional) the number of mod notes to return in the response payload (default: 25, max: 100)
|
|
2571
|
-
subreddits (string): a comma-separated list of subreddits by name
|
|
2572
|
-
user (string): a comma-separated list of usernames
|
|
2573
|
-
|
|
2574
|
-
Returns:
|
|
2575
|
-
Any: API response data.
|
|
2576
|
-
|
|
2577
|
-
Tags:
|
|
2578
|
-
modnote
|
|
2579
|
-
"""
|
|
2580
|
-
url = f"{self.base_url}/api/mod/notes/recent"
|
|
2581
|
-
query_params = {
|
|
2582
|
-
k: v
|
|
2583
|
-
for k, v in [
|
|
2584
|
-
("before", before),
|
|
2585
|
-
("filter", filter),
|
|
2586
|
-
("limit", limit),
|
|
2587
|
-
("subreddits", subreddits),
|
|
2588
|
-
("user", user),
|
|
2589
|
-
]
|
|
2590
|
-
if v is not None
|
|
2591
|
-
}
|
|
2592
|
-
response = self._get(url, params=query_params)
|
|
2593
|
-
response.raise_for_status()
|
|
2594
|
-
return response.json()
|
|
2595
|
-
|
|
2596
|
-
def api_multi_mine(self, expand_srs=None) -> Any:
|
|
2597
|
-
"""
|
|
2598
|
-
Get the current user's multi.
|
|
2599
|
-
|
|
2600
|
-
Args:
|
|
2601
|
-
expand_srs (string): boolean value (true, false)
|
|
2602
|
-
|
|
2603
|
-
Returns:
|
|
2604
|
-
Any: API response data.
|
|
2605
|
-
|
|
2606
|
-
Tags:
|
|
2607
|
-
multis
|
|
2608
|
-
"""
|
|
2609
|
-
url = f"{self.base_url}/api/multi/mine"
|
|
2610
|
-
query_params = {k: v for k, v in [("expand_srs", expand_srs)] if v is not None}
|
|
2611
|
-
response = self._get(url, params=query_params)
|
|
2612
|
-
response.raise_for_status()
|
|
2613
|
-
return response.json()
|
|
2614
|
-
|
|
2615
|
-
def api_multi_user_username(self, username, expand_srs=None) -> Any:
|
|
2616
|
-
"""
|
|
2617
|
-
Get a user's multi.
|
|
2618
|
-
|
|
2619
|
-
Args:
|
|
2620
|
-
username (string): username
|
|
2621
|
-
expand_srs (string): boolean value (true, false)
|
|
2622
|
-
|
|
2623
|
-
Returns:
|
|
2624
|
-
Any: API response data.
|
|
2625
|
-
|
|
2626
|
-
Tags:
|
|
2627
|
-
multis
|
|
2628
|
-
"""
|
|
2629
|
-
if username is None:
|
|
2630
|
-
raise ValueError("Missing required parameter 'username'")
|
|
2631
|
-
url = f"{self.base_url}/api/multi/user/{username}"
|
|
2632
|
-
query_params = {k: v for k, v in [("expand_srs", expand_srs)] if v is not None}
|
|
2633
|
-
response = self._get(url, params=query_params)
|
|
2634
|
-
response.raise_for_status()
|
|
2635
|
-
return response.json()
|
|
2636
|
-
|
|
2637
|
-
def api_multi_multipath1(self, multipath, expand_srs=None) -> Any:
|
|
2638
|
-
"""
|
|
2639
|
-
Get a multi.
|
|
2640
|
-
|
|
2641
|
-
Args:
|
|
2642
|
-
multipath (string): multipath
|
|
2643
|
-
expand_srs (string): boolean value (true, false)
|
|
2644
|
-
|
|
2645
|
-
Returns:
|
|
2646
|
-
Any: API response data.
|
|
2647
|
-
|
|
2648
|
-
Tags:
|
|
2649
|
-
multis
|
|
2650
|
-
"""
|
|
2651
|
-
if multipath is None:
|
|
2652
|
-
raise ValueError("Missing required parameter 'multipath'")
|
|
2653
|
-
url = f"{self.base_url}/api/multi/{multipath}"
|
|
2654
|
-
query_params = {k: v for k, v in [("expand_srs", expand_srs)] if v is not None}
|
|
2655
|
-
response = self._get(url, params=query_params)
|
|
2656
|
-
response.raise_for_status()
|
|
2657
|
-
return response.json()
|
|
2658
|
-
|
|
2659
|
-
def api_multi_multipath(self, multipath, expand_srs=None) -> Any:
|
|
2660
|
-
"""
|
|
2661
|
-
Delete a multi.
|
|
2662
|
-
|
|
2663
|
-
Args:
|
|
2664
|
-
multipath (string): multipath
|
|
2665
|
-
expand_srs (string): boolean value (true, false)
|
|
2666
|
-
|
|
2667
|
-
Returns:
|
|
2668
|
-
Any: API response data.
|
|
2669
|
-
|
|
2670
|
-
Tags:
|
|
2671
|
-
multis
|
|
2672
|
-
"""
|
|
2673
|
-
if multipath is None:
|
|
2674
|
-
raise ValueError("Missing required parameter 'multipath'")
|
|
2675
|
-
url = f"{self.base_url}/api/multi/{multipath}"
|
|
2676
|
-
query_params = {k: v for k, v in [("expand_srs", expand_srs)] if v is not None}
|
|
2677
|
-
response = self._delete(url, params=query_params)
|
|
2678
|
-
response.raise_for_status()
|
|
2679
|
-
return response.json()
|
|
2680
|
-
|
|
2681
|
-
def api_multi_multipath_description(self, multipath) -> Any:
|
|
2682
|
-
"""
|
|
2683
|
-
Get a multi's description.
|
|
2684
|
-
|
|
2685
|
-
Args:
|
|
2686
|
-
multipath (string): multipath
|
|
2687
|
-
|
|
2688
|
-
Returns:
|
|
2689
|
-
Any: API response data.
|
|
2690
|
-
|
|
2691
|
-
Tags:
|
|
2692
|
-
multis
|
|
2693
|
-
"""
|
|
2694
|
-
if multipath is None:
|
|
2695
|
-
raise ValueError("Missing required parameter 'multipath'")
|
|
2696
|
-
url = f"{self.base_url}/api/multi/{multipath}/description"
|
|
2697
|
-
query_params = {}
|
|
2698
|
-
response = self._get(url, params=query_params)
|
|
2699
|
-
response.raise_for_status()
|
|
2700
|
-
return response.json()
|
|
2701
|
-
|
|
2702
|
-
def api_multi_multipath_rsubreddit1(self, multipath, subreddit) -> Any:
|
|
2703
|
-
"""
|
|
2704
|
-
Get a multi's subreddit.
|
|
2705
|
-
|
|
2706
|
-
Args:
|
|
2707
|
-
multipath (string): multipath
|
|
2708
|
-
subreddit (string): subreddit
|
|
2709
|
-
|
|
2710
|
-
Returns:
|
|
2711
|
-
Any: API response data.
|
|
2712
|
-
|
|
2713
|
-
Tags:
|
|
2714
|
-
multis
|
|
2715
|
-
"""
|
|
2716
|
-
if multipath is None:
|
|
2717
|
-
raise ValueError("Missing required parameter 'multipath'")
|
|
2718
|
-
if subreddit is None:
|
|
2719
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
2720
|
-
url = f"{self.base_url}/api/multi/{multipath}/r/{subreddit}"
|
|
2721
|
-
query_params = {}
|
|
2722
|
-
response = self._get(url, params=query_params)
|
|
2723
|
-
response.raise_for_status()
|
|
2724
|
-
return response.json()
|
|
2725
|
-
|
|
2726
|
-
def api_multi_multipath_rsubreddit(self, multipath, subreddit) -> Any:
|
|
2727
|
-
"""
|
|
2728
|
-
Delete a multi's subreddit.
|
|
2729
|
-
|
|
2730
|
-
Args:
|
|
2731
|
-
multipath (string): multipath
|
|
2732
|
-
subreddit (string): subreddit
|
|
2733
|
-
|
|
2734
|
-
Returns:
|
|
2735
|
-
Any: API response data.
|
|
2736
|
-
|
|
2737
|
-
Tags:
|
|
2738
|
-
multis
|
|
2739
|
-
"""
|
|
2740
|
-
if multipath is None:
|
|
2741
|
-
raise ValueError("Missing required parameter 'multipath'")
|
|
2742
|
-
if subreddit is None:
|
|
2743
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
2744
|
-
url = f"{self.base_url}/api/multi/{multipath}/r/{subreddit}"
|
|
2745
|
-
query_params = {}
|
|
2746
|
-
response = self._delete(url, params=query_params)
|
|
2747
|
-
response.raise_for_status()
|
|
2748
|
-
return response.json()
|
|
2749
|
-
|
|
2750
|
-
def api_mod_conversations(
|
|
2751
|
-
self, after=None, entity=None, limit=None, sort=None, state=None
|
|
2752
|
-
) -> Any:
|
|
2753
|
-
"""
|
|
2754
|
-
Get the mod conversations.
|
|
2755
|
-
|
|
2756
|
-
Args:
|
|
2757
|
-
after (string): A ModMail Converstion ID, in the form ModmailConversation_<id>
|
|
2758
|
-
entity (string): A comma-separated list of subreddit names
|
|
2759
|
-
limit (string): an integer between 1 and 100 (default: 25)
|
|
2760
|
-
sort (string): one of (recent, mod, user, unread)
|
|
2761
|
-
state (string): one of (all, appeals, notifications, inbox, filtered, inprogress, mod, archived, default, highlighted, join_requests, new)
|
|
2762
|
-
|
|
2763
|
-
Returns:
|
|
2764
|
-
Any: API response data.
|
|
2765
|
-
|
|
2766
|
-
Tags:
|
|
2767
|
-
new modmail
|
|
2768
|
-
"""
|
|
2769
|
-
url = f"{self.base_url}/api/mod/conversations"
|
|
2770
|
-
query_params = {
|
|
2771
|
-
k: v
|
|
2772
|
-
for k, v in [
|
|
2773
|
-
("after", after),
|
|
2774
|
-
("entity", entity),
|
|
2775
|
-
("limit", limit),
|
|
2776
|
-
("sort", sort),
|
|
2777
|
-
("state", state),
|
|
2778
|
-
]
|
|
2779
|
-
if v is not None
|
|
2780
|
-
}
|
|
2781
|
-
response = self._get(url, params=query_params)
|
|
2782
|
-
response.raise_for_status()
|
|
2783
|
-
return response.json()
|
|
2784
|
-
|
|
2785
|
-
def api_mod_conversations_conversation_id(
|
|
2786
|
-
self, conversation_id, markRead=None
|
|
2787
|
-
) -> Any:
|
|
2788
|
-
"""
|
|
2789
|
-
Get a mod conversation.
|
|
2790
|
-
|
|
2791
|
-
Args:
|
|
2792
|
-
conversation_id (string): conversation_id
|
|
2793
|
-
markRead (string): boolean value (true, false)
|
|
2794
|
-
|
|
2795
|
-
Returns:
|
|
2796
|
-
Any: API response data.
|
|
2797
|
-
|
|
2798
|
-
Tags:
|
|
2799
|
-
new modmail
|
|
2800
|
-
"""
|
|
2801
|
-
if conversation_id is None:
|
|
2802
|
-
raise ValueError("Missing required parameter 'conversation_id'")
|
|
2803
|
-
url = f"{self.base_url}/api/mod/conversations/{conversation_id}"
|
|
2804
|
-
query_params = {k: v for k, v in [("markRead", markRead)] if v is not None}
|
|
2805
|
-
response = self._get(url, params=query_params)
|
|
2806
|
-
response.raise_for_status()
|
|
2807
|
-
return response.json()
|
|
2808
|
-
|
|
2809
|
-
def api_mod_conversations_conversation_id_highlight(self, conversation_id) -> Any:
|
|
2810
|
-
"""
|
|
2811
|
-
Highlight a mod conversation.
|
|
2812
|
-
|
|
2813
|
-
Args:
|
|
2814
|
-
conversation_id (string): conversation_id
|
|
2815
|
-
|
|
2816
|
-
Returns:
|
|
2817
|
-
Any: API response data.
|
|
2818
|
-
|
|
2819
|
-
Tags:
|
|
2820
|
-
new modmail
|
|
2821
|
-
"""
|
|
2822
|
-
if conversation_id is None:
|
|
2823
|
-
raise ValueError("Missing required parameter 'conversation_id'")
|
|
2824
|
-
url = f"{self.base_url}/api/mod/conversations/{conversation_id}/highlight"
|
|
2825
|
-
query_params = {}
|
|
2826
|
-
response = self._delete(url, params=query_params)
|
|
2827
|
-
response.raise_for_status()
|
|
2828
|
-
return response.json()
|
|
2829
|
-
|
|
2830
|
-
def api_mod_conversations_conversation_id_unarchive(self, conversation_id) -> Any:
|
|
2831
|
-
"""
|
|
2832
|
-
Unarchive a mod conversation.
|
|
2833
|
-
|
|
2834
|
-
Args:
|
|
2835
|
-
conversation_id (string): conversation_id
|
|
2836
|
-
|
|
2837
|
-
Returns:
|
|
2838
|
-
Any: API response data.
|
|
2839
|
-
|
|
2840
|
-
Tags:
|
|
2841
|
-
new modmail
|
|
2842
|
-
"""
|
|
2843
|
-
if conversation_id is None:
|
|
2844
|
-
raise ValueError("Missing required parameter 'conversation_id'")
|
|
2845
|
-
url = f"{self.base_url}/api/mod/conversations/{conversation_id}/unarchive"
|
|
2846
|
-
query_params = {}
|
|
2847
|
-
response = self._post(url, data={}, params=query_params)
|
|
2848
|
-
response.raise_for_status()
|
|
2849
|
-
return response.json()
|
|
2850
|
-
|
|
2851
|
-
def api_mod_conversations_conversation_id_unban(self, conversation_id) -> Any:
|
|
2852
|
-
"""
|
|
2853
|
-
Unban a mod conversation.
|
|
2854
|
-
|
|
2855
|
-
Args:
|
|
2856
|
-
conversation_id (string): conversation_id
|
|
2857
|
-
|
|
2858
|
-
Returns:
|
|
2859
|
-
Any: API response data.
|
|
2860
|
-
|
|
2861
|
-
Tags:
|
|
2862
|
-
new modmail
|
|
2863
|
-
"""
|
|
2864
|
-
if conversation_id is None:
|
|
2865
|
-
raise ValueError("Missing required parameter 'conversation_id'")
|
|
2866
|
-
url = f"{self.base_url}/api/mod/conversations/{conversation_id}/unban"
|
|
2867
|
-
query_params = {}
|
|
2868
|
-
response = self._post(url, data={}, params=query_params)
|
|
2869
|
-
response.raise_for_status()
|
|
2870
|
-
return response.json()
|
|
2871
|
-
|
|
2872
|
-
def api_mod_conversations_conversation_id_unmute(self, conversation_id) -> Any:
|
|
2873
|
-
"""
|
|
2874
|
-
Unmute a mod conversation.
|
|
2875
|
-
|
|
2876
|
-
Args:
|
|
2877
|
-
conversation_id (string): conversation_id
|
|
2878
|
-
|
|
2879
|
-
Returns:
|
|
2880
|
-
Any: API response data.
|
|
2881
|
-
|
|
2882
|
-
Tags:
|
|
2883
|
-
new modmail
|
|
2884
|
-
"""
|
|
2885
|
-
if conversation_id is None:
|
|
2886
|
-
raise ValueError("Missing required parameter 'conversation_id'")
|
|
2887
|
-
url = f"{self.base_url}/api/mod/conversations/{conversation_id}/unmute"
|
|
2888
|
-
query_params = {}
|
|
2889
|
-
response = self._post(url, data={}, params=query_params)
|
|
2890
|
-
response.raise_for_status()
|
|
2891
|
-
return response.json()
|
|
2892
|
-
|
|
2893
|
-
def api_mod_conversations_conversation_id_user(self, conversation_id) -> Any:
|
|
2894
|
-
"""
|
|
2895
|
-
Get a mod conversation's user.
|
|
2896
|
-
|
|
2897
|
-
Args:
|
|
2898
|
-
conversation_id (string): conversation_id
|
|
2899
|
-
|
|
2900
|
-
Returns:
|
|
2901
|
-
Any: API response data.
|
|
2902
|
-
|
|
2903
|
-
Tags:
|
|
2904
|
-
new modmail
|
|
2905
|
-
"""
|
|
2906
|
-
if conversation_id is None:
|
|
2907
|
-
raise ValueError("Missing required parameter 'conversation_id'")
|
|
2908
|
-
url = f"{self.base_url}/api/mod/conversations/{conversation_id}/user"
|
|
2909
|
-
query_params = {}
|
|
2910
|
-
response = self._get(url, params=query_params)
|
|
2911
|
-
response.raise_for_status()
|
|
2912
|
-
return response.json()
|
|
2913
|
-
|
|
2914
|
-
def api_mod_conversations_subreddits(self) -> Any:
|
|
2915
|
-
"""
|
|
2916
|
-
Get the mod conversations' subreddits.
|
|
2917
|
-
|
|
2918
|
-
Returns:
|
|
2919
|
-
Any: API response data.
|
|
2920
|
-
|
|
2921
|
-
Tags:
|
|
2922
|
-
new modmail
|
|
2923
|
-
"""
|
|
2924
|
-
url = f"{self.base_url}/api/mod/conversations/subreddits"
|
|
2925
|
-
query_params = {}
|
|
2926
|
-
response = self._get(url, params=query_params)
|
|
2927
|
-
response.raise_for_status()
|
|
2928
|
-
return response.json()
|
|
2929
|
-
|
|
2930
|
-
def api_mod_conversations_unread_count(self) -> Any:
|
|
2931
|
-
"""
|
|
2932
|
-
Get the unread count of the mod conversations.
|
|
2933
|
-
|
|
2934
|
-
Returns:
|
|
2935
|
-
Any: API response data.
|
|
2936
|
-
|
|
2937
|
-
Tags:
|
|
2938
|
-
new modmail
|
|
2939
|
-
"""
|
|
2940
|
-
url = f"{self.base_url}/api/mod/conversations/unread/count"
|
|
2941
|
-
query_params = {}
|
|
2942
|
-
response = self._get(url, params=query_params)
|
|
2943
|
-
response.raise_for_status()
|
|
2944
|
-
return response.json()
|
|
2945
|
-
|
|
2946
|
-
def message_inbox(
|
|
2947
|
-
self,
|
|
2948
|
-
mark=None,
|
|
2949
|
-
mid=None,
|
|
2950
|
-
after=None,
|
|
2951
|
-
before=None,
|
|
2952
|
-
count=None,
|
|
2953
|
-
limit=None,
|
|
2954
|
-
show=None,
|
|
2955
|
-
sr_detail=None,
|
|
2956
|
-
) -> Any:
|
|
2957
|
-
"""
|
|
2958
|
-
Get the current user's inbox.
|
|
2959
|
-
|
|
2960
|
-
Args:
|
|
2961
|
-
mark (string): one of (true, false)
|
|
2962
|
-
mid (string): No description provided.
|
|
2963
|
-
after (string): fullname of a thing
|
|
2964
|
-
before (string): fullname of a thing
|
|
2965
|
-
count (string): a positive integer (default: 0)
|
|
2966
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
2967
|
-
show (string): (optional) the string "all"
|
|
2968
|
-
sr_detail (string): (optional) expand subreddits
|
|
2969
|
-
|
|
2970
|
-
Returns:
|
|
2971
|
-
Any: API response data.
|
|
2972
|
-
|
|
2973
|
-
Tags:
|
|
2974
|
-
private messages
|
|
2975
|
-
"""
|
|
2976
|
-
url = f"{self.base_url}/message/inbox"
|
|
2977
|
-
query_params = {
|
|
2978
|
-
k: v
|
|
2979
|
-
for k, v in [
|
|
2980
|
-
("mark", mark),
|
|
2981
|
-
("mid", mid),
|
|
2982
|
-
("after", after),
|
|
2983
|
-
("before", before),
|
|
2984
|
-
("count", count),
|
|
2985
|
-
("limit", limit),
|
|
2986
|
-
("show", show),
|
|
2987
|
-
("sr_detail", sr_detail),
|
|
2988
|
-
]
|
|
2989
|
-
if v is not None
|
|
2990
|
-
}
|
|
2991
|
-
response = self._get(url, params=query_params)
|
|
2992
|
-
response.raise_for_status()
|
|
2993
|
-
return response.json()
|
|
2994
|
-
|
|
2995
|
-
def message_sent(
|
|
2996
|
-
self,
|
|
2997
|
-
mark=None,
|
|
2998
|
-
mid=None,
|
|
2999
|
-
after=None,
|
|
3000
|
-
before=None,
|
|
3001
|
-
count=None,
|
|
3002
|
-
limit=None,
|
|
3003
|
-
show=None,
|
|
3004
|
-
sr_detail=None,
|
|
3005
|
-
) -> Any:
|
|
3006
|
-
"""
|
|
3007
|
-
Get the current user's sent messages.
|
|
3008
|
-
|
|
3009
|
-
Args:
|
|
3010
|
-
mark (string): one of (true, false)
|
|
3011
|
-
mid (string): No description provided.
|
|
3012
|
-
after (string): fullname of a thing
|
|
3013
|
-
before (string): fullname of a thing
|
|
3014
|
-
count (string): a positive integer (default: 0)
|
|
3015
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
3016
|
-
show (string): (optional) the string "all"
|
|
3017
|
-
sr_detail (string): (optional) expand subreddits
|
|
3018
|
-
|
|
3019
|
-
Returns:
|
|
3020
|
-
Any: API response data.
|
|
3021
|
-
|
|
3022
|
-
Tags:
|
|
3023
|
-
private messages
|
|
3024
|
-
"""
|
|
3025
|
-
url = f"{self.base_url}/message/sent"
|
|
3026
|
-
query_params = {
|
|
3027
|
-
k: v
|
|
3028
|
-
for k, v in [
|
|
3029
|
-
("mark", mark),
|
|
3030
|
-
("mid", mid),
|
|
3031
|
-
("after", after),
|
|
3032
|
-
("before", before),
|
|
3033
|
-
("count", count),
|
|
3034
|
-
("limit", limit),
|
|
3035
|
-
("show", show),
|
|
3036
|
-
("sr_detail", sr_detail),
|
|
3037
|
-
]
|
|
3038
|
-
if v is not None
|
|
3039
|
-
}
|
|
3040
|
-
response = self._get(url, params=query_params)
|
|
3041
|
-
response.raise_for_status()
|
|
3042
|
-
return response.json()
|
|
3043
|
-
|
|
3044
|
-
def message_unread(
|
|
3045
|
-
self,
|
|
3046
|
-
mark=None,
|
|
3047
|
-
mid=None,
|
|
3048
|
-
after=None,
|
|
3049
|
-
before=None,
|
|
3050
|
-
count=None,
|
|
3051
|
-
limit=None,
|
|
3052
|
-
show=None,
|
|
3053
|
-
sr_detail=None,
|
|
3054
|
-
) -> Any:
|
|
3055
|
-
"""
|
|
3056
|
-
Get the current user's unread messages.
|
|
3057
|
-
|
|
3058
|
-
Args:
|
|
3059
|
-
mark (string): one of (true, false)
|
|
3060
|
-
mid (string): No description provided.
|
|
3061
|
-
after (string): fullname of a thing
|
|
3062
|
-
before (string): fullname of a thing
|
|
3063
|
-
count (string): a positive integer (default: 0)
|
|
3064
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
3065
|
-
show (string): (optional) the string "all"
|
|
3066
|
-
sr_detail (string): (optional) expand subreddits
|
|
3067
|
-
|
|
3068
|
-
Returns:
|
|
3069
|
-
Any: API response data.
|
|
3070
|
-
|
|
3071
|
-
Tags:
|
|
3072
|
-
private messages
|
|
3073
|
-
"""
|
|
3074
|
-
url = f"{self.base_url}/message/unread"
|
|
3075
|
-
query_params = {
|
|
3076
|
-
k: v
|
|
3077
|
-
for k, v in [
|
|
3078
|
-
("mark", mark),
|
|
3079
|
-
("mid", mid),
|
|
3080
|
-
("after", after),
|
|
3081
|
-
("before", before),
|
|
3082
|
-
("count", count),
|
|
3083
|
-
("limit", limit),
|
|
3084
|
-
("show", show),
|
|
3085
|
-
("sr_detail", sr_detail),
|
|
3086
|
-
]
|
|
3087
|
-
if v is not None
|
|
3088
|
-
}
|
|
3089
|
-
response = self._get(url, params=query_params)
|
|
3090
|
-
response.raise_for_status()
|
|
3091
|
-
return response.json()
|
|
3092
|
-
|
|
3093
|
-
def search(
|
|
3094
|
-
self,
|
|
3095
|
-
after=None,
|
|
3096
|
-
before=None,
|
|
3097
|
-
category=None,
|
|
3098
|
-
count=None,
|
|
3099
|
-
include_facets=None,
|
|
3100
|
-
limit=None,
|
|
3101
|
-
q=None,
|
|
3102
|
-
restrict_sr=None,
|
|
3103
|
-
show=None,
|
|
3104
|
-
sort=None,
|
|
3105
|
-
sr_detail=None,
|
|
3106
|
-
t=None,
|
|
3107
|
-
type=None,
|
|
3108
|
-
) -> Any:
|
|
3109
|
-
"""
|
|
3110
|
-
Search for posts, comments, and users.
|
|
3111
|
-
|
|
3112
|
-
Args:
|
|
3113
|
-
after (string): fullname of a thing
|
|
3114
|
-
before (string): fullname of a thing
|
|
3115
|
-
category (string): a string no longer than 5 characters
|
|
3116
|
-
count (string): a positive integer (default: 0)
|
|
3117
|
-
include_facets (string): boolean value (true, false)
|
|
3118
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
3119
|
-
q (string): a string no longer than 512 characters
|
|
3120
|
-
restrict_sr (string): boolean value (true, false)
|
|
3121
|
-
show (string): (optional) the string "all" Example: 'all'.
|
|
3122
|
-
sort (string): one of (relevance, hot, top, new, comments)
|
|
3123
|
-
sr_detail (string): (optional) expand subreddits
|
|
3124
|
-
t (string): one of (hour, day, week, month, year, all)
|
|
3125
|
-
type (string): (optional) A comma-separated list of result types (sr, link, user)
|
|
3126
|
-
|
|
3127
|
-
Returns:
|
|
3128
|
-
Any: API response data.
|
|
3129
|
-
|
|
3130
|
-
Tags:
|
|
3131
|
-
search
|
|
3132
|
-
"""
|
|
3133
|
-
url = f"{self.base_url}/search"
|
|
3134
|
-
query_params = {
|
|
3135
|
-
k: v
|
|
3136
|
-
for k, v in [
|
|
3137
|
-
("after", after),
|
|
3138
|
-
("before", before),
|
|
3139
|
-
("category", category),
|
|
3140
|
-
("count", count),
|
|
3141
|
-
("include_facets", include_facets),
|
|
3142
|
-
("limit", limit),
|
|
3143
|
-
("q", q),
|
|
3144
|
-
("restrict_sr", restrict_sr),
|
|
3145
|
-
("show", show),
|
|
3146
|
-
("sort", sort),
|
|
3147
|
-
("sr_detail", sr_detail),
|
|
3148
|
-
("t", t),
|
|
3149
|
-
("type", type),
|
|
3150
|
-
]
|
|
3151
|
-
if v is not None
|
|
3152
|
-
}
|
|
3153
|
-
response = self._get(url, params=query_params)
|
|
3154
|
-
response.raise_for_status()
|
|
3155
|
-
return response.json()
|
|
3156
|
-
|
|
3157
|
-
def r_subreddit_search(
|
|
3158
|
-
self,
|
|
3159
|
-
subreddit,
|
|
3160
|
-
after=None,
|
|
3161
|
-
before=None,
|
|
3162
|
-
category=None,
|
|
3163
|
-
count=None,
|
|
3164
|
-
include_facets=None,
|
|
3165
|
-
limit=None,
|
|
3166
|
-
q=None,
|
|
3167
|
-
restrict_sr=None,
|
|
3168
|
-
show=None,
|
|
3169
|
-
sort=None,
|
|
3170
|
-
sr_detail=None,
|
|
3171
|
-
t=None,
|
|
3172
|
-
type=None,
|
|
3173
|
-
) -> Any:
|
|
3174
|
-
"""
|
|
3175
|
-
Search for posts, comments, and users in a subreddit.
|
|
3176
|
-
|
|
3177
|
-
Args:
|
|
3178
|
-
subreddit (string): subreddit
|
|
3179
|
-
after (string): fullname of a thing
|
|
3180
|
-
before (string): fullname of a thing
|
|
3181
|
-
category (string): a string no longer than 5 characters
|
|
3182
|
-
count (string): a positive integer (default: 0)
|
|
3183
|
-
include_facets (string): boolean value (true, false)
|
|
3184
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
3185
|
-
q (string): a string no longer than 512 characters
|
|
3186
|
-
restrict_sr (string): boolean value (true, false)
|
|
3187
|
-
show (string): (optional) the string "all" Example: 'all'.
|
|
3188
|
-
sort (string): one of (relevance, hot, top, new, comments)
|
|
3189
|
-
sr_detail (string): (optional) expand subreddits
|
|
3190
|
-
t (string): one of (hour, day, week, month, year, all)
|
|
3191
|
-
type (string): (optional) A comma-separated list of result types (sr, link, user)
|
|
3192
|
-
|
|
3193
|
-
Returns:
|
|
3194
|
-
Any: API response data.
|
|
3195
|
-
|
|
3196
|
-
Tags:
|
|
3197
|
-
search
|
|
3198
|
-
"""
|
|
3199
|
-
if subreddit is None:
|
|
3200
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3201
|
-
url = f"{self.base_url}/r/{subreddit}/search"
|
|
3202
|
-
query_params = {
|
|
3203
|
-
k: v
|
|
3204
|
-
for k, v in [
|
|
3205
|
-
("after", after),
|
|
3206
|
-
("before", before),
|
|
3207
|
-
("category", category),
|
|
3208
|
-
("count", count),
|
|
3209
|
-
("include_facets", include_facets),
|
|
3210
|
-
("limit", limit),
|
|
3211
|
-
("q", q),
|
|
3212
|
-
("restrict_sr", restrict_sr),
|
|
3213
|
-
("show", show),
|
|
3214
|
-
("sort", sort),
|
|
3215
|
-
("sr_detail", sr_detail),
|
|
3216
|
-
("t", t),
|
|
3217
|
-
("type", type),
|
|
3218
|
-
]
|
|
3219
|
-
if v is not None
|
|
3220
|
-
}
|
|
3221
|
-
response = self._get(url, params=query_params)
|
|
3222
|
-
response.raise_for_status()
|
|
3223
|
-
return response.json()
|
|
3224
|
-
|
|
3225
|
-
def api_search_reddit_names(
|
|
3226
|
-
self,
|
|
3227
|
-
exact=None,
|
|
3228
|
-
include_over_18=None,
|
|
3229
|
-
include_unadvertisable=None,
|
|
3230
|
-
query=None,
|
|
3231
|
-
search_query_id=None,
|
|
3232
|
-
typeahead_active=None,
|
|
3233
|
-
) -> Any:
|
|
3234
|
-
"""
|
|
3235
|
-
Search for subreddits.
|
|
3236
|
-
|
|
3237
|
-
Args:
|
|
3238
|
-
exact (string): boolean value (true, false) Example: 'false'.
|
|
3239
|
-
include_over_18 (string): boolean value (true, false) Example: 'true'.
|
|
3240
|
-
include_unadvertisable (string): boolean value (true, false) Example: 'true'.
|
|
3241
|
-
query (string): a string up to 50 characters long, consisting of printable characters
|
|
3242
|
-
search_query_id (string): a UUID
|
|
3243
|
-
typeahead_active (string): boolean value or None Example: 'None'.
|
|
3244
|
-
|
|
3245
|
-
Returns:
|
|
3246
|
-
Any: API response data.
|
|
3247
|
-
|
|
3248
|
-
Tags:
|
|
3249
|
-
subreddits
|
|
3250
|
-
"""
|
|
3251
|
-
url = f"{self.base_url}/api/search_reddit_names"
|
|
3252
|
-
query_params = {
|
|
3253
|
-
k: v
|
|
3254
|
-
for k, v in [
|
|
3255
|
-
("exact", exact),
|
|
3256
|
-
("include_over_18", include_over_18),
|
|
3257
|
-
("include_unadvertisable", include_unadvertisable),
|
|
3258
|
-
("query", query),
|
|
3259
|
-
("search_query_id", search_query_id),
|
|
3260
|
-
("typeahead_active", typeahead_active),
|
|
3261
|
-
]
|
|
3262
|
-
if v is not None
|
|
3263
|
-
}
|
|
3264
|
-
response = self._get(url, params=query_params)
|
|
3265
|
-
response.raise_for_status()
|
|
3266
|
-
return response.json()
|
|
3267
|
-
|
|
3268
|
-
def api_subreddit_autocomplete(
|
|
3269
|
-
self, include_over_18=None, include_profiles=None, query=None
|
|
3270
|
-
) -> Any:
|
|
3271
|
-
"""
|
|
3272
|
-
Search for subreddits.
|
|
3273
|
-
|
|
3274
|
-
Args:
|
|
3275
|
-
include_over_18 (string): boolean value (true, false)
|
|
3276
|
-
include_profiles (string): boolean value (true, false)
|
|
3277
|
-
query (string): a string up to 25 characters long, consisting of printable characters.
|
|
3278
|
-
|
|
3279
|
-
Returns:
|
|
3280
|
-
Any: API response data.
|
|
3281
|
-
|
|
3282
|
-
Tags:
|
|
3283
|
-
subreddits
|
|
3284
|
-
"""
|
|
3285
|
-
url = f"{self.base_url}/api/subreddit_autocomplete"
|
|
3286
|
-
query_params = {
|
|
3287
|
-
k: v
|
|
3288
|
-
for k, v in [
|
|
3289
|
-
("include_over_18", include_over_18),
|
|
3290
|
-
("include_profiles", include_profiles),
|
|
3291
|
-
("query", query),
|
|
3292
|
-
]
|
|
3293
|
-
if v is not None
|
|
3294
|
-
}
|
|
3295
|
-
response = self._get(url, params=query_params)
|
|
3296
|
-
response.raise_for_status()
|
|
3297
|
-
return response.json()
|
|
3298
|
-
|
|
3299
|
-
def api_subreddit_autocomplete_v2(
|
|
3300
|
-
self,
|
|
3301
|
-
include_over_18=None,
|
|
3302
|
-
include_profiles=None,
|
|
3303
|
-
limit=None,
|
|
3304
|
-
query=None,
|
|
3305
|
-
search_query_id=None,
|
|
3306
|
-
typeahead_active=None,
|
|
3307
|
-
) -> Any:
|
|
3308
|
-
"""
|
|
3309
|
-
Search for subreddits.
|
|
3310
|
-
|
|
3311
|
-
Args:
|
|
3312
|
-
include_over_18 (string): boolean value (true, false)
|
|
3313
|
-
include_profiles (string): boolean value (true, false)
|
|
3314
|
-
limit (string): an integer between 1 and 10 (default: 5)
|
|
3315
|
-
query (string): a string up to 25 characters long, consisting of printable characters.
|
|
3316
|
-
search_query_id (string): a UUID
|
|
3317
|
-
typeahead_active (string): boolean value (true, false) or None
|
|
3318
|
-
|
|
3319
|
-
Returns:
|
|
3320
|
-
Any: API response data.
|
|
3321
|
-
|
|
3322
|
-
Tags:
|
|
3323
|
-
subreddits
|
|
3324
|
-
"""
|
|
3325
|
-
url = f"{self.base_url}/api/subreddit_autocomplete_v2"
|
|
3326
|
-
query_params = {
|
|
3327
|
-
k: v
|
|
3328
|
-
for k, v in [
|
|
3329
|
-
("include_over_18", include_over_18),
|
|
3330
|
-
("include_profiles", include_profiles),
|
|
3331
|
-
("limit", limit),
|
|
3332
|
-
("query", query),
|
|
3333
|
-
("search_query_id", search_query_id),
|
|
3334
|
-
("typeahead_active", typeahead_active),
|
|
3335
|
-
]
|
|
3336
|
-
if v is not None
|
|
3337
|
-
}
|
|
3338
|
-
response = self._get(url, params=query_params)
|
|
3339
|
-
response.raise_for_status()
|
|
3340
|
-
return response.json()
|
|
3341
|
-
|
|
3342
|
-
def api_v1_subreddit_post_requirements(self, subreddit) -> Any:
|
|
3343
|
-
"""
|
|
3344
|
-
Get the post requirements for a subreddit.
|
|
3345
|
-
|
|
3346
|
-
Args:
|
|
3347
|
-
subreddit (string): subreddit
|
|
3348
|
-
|
|
3349
|
-
Returns:
|
|
3350
|
-
Any: API response data.
|
|
3351
|
-
|
|
3352
|
-
Tags:
|
|
3353
|
-
subreddits
|
|
3354
|
-
"""
|
|
3355
|
-
if subreddit is None:
|
|
3356
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3357
|
-
url = f"{self.base_url}/api/v1/{subreddit}/post_requirements"
|
|
3358
|
-
query_params = {}
|
|
3359
|
-
response = self._get(url, params=query_params)
|
|
3360
|
-
response.raise_for_status()
|
|
3361
|
-
return response.json()
|
|
3362
|
-
|
|
3363
|
-
def r_subreddit_about_banned(
|
|
3364
|
-
self,
|
|
3365
|
-
subreddit,
|
|
3366
|
-
after=None,
|
|
3367
|
-
before=None,
|
|
3368
|
-
count=None,
|
|
3369
|
-
limit=None,
|
|
3370
|
-
show=None,
|
|
3371
|
-
sr_detail=None,
|
|
3372
|
-
user=None,
|
|
3373
|
-
) -> Any:
|
|
3374
|
-
"""
|
|
3375
|
-
Get the banned users in a subreddit.
|
|
3376
|
-
|
|
3377
|
-
Args:
|
|
3378
|
-
subreddit (string): subreddit
|
|
3379
|
-
after (string): fullname of a thing
|
|
3380
|
-
before (string): fullname of a thing
|
|
3381
|
-
count (string): a positive integer (default: 0)
|
|
3382
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
3383
|
-
show (string): (optional) the string "all" Example: 'all'.
|
|
3384
|
-
sr_detail (string): (optional) expand subreddits
|
|
3385
|
-
user (string): A valid, existing reddit username
|
|
3386
|
-
|
|
3387
|
-
Returns:
|
|
3388
|
-
Any: API response data.
|
|
3389
|
-
|
|
3390
|
-
Tags:
|
|
3391
|
-
subreddits
|
|
3392
|
-
"""
|
|
3393
|
-
if subreddit is None:
|
|
3394
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3395
|
-
url = f"{self.base_url}/r/{subreddit}/about/banned"
|
|
3396
|
-
query_params = {
|
|
3397
|
-
k: v
|
|
3398
|
-
for k, v in [
|
|
3399
|
-
("after", after),
|
|
3400
|
-
("before", before),
|
|
3401
|
-
("count", count),
|
|
3402
|
-
("limit", limit),
|
|
3403
|
-
("show", show),
|
|
3404
|
-
("sr_detail", sr_detail),
|
|
3405
|
-
("user", user),
|
|
3406
|
-
]
|
|
3407
|
-
if v is not None
|
|
3408
|
-
}
|
|
3409
|
-
response = self._get(url, params=query_params)
|
|
3410
|
-
response.raise_for_status()
|
|
3411
|
-
return response.json()
|
|
3412
|
-
|
|
3413
|
-
def r_subreddit_about(self, subreddit) -> Any:
|
|
3414
|
-
"""
|
|
3415
|
-
Get the about information for a subreddit.
|
|
3416
|
-
|
|
3417
|
-
Args:
|
|
3418
|
-
subreddit (string): subreddit
|
|
3419
|
-
|
|
3420
|
-
Returns:
|
|
3421
|
-
Any: API response data.
|
|
3422
|
-
|
|
3423
|
-
Tags:
|
|
3424
|
-
subreddits
|
|
3425
|
-
"""
|
|
3426
|
-
if subreddit is None:
|
|
3427
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3428
|
-
url = f"{self.base_url}/r/{subreddit}/about"
|
|
3429
|
-
query_params = {}
|
|
3430
|
-
response = self._get(url, params=query_params)
|
|
3431
|
-
response.raise_for_status()
|
|
3432
|
-
return response.json()
|
|
3433
|
-
|
|
3434
|
-
def r_subreddit_about_edit(self, subreddit) -> Any:
|
|
3435
|
-
"""
|
|
3436
|
-
Get the edit information for a subreddit.
|
|
3437
|
-
|
|
3438
|
-
Args:
|
|
3439
|
-
subreddit (string): subreddit
|
|
3440
|
-
|
|
3441
|
-
Returns:
|
|
3442
|
-
Any: API response data.
|
|
3443
|
-
|
|
3444
|
-
Tags:
|
|
3445
|
-
subreddits
|
|
3446
|
-
"""
|
|
3447
|
-
if subreddit is None:
|
|
3448
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3449
|
-
url = f"{self.base_url}/r/{subreddit}/about/edit"
|
|
3450
|
-
query_params = {}
|
|
3451
|
-
response = self._get(url, params=query_params)
|
|
3452
|
-
response.raise_for_status()
|
|
3453
|
-
return response.json()
|
|
3454
|
-
|
|
3455
|
-
def r_subreddit_about_contributors(
|
|
3456
|
-
self,
|
|
3457
|
-
subreddit,
|
|
3458
|
-
after=None,
|
|
3459
|
-
before=None,
|
|
3460
|
-
count=None,
|
|
3461
|
-
limit=None,
|
|
3462
|
-
show=None,
|
|
3463
|
-
sr_detail=None,
|
|
3464
|
-
user=None,
|
|
3465
|
-
) -> Any:
|
|
3466
|
-
"""
|
|
3467
|
-
Get the contributors for a subreddit.
|
|
3468
|
-
|
|
3469
|
-
Args:
|
|
3470
|
-
subreddit (string): subreddit
|
|
3471
|
-
after (string): fullname of a thing
|
|
3472
|
-
before (string): fullname of a thing
|
|
3473
|
-
count (string): a positive integer (default: 0)
|
|
3474
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
3475
|
-
show (string): (optional) the string "all" Example: 'all'.
|
|
3476
|
-
sr_detail (string): (optional) expand subreddits
|
|
3477
|
-
user (string): A valid, existing reddit username
|
|
3478
|
-
|
|
3479
|
-
Returns:
|
|
3480
|
-
Any: API response data.
|
|
3481
|
-
|
|
3482
|
-
Tags:
|
|
3483
|
-
subreddits
|
|
3484
|
-
"""
|
|
3485
|
-
if subreddit is None:
|
|
3486
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3487
|
-
url = f"{self.base_url}/r/{subreddit}/about/contributors"
|
|
3488
|
-
query_params = {
|
|
3489
|
-
k: v
|
|
3490
|
-
for k, v in [
|
|
3491
|
-
("after", after),
|
|
3492
|
-
("before", before),
|
|
3493
|
-
("count", count),
|
|
3494
|
-
("limit", limit),
|
|
3495
|
-
("show", show),
|
|
3496
|
-
("sr_detail", sr_detail),
|
|
3497
|
-
("user", user),
|
|
3498
|
-
]
|
|
3499
|
-
if v is not None
|
|
3500
|
-
}
|
|
3501
|
-
response = self._get(url, params=query_params)
|
|
3502
|
-
response.raise_for_status()
|
|
3503
|
-
return response.json()
|
|
3504
|
-
|
|
3505
|
-
def r_subreddit_about_moderators(
|
|
3506
|
-
self,
|
|
3507
|
-
subreddit,
|
|
3508
|
-
after=None,
|
|
3509
|
-
before=None,
|
|
3510
|
-
count=None,
|
|
3511
|
-
limit=None,
|
|
3512
|
-
show=None,
|
|
3513
|
-
sr_detail=None,
|
|
3514
|
-
user=None,
|
|
3515
|
-
) -> Any:
|
|
3516
|
-
"""
|
|
3517
|
-
Get the moderators for a subreddit.
|
|
3518
|
-
|
|
3519
|
-
Args:
|
|
3520
|
-
subreddit (string): subreddit
|
|
3521
|
-
after (string): fullname of a thing
|
|
3522
|
-
before (string): fullname of a thing
|
|
3523
|
-
count (string): a positive integer (default: 0)
|
|
3524
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
3525
|
-
show (string): (optional) the string "all" Example: 'all'.
|
|
3526
|
-
sr_detail (string): (optional) expand subreddits
|
|
3527
|
-
user (string): A valid, existing reddit username
|
|
3528
|
-
|
|
3529
|
-
Returns:
|
|
3530
|
-
Any: API response data.
|
|
3531
|
-
|
|
3532
|
-
Tags:
|
|
3533
|
-
subreddits
|
|
3534
|
-
"""
|
|
3535
|
-
if subreddit is None:
|
|
3536
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3537
|
-
url = f"{self.base_url}/r/{subreddit}/about/moderators"
|
|
3538
|
-
query_params = {
|
|
3539
|
-
k: v
|
|
3540
|
-
for k, v in [
|
|
3541
|
-
("after", after),
|
|
3542
|
-
("before", before),
|
|
3543
|
-
("count", count),
|
|
3544
|
-
("limit", limit),
|
|
3545
|
-
("show", show),
|
|
3546
|
-
("sr_detail", sr_detail),
|
|
3547
|
-
("user", user),
|
|
3548
|
-
]
|
|
3549
|
-
if v is not None
|
|
3550
|
-
}
|
|
3551
|
-
response = self._get(url, params=query_params)
|
|
3552
|
-
response.raise_for_status()
|
|
3553
|
-
return response.json()
|
|
3554
|
-
|
|
3555
|
-
def r_subreddit_about_muted(
|
|
3556
|
-
self,
|
|
3557
|
-
subreddit,
|
|
3558
|
-
after=None,
|
|
3559
|
-
before=None,
|
|
3560
|
-
count=None,
|
|
3561
|
-
limit=None,
|
|
3562
|
-
show=None,
|
|
3563
|
-
sr_detail=None,
|
|
3564
|
-
user=None,
|
|
3565
|
-
) -> Any:
|
|
3566
|
-
"""
|
|
3567
|
-
Get the muted users for a subreddit.
|
|
3568
|
-
|
|
3569
|
-
Args:
|
|
3570
|
-
subreddit (string): subreddit
|
|
3571
|
-
after (string): fullname of a thing
|
|
3572
|
-
before (string): fullname of a thing
|
|
3573
|
-
count (string): a positive integer (default: 0)
|
|
3574
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
3575
|
-
show (string): (optional) the string "all" Example: 'all'.
|
|
3576
|
-
sr_detail (string): (optional) expand subreddits
|
|
3577
|
-
user (string): A valid, existing reddit username
|
|
3578
|
-
|
|
3579
|
-
Returns:
|
|
3580
|
-
Any: API response data.
|
|
3581
|
-
|
|
3582
|
-
Tags:
|
|
3583
|
-
subreddits
|
|
3584
|
-
"""
|
|
3585
|
-
if subreddit is None:
|
|
3586
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3587
|
-
url = f"{self.base_url}/r/{subreddit}/about/muted"
|
|
3588
|
-
query_params = {
|
|
3589
|
-
k: v
|
|
3590
|
-
for k, v in [
|
|
3591
|
-
("after", after),
|
|
3592
|
-
("before", before),
|
|
3593
|
-
("count", count),
|
|
3594
|
-
("limit", limit),
|
|
3595
|
-
("show", show),
|
|
3596
|
-
("sr_detail", sr_detail),
|
|
3597
|
-
("user", user),
|
|
3598
|
-
]
|
|
3599
|
-
if v is not None
|
|
3600
|
-
}
|
|
3601
|
-
response = self._get(url, params=query_params)
|
|
3602
|
-
response.raise_for_status()
|
|
3603
|
-
return response.json()
|
|
3604
|
-
|
|
3605
|
-
def r_subreddit_about_rules(self, subreddit) -> Any:
|
|
3606
|
-
"""
|
|
3607
|
-
Get the rules for a subreddit.
|
|
3608
|
-
|
|
3609
|
-
Args:
|
|
3610
|
-
subreddit (string): subreddit
|
|
3611
|
-
|
|
3612
|
-
Returns:
|
|
3613
|
-
Any: API response data.
|
|
3614
|
-
|
|
3615
|
-
Tags:
|
|
3616
|
-
subreddits
|
|
3617
|
-
"""
|
|
3618
|
-
if subreddit is None:
|
|
3619
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3620
|
-
url = f"{self.base_url}/r/{subreddit}/about/rules"
|
|
3621
|
-
query_params = {}
|
|
3622
|
-
response = self._get(url, params=query_params)
|
|
3623
|
-
response.raise_for_status()
|
|
3624
|
-
return response.json()
|
|
3625
|
-
|
|
3626
|
-
def r_subreddit_about_sticky(self, subreddit, num=None) -> Any:
|
|
3627
|
-
"""
|
|
3628
|
-
Get the sticky posts for a subreddit.
|
|
3629
|
-
|
|
3630
|
-
Args:
|
|
3631
|
-
subreddit (string): subreddit
|
|
3632
|
-
num (string): an integer between 1 and 2 (default: 1)
|
|
3633
|
-
|
|
3634
|
-
Returns:
|
|
3635
|
-
Any: API response data.
|
|
3636
|
-
|
|
3637
|
-
Tags:
|
|
3638
|
-
subreddits
|
|
3639
|
-
"""
|
|
3640
|
-
if subreddit is None:
|
|
3641
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3642
|
-
url = f"{self.base_url}/r/{subreddit}/sticky"
|
|
3643
|
-
query_params = {k: v for k, v in [("num", num)] if v is not None}
|
|
3644
|
-
response = self._get(url, params=query_params)
|
|
3645
|
-
response.raise_for_status()
|
|
3646
|
-
return response.json()
|
|
3647
|
-
|
|
3648
|
-
def r_subreddit_about_traffic(self, subreddit) -> Any:
|
|
3649
|
-
"""
|
|
3650
|
-
Get the traffic for a subreddit.
|
|
3651
|
-
|
|
3652
|
-
Args:
|
|
3653
|
-
subreddit (string): subreddit
|
|
3654
|
-
|
|
3655
|
-
Returns:
|
|
3656
|
-
Any: API response data.
|
|
3657
|
-
|
|
3658
|
-
Tags:
|
|
3659
|
-
subreddits
|
|
3660
|
-
"""
|
|
3661
|
-
if subreddit is None:
|
|
3662
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3663
|
-
url = f"{self.base_url}/r/{subreddit}/about/traffic"
|
|
3664
|
-
query_params = {}
|
|
3665
|
-
response = self._get(url, params=query_params)
|
|
3666
|
-
response.raise_for_status()
|
|
3667
|
-
return response.json()
|
|
3668
|
-
|
|
3669
|
-
def r_subreddit_about_wikibanned(
|
|
3670
|
-
self,
|
|
3671
|
-
subreddit,
|
|
3672
|
-
after=None,
|
|
3673
|
-
before=None,
|
|
3674
|
-
count=None,
|
|
3675
|
-
limit=None,
|
|
3676
|
-
show=None,
|
|
3677
|
-
sr_detail=None,
|
|
3678
|
-
user=None,
|
|
3679
|
-
) -> Any:
|
|
3680
|
-
"""
|
|
3681
|
-
Get the wikibanned users for a subreddit.
|
|
3682
|
-
|
|
3683
|
-
Args:
|
|
3684
|
-
subreddit (string): subreddit
|
|
3685
|
-
after (string): fullname of a thing
|
|
3686
|
-
before (string): fullname of a thing
|
|
3687
|
-
count (string): a positive integer (default: 0)
|
|
3688
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
3689
|
-
show (string): (optional) the string "all" Example: 'all'.
|
|
3690
|
-
sr_detail (string): (optional) expand subreddits
|
|
3691
|
-
user (string): A valid, existing reddit username
|
|
3692
|
-
|
|
3693
|
-
Returns:
|
|
3694
|
-
Any: API response data.
|
|
3695
|
-
|
|
3696
|
-
Tags:
|
|
3697
|
-
subreddits
|
|
3698
|
-
"""
|
|
3699
|
-
if subreddit is None:
|
|
3700
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3701
|
-
url = f"{self.base_url}/r/{subreddit}/about/wikibanned"
|
|
3702
|
-
query_params = {
|
|
3703
|
-
k: v
|
|
3704
|
-
for k, v in [
|
|
3705
|
-
("after", after),
|
|
3706
|
-
("before", before),
|
|
3707
|
-
("count", count),
|
|
3708
|
-
("limit", limit),
|
|
3709
|
-
("show", show),
|
|
3710
|
-
("sr_detail", sr_detail),
|
|
3711
|
-
("user", user),
|
|
3712
|
-
]
|
|
3713
|
-
if v is not None
|
|
3714
|
-
}
|
|
3715
|
-
response = self._get(url, params=query_params)
|
|
3716
|
-
response.raise_for_status()
|
|
3717
|
-
return response.json()
|
|
3718
|
-
|
|
3719
|
-
def r_subreddit_about_wikicontributors(
|
|
3720
|
-
self,
|
|
3721
|
-
subreddit,
|
|
3722
|
-
after=None,
|
|
3723
|
-
before=None,
|
|
3724
|
-
count=None,
|
|
3725
|
-
limit=None,
|
|
3726
|
-
show=None,
|
|
3727
|
-
sr_detail=None,
|
|
3728
|
-
user=None,
|
|
3729
|
-
) -> Any:
|
|
3730
|
-
"""
|
|
3731
|
-
Get the wikicontributors for a subreddit.
|
|
3732
|
-
|
|
3733
|
-
Args:
|
|
3734
|
-
subreddit (string): subreddit
|
|
3735
|
-
after (string): fullname of a thing
|
|
3736
|
-
before (string): fullname of a thing
|
|
3737
|
-
count (string): a positive integer (default: 0)
|
|
3738
|
-
limit (string): the maximum number of items desired (default: 25, maximum: 100)
|
|
3739
|
-
show (string): (optional) the string "all" Example: 'all'.
|
|
3740
|
-
sr_detail (string): (optional) expand subreddits
|
|
3741
|
-
user (string): A valid, existing reddit username
|
|
3742
|
-
|
|
3743
|
-
Returns:
|
|
3744
|
-
Any: API response data.
|
|
3745
|
-
|
|
3746
|
-
Tags:
|
|
3747
|
-
subreddits
|
|
3748
|
-
"""
|
|
3749
|
-
if subreddit is None:
|
|
3750
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
3751
|
-
url = f"{self.base_url}/r/{subreddit}/about/wikicontributors"
|
|
3752
|
-
query_params = {
|
|
3753
|
-
k: v
|
|
3754
|
-
for k, v in [
|
|
3755
|
-
("after", after),
|
|
3756
|
-
("before", before),
|
|
3757
|
-
("count", count),
|
|
3758
|
-
("limit", limit),
|
|
3759
|
-
("show", show),
|
|
3760
|
-
("sr_detail", sr_detail),
|
|
3761
|
-
("user", user),
|
|
3762
|
-
]
|
|
3763
|
-
if v is not None
|
|
3764
|
-
}
|
|
3765
|
-
response = self._get(url, params=query_params)
|
|
3766
|
-
response.raise_for_status()
|
|
3767
|
-
return response.json()
|
|
3768
|
-
|
|
3769
|
-
def r_subreddit_api_submit_text(self, subreddit) -> Any:
|
|
347
|
+
def get_post_comments_details(self, post_id: str) -> Any:
|
|
3770
348
|
"""
|
|
3771
|
-
Get
|
|
349
|
+
Get post details and comments like title, author, score, etc.
|
|
3772
350
|
|
|
3773
351
|
Args:
|
|
3774
|
-
|
|
352
|
+
post_id (string): The Reddit post ID ( e.g. '1m734tx' for https://www.reddit.com/r/mcp/comments/1m734tx/comment/n4occ77/)
|
|
3775
353
|
|
|
3776
354
|
Returns:
|
|
3777
|
-
Any: API response data.
|
|
355
|
+
Any: API response data containing post details and comments.
|
|
3778
356
|
|
|
3779
357
|
Tags:
|
|
3780
|
-
|
|
358
|
+
listings, comments, posts, important
|
|
3781
359
|
"""
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
url = f"{self.base_url}/r/{subreddit}/api/submit_text"
|
|
360
|
+
|
|
361
|
+
url = f"{self.base_url}/comments/{post_id}.json"
|
|
3785
362
|
query_params = {}
|
|
3786
363
|
response = self._get(url, params=query_params)
|
|
3787
|
-
|
|
3788
|
-
return response.json()
|
|
364
|
+
return self._handle_response(response)
|
|
3789
365
|
|
|
3790
|
-
def
|
|
366
|
+
def get_controversial_posts(
|
|
3791
367
|
self,
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
sr_detail=None,
|
|
368
|
+
after: str = None,
|
|
369
|
+
before: str = None,
|
|
370
|
+
count: int = None,
|
|
371
|
+
limit: int = None,
|
|
372
|
+
show: str = None,
|
|
373
|
+
sr_detail: str = None,
|
|
3799
374
|
) -> Any:
|
|
3800
375
|
"""
|
|
3801
|
-
|
|
376
|
+
Retrieves a list of the most controversial posts across Reddit.
|
|
3802
377
|
|
|
3803
378
|
Args:
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
sr_detail (string): (optional) expand subreddits
|
|
379
|
+
after: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results after.
|
|
380
|
+
before: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results before.
|
|
381
|
+
count: Optional. A positive integer (default: 0) for the number of items already seen in the listing.
|
|
382
|
+
limit: Optional. The maximum number of items desired (default: 25, maximum: 100).
|
|
383
|
+
show: Optional. The string "all" to show all posts.
|
|
384
|
+
sr_detail: Optional. Expand subreddit details.
|
|
3811
385
|
|
|
3812
386
|
Returns:
|
|
3813
|
-
Any: API response data.
|
|
387
|
+
Any: API response data containing a list of controversial posts.
|
|
3814
388
|
|
|
3815
389
|
Tags:
|
|
3816
|
-
|
|
390
|
+
listings, posts, controversial, read-only
|
|
3817
391
|
"""
|
|
3818
|
-
|
|
3819
|
-
raise ValueError("Missing required parameter 'where'")
|
|
3820
|
-
url = f"{self.base_url}/subreddits/mine/{where}"
|
|
392
|
+
url = f"{self.base_url}/controversial"
|
|
3821
393
|
query_params = {
|
|
3822
394
|
k: v
|
|
3823
395
|
for k, v in [
|
|
@@ -3834,57 +406,45 @@ class RedditApp(APIApplication):
|
|
|
3834
406
|
response.raise_for_status()
|
|
3835
407
|
return response.json()
|
|
3836
408
|
|
|
3837
|
-
def
|
|
409
|
+
def get_hot_posts(
|
|
3838
410
|
self,
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
show_users=None,
|
|
3847
|
-
sort=None,
|
|
3848
|
-
sr_detail=None,
|
|
3849
|
-
typeahead_active=None,
|
|
411
|
+
g: str = None,
|
|
412
|
+
after: str = None,
|
|
413
|
+
before: str = None,
|
|
414
|
+
count: int = None,
|
|
415
|
+
limit: int = None,
|
|
416
|
+
show: str = None,
|
|
417
|
+
sr_detail: str = None,
|
|
3850
418
|
) -> Any:
|
|
3851
419
|
"""
|
|
3852
|
-
|
|
420
|
+
Retrieves a list of the hottest posts across Reddit.
|
|
3853
421
|
|
|
3854
422
|
Args:
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
show_users (string): boolean value (true, false)
|
|
3863
|
-
sort (string): one of (relevance, activity)
|
|
3864
|
-
sr_detail (string): (optional) expand subreddits
|
|
3865
|
-
typeahead_active (string): boolean value (true, false) or None
|
|
423
|
+
g: Optional. A geographical region to filter posts by (e.g., 'GLOBAL', 'US', 'GB').
|
|
424
|
+
after: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results after.
|
|
425
|
+
before: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results before.
|
|
426
|
+
count: Optional. A positive integer (default: 0) for the number of items already seen in the listing.
|
|
427
|
+
limit: Optional. The maximum number of items desired (default: 25, maximum: 100).
|
|
428
|
+
show: Optional. The string "all" to show all posts.
|
|
429
|
+
sr_detail: Optional. Expand subreddit details.
|
|
3866
430
|
|
|
3867
431
|
Returns:
|
|
3868
|
-
Any: API response data.
|
|
432
|
+
Any: API response data containing a list of hot posts.
|
|
3869
433
|
|
|
3870
434
|
Tags:
|
|
3871
|
-
|
|
435
|
+
listings, posts, hot, read-only
|
|
3872
436
|
"""
|
|
3873
|
-
url = f"{self.base_url}/
|
|
437
|
+
url = f"{self.base_url}/hot"
|
|
3874
438
|
query_params = {
|
|
3875
439
|
k: v
|
|
3876
440
|
for k, v in [
|
|
441
|
+
("g", g),
|
|
3877
442
|
("after", after),
|
|
3878
443
|
("before", before),
|
|
3879
444
|
("count", count),
|
|
3880
445
|
("limit", limit),
|
|
3881
|
-
("q", q),
|
|
3882
|
-
("search_query_id", search_query_id),
|
|
3883
446
|
("show", show),
|
|
3884
|
-
("show_users", show_users),
|
|
3885
|
-
("sort", sort),
|
|
3886
447
|
("sr_detail", sr_detail),
|
|
3887
|
-
("typeahead_active", typeahead_active),
|
|
3888
448
|
]
|
|
3889
449
|
if v is not None
|
|
3890
450
|
}
|
|
@@ -3892,37 +452,33 @@ class RedditApp(APIApplication):
|
|
|
3892
452
|
response.raise_for_status()
|
|
3893
453
|
return response.json()
|
|
3894
454
|
|
|
3895
|
-
def
|
|
455
|
+
def get_new_posts(
|
|
3896
456
|
self,
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
sr_detail=None,
|
|
457
|
+
after: str = None,
|
|
458
|
+
before: str = None,
|
|
459
|
+
count: int = None,
|
|
460
|
+
limit: int = None,
|
|
461
|
+
show: str = None,
|
|
462
|
+
sr_detail: str = None,
|
|
3904
463
|
) -> Any:
|
|
3905
464
|
"""
|
|
3906
|
-
|
|
465
|
+
Retrieves a list of the newest posts across Reddit.
|
|
3907
466
|
|
|
3908
467
|
Args:
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
sr_detail (string): (optional) expand subreddits
|
|
468
|
+
after: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results after.
|
|
469
|
+
before: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results before.
|
|
470
|
+
count: Optional. A positive integer (default: 0) for the number of items already seen in the listing.
|
|
471
|
+
limit: Optional. The maximum number of items desired (default: 25, maximum: 100).
|
|
472
|
+
show: Optional. The string "all" to show all posts.
|
|
473
|
+
sr_detail: Optional. Expand subreddit details.
|
|
3916
474
|
|
|
3917
475
|
Returns:
|
|
3918
|
-
Any: API response data.
|
|
476
|
+
Any: API response data containing a list of new posts.
|
|
3919
477
|
|
|
3920
478
|
Tags:
|
|
3921
|
-
|
|
479
|
+
listings, posts, new, read-only
|
|
3922
480
|
"""
|
|
3923
|
-
|
|
3924
|
-
raise ValueError("Missing required parameter 'where'")
|
|
3925
|
-
url = f"{self.base_url}/subreddits/{where}"
|
|
481
|
+
url = f"{self.base_url}/new"
|
|
3926
482
|
query_params = {
|
|
3927
483
|
k: v
|
|
3928
484
|
for k, v in [
|
|
@@ -3939,188 +495,49 @@ class RedditApp(APIApplication):
|
|
|
3939
495
|
response.raise_for_status()
|
|
3940
496
|
return response.json()
|
|
3941
497
|
|
|
3942
|
-
def
|
|
3943
|
-
"""
|
|
3944
|
-
Get the user data by account IDs.
|
|
3945
|
-
|
|
3946
|
-
Args:
|
|
3947
|
-
ids (string): A comma-separated list of account fullnames
|
|
3948
|
-
|
|
3949
|
-
Returns:
|
|
3950
|
-
Any: API response data.
|
|
3951
|
-
|
|
3952
|
-
Tags:
|
|
3953
|
-
users
|
|
3954
|
-
"""
|
|
3955
|
-
url = f"{self.base_url}/api/user_data_by_account_ids"
|
|
3956
|
-
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
3957
|
-
response = self._get(url, params=query_params)
|
|
3958
|
-
response.raise_for_status()
|
|
3959
|
-
return response.json()
|
|
3960
|
-
|
|
3961
|
-
def api_username_available(self, user=None) -> Any:
|
|
3962
|
-
"""
|
|
3963
|
-
Check if a username is available.
|
|
3964
|
-
|
|
3965
|
-
Args:
|
|
3966
|
-
user (string): a valid, unused, username
|
|
3967
|
-
|
|
3968
|
-
Returns:
|
|
3969
|
-
Any: API response data.
|
|
3970
|
-
|
|
3971
|
-
Tags:
|
|
3972
|
-
users
|
|
3973
|
-
"""
|
|
3974
|
-
url = f"{self.base_url}/api/username_available"
|
|
3975
|
-
query_params = {k: v for k, v in [("user", user)] if v is not None}
|
|
3976
|
-
response = self._get(url, params=query_params)
|
|
3977
|
-
response.raise_for_status()
|
|
3978
|
-
return response.json()
|
|
3979
|
-
|
|
3980
|
-
def api_v1_me_friends_username1(self, username, id=None) -> Any:
|
|
3981
|
-
"""
|
|
3982
|
-
Get a user's friends.
|
|
3983
|
-
|
|
3984
|
-
Args:
|
|
3985
|
-
username (string): username
|
|
3986
|
-
id (string): A valid, existing reddit username
|
|
3987
|
-
|
|
3988
|
-
Returns:
|
|
3989
|
-
Any: API response data.
|
|
3990
|
-
|
|
3991
|
-
Tags:
|
|
3992
|
-
users
|
|
3993
|
-
"""
|
|
3994
|
-
if username is None:
|
|
3995
|
-
raise ValueError("Missing required parameter 'username'")
|
|
3996
|
-
url = f"{self.base_url}/api/v1/me/friends/{username}"
|
|
3997
|
-
query_params = {k: v for k, v in [("id", id)] if v is not None}
|
|
3998
|
-
response = self._get(url, params=query_params)
|
|
3999
|
-
response.raise_for_status()
|
|
4000
|
-
return response.json()
|
|
4001
|
-
|
|
4002
|
-
def api_v1_me_friends_username(self, username, id=None) -> Any:
|
|
4003
|
-
"""
|
|
4004
|
-
Delete a user's friend.
|
|
4005
|
-
|
|
4006
|
-
Args:
|
|
4007
|
-
username (string): username
|
|
4008
|
-
id (string): A valid, existing reddit username
|
|
4009
|
-
|
|
4010
|
-
Returns:
|
|
4011
|
-
Any: API response data.
|
|
4012
|
-
|
|
4013
|
-
Tags:
|
|
4014
|
-
users
|
|
4015
|
-
"""
|
|
4016
|
-
if username is None:
|
|
4017
|
-
raise ValueError("Missing required parameter 'username'")
|
|
4018
|
-
url = f"{self.base_url}/api/v1/me/friends/{username}"
|
|
4019
|
-
query_params = {k: v for k, v in [("id", id)] if v is not None}
|
|
4020
|
-
response = self._delete(url, params=query_params)
|
|
4021
|
-
response.raise_for_status()
|
|
4022
|
-
return response.json()
|
|
4023
|
-
|
|
4024
|
-
def api_v1_user_username_trophies(self, username, id=None) -> Any:
|
|
4025
|
-
"""
|
|
4026
|
-
Get a user's trophies.
|
|
4027
|
-
|
|
4028
|
-
Args:
|
|
4029
|
-
username (string): username
|
|
4030
|
-
id (string): A valid, existing reddit username
|
|
4031
|
-
|
|
4032
|
-
Returns:
|
|
4033
|
-
Any: API response data.
|
|
4034
|
-
|
|
4035
|
-
Tags:
|
|
4036
|
-
users
|
|
4037
|
-
"""
|
|
4038
|
-
if username is None:
|
|
4039
|
-
raise ValueError("Missing required parameter 'username'")
|
|
4040
|
-
url = f"{self.base_url}/api/v1/user/{username}/trophies"
|
|
4041
|
-
query_params = {k: v for k, v in [("id", id)] if v is not None}
|
|
4042
|
-
response = self._get(url, params=query_params)
|
|
4043
|
-
response.raise_for_status()
|
|
4044
|
-
return response.json()
|
|
4045
|
-
|
|
4046
|
-
def user_username_about(self, username) -> Any:
|
|
4047
|
-
"""
|
|
4048
|
-
Get the about information for a user.
|
|
4049
|
-
|
|
4050
|
-
Args:
|
|
4051
|
-
username (string): username
|
|
4052
|
-
|
|
4053
|
-
Returns:
|
|
4054
|
-
Any: API response data.
|
|
4055
|
-
|
|
4056
|
-
Tags:
|
|
4057
|
-
users
|
|
4058
|
-
"""
|
|
4059
|
-
if username is None:
|
|
4060
|
-
raise ValueError("Missing required parameter 'username'")
|
|
4061
|
-
url = f"{self.base_url}/user/{username}/about"
|
|
4062
|
-
query_params = {k: v for k, v in [("username", username)] if v is not None}
|
|
4063
|
-
response = self._get(url, params=query_params)
|
|
4064
|
-
response.raise_for_status()
|
|
4065
|
-
return response.json()
|
|
4066
|
-
|
|
4067
|
-
def user_username_where(
|
|
498
|
+
def get_subreddit_hot_posts(
|
|
4068
499
|
self,
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
after=None,
|
|
4072
|
-
before=None,
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
sort=None,
|
|
4078
|
-
sr_detail=None,
|
|
4079
|
-
t=None,
|
|
4080
|
-
type=None,
|
|
500
|
+
subreddit: str,
|
|
501
|
+
g: str = None,
|
|
502
|
+
after: str = None,
|
|
503
|
+
before: str = None,
|
|
504
|
+
count: int = None,
|
|
505
|
+
limit: int = None,
|
|
506
|
+
show: str = None,
|
|
507
|
+
sr_detail: str = None,
|
|
4081
508
|
) -> Any:
|
|
4082
509
|
"""
|
|
4083
|
-
|
|
510
|
+
Retrieves a list of the hottest posts in a specified subreddit.
|
|
4084
511
|
|
|
4085
512
|
Args:
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
after
|
|
4089
|
-
before
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
sort (string): one of (hot, new, top, controversial)
|
|
4095
|
-
sr_detail (string): (optional) expand subreddits
|
|
4096
|
-
t (string): one of (hour, day, week, month, year, all)
|
|
4097
|
-
type (string): one of (links, comments)
|
|
513
|
+
subreddit: The name of the subreddit (e.g., 'python', 'worldnews') without the 'r/' prefix.
|
|
514
|
+
g: Optional. A geographical region to filter posts by (e.g., 'GLOBAL', 'US', 'GB').
|
|
515
|
+
after: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results after.
|
|
516
|
+
before: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results before.
|
|
517
|
+
count: Optional. A positive integer (default: 0) for the number of items already seen in the listing.
|
|
518
|
+
limit: Optional. The maximum number of items desired (default: 25, maximum: 100).
|
|
519
|
+
show: Optional. The string "all" to show all posts.
|
|
520
|
+
sr_detail: Optional. Expand subreddit details.
|
|
4098
521
|
|
|
4099
522
|
Returns:
|
|
4100
|
-
Any: API response data.
|
|
523
|
+
Any: API response data containing a list of hot posts from the subreddit.
|
|
4101
524
|
|
|
4102
525
|
Tags:
|
|
4103
|
-
|
|
526
|
+
listings, posts, subreddit, hot, read-only
|
|
4104
527
|
"""
|
|
4105
|
-
if
|
|
4106
|
-
raise ValueError("Missing required parameter '
|
|
4107
|
-
|
|
4108
|
-
raise ValueError("Missing required parameter 'where'")
|
|
4109
|
-
url = f"{self.base_url}/user/{username}/{where}"
|
|
528
|
+
if subreddit is None:
|
|
529
|
+
raise ValueError("Missing required parameter 'subreddit'")
|
|
530
|
+
url = f"{self.base_url}/r/{subreddit}/hot"
|
|
4110
531
|
query_params = {
|
|
4111
532
|
k: v
|
|
4112
533
|
for k, v in [
|
|
534
|
+
("g", g),
|
|
4113
535
|
("after", after),
|
|
4114
536
|
("before", before),
|
|
4115
|
-
("context", context),
|
|
4116
537
|
("count", count),
|
|
4117
538
|
("limit", limit),
|
|
4118
539
|
("show", show),
|
|
4119
|
-
("sort", sort),
|
|
4120
540
|
("sr_detail", sr_detail),
|
|
4121
|
-
("t", t),
|
|
4122
|
-
("type", type),
|
|
4123
|
-
("username", username),
|
|
4124
541
|
]
|
|
4125
542
|
if v is not None
|
|
4126
543
|
}
|
|
@@ -4128,41 +545,37 @@ class RedditApp(APIApplication):
|
|
|
4128
545
|
response.raise_for_status()
|
|
4129
546
|
return response.json()
|
|
4130
547
|
|
|
4131
|
-
def
|
|
548
|
+
def get_subreddit_new_posts(
|
|
4132
549
|
self,
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
sort=None,
|
|
4141
|
-
sr_detail=None,
|
|
4142
|
-
typeahead_active=None,
|
|
550
|
+
subreddit: str,
|
|
551
|
+
after: str = None,
|
|
552
|
+
before: str = None,
|
|
553
|
+
count: int = None,
|
|
554
|
+
limit: int = None,
|
|
555
|
+
show: str = None,
|
|
556
|
+
sr_detail: str = None,
|
|
4143
557
|
) -> Any:
|
|
4144
558
|
"""
|
|
4145
|
-
|
|
559
|
+
Retrieves a list of the newest posts in a specified subreddit.
|
|
4146
560
|
|
|
4147
561
|
Args:
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
sort (string): one of (relevance, activity)
|
|
4156
|
-
sr_detail (string): (optional) expand subreddits
|
|
4157
|
-
typeahead_active (string): boolean value (true, false) or None
|
|
562
|
+
subreddit: The name of the subreddit (e.g., 'python', 'worldnews') without the 'r/' prefix.
|
|
563
|
+
after: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results after.
|
|
564
|
+
before: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results before.
|
|
565
|
+
count: Optional. A positive integer (default: 0) for the number of items already seen in the listing.
|
|
566
|
+
limit: Optional. The maximum number of items desired (default: 25, maximum: 100).
|
|
567
|
+
show: Optional. The string "all" to show all posts.
|
|
568
|
+
sr_detail: Optional. Expand subreddit details.
|
|
4158
569
|
|
|
4159
570
|
Returns:
|
|
4160
|
-
Any: API response data.
|
|
571
|
+
Any: API response data containing a list of new posts from the subreddit.
|
|
4161
572
|
|
|
4162
573
|
Tags:
|
|
4163
|
-
|
|
574
|
+
listings, posts, subreddit, new, read-only
|
|
4164
575
|
"""
|
|
4165
|
-
|
|
576
|
+
if subreddit is None:
|
|
577
|
+
raise ValueError("Missing required parameter 'subreddit'")
|
|
578
|
+
url = f"{self.base_url}/r/{subreddit}/new"
|
|
4166
579
|
query_params = {
|
|
4167
580
|
k: v
|
|
4168
581
|
for k, v in [
|
|
@@ -4170,12 +583,8 @@ class RedditApp(APIApplication):
|
|
|
4170
583
|
("before", before),
|
|
4171
584
|
("count", count),
|
|
4172
585
|
("limit", limit),
|
|
4173
|
-
("q", q),
|
|
4174
|
-
("search_query_id", search_query_id),
|
|
4175
586
|
("show", show),
|
|
4176
|
-
("sort", sort),
|
|
4177
587
|
("sr_detail", sr_detail),
|
|
4178
|
-
("typeahead_active", typeahead_active),
|
|
4179
588
|
]
|
|
4180
589
|
if v is not None
|
|
4181
590
|
}
|
|
@@ -4183,37 +592,37 @@ class RedditApp(APIApplication):
|
|
|
4183
592
|
response.raise_for_status()
|
|
4184
593
|
return response.json()
|
|
4185
594
|
|
|
4186
|
-
def
|
|
595
|
+
def get_subreddit_top_posts(
|
|
4187
596
|
self,
|
|
4188
|
-
|
|
4189
|
-
after=None,
|
|
4190
|
-
before=None,
|
|
4191
|
-
count=None,
|
|
4192
|
-
limit=None,
|
|
4193
|
-
show=None,
|
|
4194
|
-
sr_detail=None,
|
|
597
|
+
subreddit: str,
|
|
598
|
+
after: str = None,
|
|
599
|
+
before: str = None,
|
|
600
|
+
count: int = None,
|
|
601
|
+
limit: int = None,
|
|
602
|
+
show: str = None,
|
|
603
|
+
sr_detail: str = None,
|
|
4195
604
|
) -> Any:
|
|
4196
605
|
"""
|
|
4197
|
-
|
|
606
|
+
Retrieves a list of the top posts in a specified subreddit.
|
|
4198
607
|
|
|
4199
608
|
Args:
|
|
4200
|
-
|
|
4201
|
-
after
|
|
4202
|
-
before
|
|
4203
|
-
count
|
|
4204
|
-
limit
|
|
4205
|
-
show
|
|
4206
|
-
sr_detail
|
|
609
|
+
subreddit: The name of the subreddit (e.g., 'python', 'worldnews') without the 'r/' prefix.
|
|
610
|
+
after: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results after.
|
|
611
|
+
before: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results before.
|
|
612
|
+
count: Optional. A positive integer (default: 0) for the number of items already seen in the listing.
|
|
613
|
+
limit: Optional. The maximum number of items desired (default: 25, maximum: 100).
|
|
614
|
+
show: Optional. The string "all" to show all posts.
|
|
615
|
+
sr_detail: Optional. Expand subreddit details.
|
|
4207
616
|
|
|
4208
617
|
Returns:
|
|
4209
|
-
Any: API response data.
|
|
618
|
+
Any: API response data containing a list of top posts from the subreddit.
|
|
4210
619
|
|
|
4211
620
|
Tags:
|
|
4212
|
-
|
|
621
|
+
listings, posts, subreddit, top, read-only
|
|
4213
622
|
"""
|
|
4214
|
-
if
|
|
4215
|
-
raise ValueError("Missing required parameter '
|
|
4216
|
-
url = f"{self.base_url}/
|
|
623
|
+
if subreddit is None:
|
|
624
|
+
raise ValueError("Missing required parameter 'subreddit'")
|
|
625
|
+
url = f"{self.base_url}/r/{subreddit}/top"
|
|
4217
626
|
query_params = {
|
|
4218
627
|
k: v
|
|
4219
628
|
for k, v in [
|
|
@@ -4230,113 +639,33 @@ class RedditApp(APIApplication):
|
|
|
4230
639
|
response.raise_for_status()
|
|
4231
640
|
return response.json()
|
|
4232
641
|
|
|
4233
|
-
def
|
|
4234
|
-
"""
|
|
4235
|
-
Get the widgets for a subreddit.
|
|
4236
|
-
|
|
4237
|
-
Args:
|
|
4238
|
-
subreddit (string): subreddit
|
|
4239
|
-
|
|
4240
|
-
Returns:
|
|
4241
|
-
Any: API response data.
|
|
4242
|
-
|
|
4243
|
-
Tags:
|
|
4244
|
-
widgets
|
|
4245
|
-
"""
|
|
4246
|
-
if subreddit is None:
|
|
4247
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
4248
|
-
url = f"{self.base_url}/r/{subreddit}/api/widgets"
|
|
4249
|
-
query_params = {}
|
|
4250
|
-
response = self._get(url, params=query_params)
|
|
4251
|
-
response.raise_for_status()
|
|
4252
|
-
return response.json()
|
|
4253
|
-
|
|
4254
|
-
def r_subreddit_api_widget_order_section(
|
|
4255
|
-
self, subreddit, section, items=None
|
|
4256
|
-
) -> Any:
|
|
4257
|
-
"""
|
|
4258
|
-
Get the widget order for a subreddit.
|
|
4259
|
-
|
|
4260
|
-
Args:
|
|
4261
|
-
subreddit (string): subreddit
|
|
4262
|
-
section (string): section
|
|
4263
|
-
|
|
4264
|
-
Returns:
|
|
4265
|
-
Any: API response data.
|
|
4266
|
-
|
|
4267
|
-
Tags:
|
|
4268
|
-
widgets
|
|
4269
|
-
"""
|
|
4270
|
-
if subreddit is None:
|
|
4271
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
4272
|
-
if section is None:
|
|
4273
|
-
raise ValueError("Missing required parameter 'section'")
|
|
4274
|
-
# Use items array directly as request body
|
|
4275
|
-
url = f"{self.base_url}/r/{subreddit}/api/widget_order/{section}"
|
|
4276
|
-
query_params = {}
|
|
4277
|
-
response = self._get(url, params=query_params)
|
|
4278
|
-
response.raise_for_status()
|
|
4279
|
-
return response.json()
|
|
4280
|
-
|
|
4281
|
-
def r_subreddit_api_widget_widget_id(self, subreddit, widget_id) -> Any:
|
|
4282
|
-
"""
|
|
4283
|
-
Delete a widget.
|
|
4284
|
-
|
|
4285
|
-
Args:
|
|
4286
|
-
subreddit (string): subreddit
|
|
4287
|
-
widget_id (string): widget_id
|
|
4288
|
-
|
|
4289
|
-
Returns:
|
|
4290
|
-
Any: API response data.
|
|
4291
|
-
|
|
4292
|
-
Tags:
|
|
4293
|
-
widgets
|
|
4294
|
-
"""
|
|
4295
|
-
if subreddit is None:
|
|
4296
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
4297
|
-
if widget_id is None:
|
|
4298
|
-
raise ValueError("Missing required parameter 'widget_id'")
|
|
4299
|
-
url = f"{self.base_url}/r/{subreddit}/api/widget/{widget_id}"
|
|
4300
|
-
query_params = {}
|
|
4301
|
-
response = self._delete(url, params=query_params)
|
|
4302
|
-
response.raise_for_status()
|
|
4303
|
-
return response.json()
|
|
4304
|
-
|
|
4305
|
-
def r_subreddit_wiki_discussions_page(
|
|
642
|
+
def get_rising_posts(
|
|
4306
643
|
self,
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
show=None,
|
|
4314
|
-
sr_detail=None,
|
|
644
|
+
after: str = None,
|
|
645
|
+
before: str = None,
|
|
646
|
+
count: int = None,
|
|
647
|
+
limit: int = None,
|
|
648
|
+
show: str = None,
|
|
649
|
+
sr_detail: str = None,
|
|
4315
650
|
) -> Any:
|
|
4316
651
|
"""
|
|
4317
|
-
|
|
652
|
+
Retrieves a list of the rising posts across Reddit.
|
|
4318
653
|
|
|
4319
654
|
Args:
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
show (string): (optional) the string "all" Example: 'all'.
|
|
4327
|
-
sr_detail (string): (optional) expand subreddits
|
|
655
|
+
after: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results after.
|
|
656
|
+
before: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results before.
|
|
657
|
+
count: Optional. A positive integer (default: 0) for the number of items already seen in the listing.
|
|
658
|
+
limit: Optional. The maximum number of items desired (default: 25, maximum: 100).
|
|
659
|
+
show: Optional. The string "all" to show all posts.
|
|
660
|
+
sr_detail: Optional. Expand subreddit details.
|
|
4328
661
|
|
|
4329
662
|
Returns:
|
|
4330
|
-
Any: API response data.
|
|
663
|
+
Any: API response data containing a list of rising posts.
|
|
4331
664
|
|
|
4332
665
|
Tags:
|
|
4333
|
-
|
|
666
|
+
listings, posts, rising, read-only
|
|
4334
667
|
"""
|
|
4335
|
-
|
|
4336
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
4337
|
-
if page is None:
|
|
4338
|
-
raise ValueError("Missing required parameter 'page'")
|
|
4339
|
-
url = f"{self.base_url}/r/{subreddit}/wiki/discussions/{page}"
|
|
668
|
+
url = f"{self.base_url}/rising"
|
|
4340
669
|
query_params = {
|
|
4341
670
|
k: v
|
|
4342
671
|
for k, v in [
|
|
@@ -4344,7 +673,6 @@ class RedditApp(APIApplication):
|
|
|
4344
673
|
("before", before),
|
|
4345
674
|
("count", count),
|
|
4346
675
|
("limit", limit),
|
|
4347
|
-
("page", page),
|
|
4348
676
|
("show", show),
|
|
4349
677
|
("sr_detail", sr_detail),
|
|
4350
678
|
]
|
|
@@ -4354,84 +682,33 @@ class RedditApp(APIApplication):
|
|
|
4354
682
|
response.raise_for_status()
|
|
4355
683
|
return response.json()
|
|
4356
684
|
|
|
4357
|
-
def
|
|
4358
|
-
"""
|
|
4359
|
-
Get a wiki page.
|
|
4360
|
-
|
|
4361
|
-
Args:
|
|
4362
|
-
subreddit (string): subreddit
|
|
4363
|
-
page (string): page
|
|
4364
|
-
v (string): a wiki revision ID
|
|
4365
|
-
v2 (string): a wiki revision ID
|
|
4366
|
-
|
|
4367
|
-
Returns:
|
|
4368
|
-
Any: API response data.
|
|
4369
|
-
|
|
4370
|
-
Tags:
|
|
4371
|
-
wiki
|
|
4372
|
-
"""
|
|
4373
|
-
if subreddit is None:
|
|
4374
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
4375
|
-
if page is None:
|
|
4376
|
-
raise ValueError("Missing required parameter 'page'")
|
|
4377
|
-
url = f"{self.base_url}/r/{subreddit}/wiki/{page}"
|
|
4378
|
-
query_params = {k: v for k, v in [("v", v), ("v2", v2)] if v is not None}
|
|
4379
|
-
response = self._get(url, params=query_params)
|
|
4380
|
-
response.raise_for_status()
|
|
4381
|
-
return response.json()
|
|
4382
|
-
|
|
4383
|
-
def r_subreddit_wiki_pages(self, subreddit) -> Any:
|
|
4384
|
-
"""
|
|
4385
|
-
Get the pages for a wiki.
|
|
4386
|
-
|
|
4387
|
-
Args:
|
|
4388
|
-
subreddit (string): subreddit
|
|
4389
|
-
|
|
4390
|
-
Returns:
|
|
4391
|
-
Any: API response data.
|
|
4392
|
-
|
|
4393
|
-
Tags:
|
|
4394
|
-
wiki
|
|
4395
|
-
"""
|
|
4396
|
-
if subreddit is None:
|
|
4397
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
4398
|
-
url = f"{self.base_url}/r/{subreddit}/wiki/pages"
|
|
4399
|
-
query_params = {}
|
|
4400
|
-
response = self._get(url, params=query_params)
|
|
4401
|
-
response.raise_for_status()
|
|
4402
|
-
return response.json()
|
|
4403
|
-
|
|
4404
|
-
def r_subreddit_wiki_revisions(
|
|
685
|
+
def get_top_posts(
|
|
4405
686
|
self,
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
sr_detail=None,
|
|
687
|
+
after: str = None,
|
|
688
|
+
before: str = None,
|
|
689
|
+
count: int = None,
|
|
690
|
+
limit: int = None,
|
|
691
|
+
show: str = None,
|
|
692
|
+
sr_detail: str = None,
|
|
4413
693
|
) -> Any:
|
|
4414
694
|
"""
|
|
4415
|
-
|
|
695
|
+
Retrieves a list of the top posts across Reddit.
|
|
4416
696
|
|
|
4417
697
|
Args:
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
sr_detail (string): (optional) expand subreddits
|
|
698
|
+
after: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results after.
|
|
699
|
+
before: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results before.
|
|
700
|
+
count: Optional. A positive integer (default: 0) for the number of items already seen in the listing.
|
|
701
|
+
limit: Optional. The maximum number of items desired (default: 25, maximum: 100).
|
|
702
|
+
show: Optional. The string "all" to show all posts.
|
|
703
|
+
sr_detail: Optional. Expand subreddit details.
|
|
4425
704
|
|
|
4426
705
|
Returns:
|
|
4427
|
-
Any: API response data.
|
|
706
|
+
Any: API response data containing a list of top posts.
|
|
4428
707
|
|
|
4429
708
|
Tags:
|
|
4430
|
-
|
|
709
|
+
listings, posts, top, read-only
|
|
4431
710
|
"""
|
|
4432
|
-
|
|
4433
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
4434
|
-
url = f"{self.base_url}/r/{subreddit}/wiki/revisions"
|
|
711
|
+
url = f"{self.base_url}/top"
|
|
4435
712
|
query_params = {
|
|
4436
713
|
k: v
|
|
4437
714
|
for k, v in [
|
|
@@ -4448,51 +725,63 @@ class RedditApp(APIApplication):
|
|
|
4448
725
|
response.raise_for_status()
|
|
4449
726
|
return response.json()
|
|
4450
727
|
|
|
4451
|
-
def
|
|
728
|
+
def search_reddit(
|
|
4452
729
|
self,
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
limit=None,
|
|
4459
|
-
|
|
4460
|
-
|
|
730
|
+
after: str = None,
|
|
731
|
+
before: str = None,
|
|
732
|
+
category: str = None,
|
|
733
|
+
count: int = None,
|
|
734
|
+
include_facets: bool = None,
|
|
735
|
+
limit: int = None,
|
|
736
|
+
q: str = None,
|
|
737
|
+
restrict_sr: bool = None,
|
|
738
|
+
show: str = None,
|
|
739
|
+
sort: str = None,
|
|
740
|
+
sr_detail: str = None,
|
|
741
|
+
t: str = None,
|
|
742
|
+
type: str = None,
|
|
4461
743
|
) -> Any:
|
|
4462
744
|
"""
|
|
4463
|
-
|
|
745
|
+
Searches for posts, comments, and users across Reddit.
|
|
4464
746
|
|
|
4465
747
|
Args:
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
limit
|
|
4472
|
-
|
|
4473
|
-
|
|
748
|
+
after: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results after.
|
|
749
|
+
before: Optional. The fullname of a thing (e.g., 't3_xxxxxx') to return results before.
|
|
750
|
+
category: Optional. A string no longer than 5 characters to filter by category.
|
|
751
|
+
count: Optional. A positive integer (default: 0) for the number of items already seen in the listing.
|
|
752
|
+
include_facets: Optional. Boolean value (true, false) to include facets in the search results.
|
|
753
|
+
limit: Optional. The maximum number of items desired (default: 25, maximum: 100).
|
|
754
|
+
q: Optional. The search query string, no longer than 512 characters.
|
|
755
|
+
restrict_sr: Optional. Boolean value (true, false) to restrict search to a specific subreddit.
|
|
756
|
+
show: Optional. The string "all" to show all results.
|
|
757
|
+
sort: Optional. One of ('relevance', 'hot', 'top', 'new', 'comments') to sort results.
|
|
758
|
+
sr_detail: Optional. Expand subreddit details.
|
|
759
|
+
t: Optional. One of ('hour', 'day', 'week', 'month', 'year', 'all') to filter by time.
|
|
760
|
+
type: Optional. A comma-separated list of result types ('sr', 'link', 'user').
|
|
4474
761
|
|
|
4475
762
|
Returns:
|
|
4476
|
-
Any: API response data.
|
|
763
|
+
Any: API response data containing search results.
|
|
4477
764
|
|
|
4478
765
|
Tags:
|
|
4479
|
-
|
|
766
|
+
search, reddit, posts, comments, users, read-only
|
|
4480
767
|
"""
|
|
4481
|
-
|
|
4482
|
-
raise ValueError("Missing required parameter 'subreddit'")
|
|
4483
|
-
if page is None:
|
|
4484
|
-
raise ValueError("Missing required parameter 'page'")
|
|
4485
|
-
url = f"{self.base_url}/r/{subreddit}/wiki/revisions/{page}"
|
|
768
|
+
url = f"{self.base_url}/search"
|
|
4486
769
|
query_params = {
|
|
4487
770
|
k: v
|
|
4488
771
|
for k, v in [
|
|
4489
772
|
("after", after),
|
|
4490
773
|
("before", before),
|
|
774
|
+
("category", category),
|
|
4491
775
|
("count", count),
|
|
776
|
+
("include_facets", include_facets),
|
|
4492
777
|
("limit", limit),
|
|
4493
|
-
("
|
|
778
|
+
("q", q),
|
|
779
|
+
("restrict_sr", restrict_sr),
|
|
4494
780
|
("show", show),
|
|
781
|
+
("sort", sort),
|
|
4495
782
|
("sr_detail", sr_detail),
|
|
783
|
+
("t", t),
|
|
784
|
+
("type", type),
|
|
4496
785
|
]
|
|
4497
786
|
if v is not None
|
|
4498
787
|
}
|
|
@@ -4500,33 +789,29 @@ class RedditApp(APIApplication):
|
|
|
4500
789
|
response.raise_for_status()
|
|
4501
790
|
return response.json()
|
|
4502
791
|
|
|
4503
|
-
def
|
|
792
|
+
def get_user_profile(self, username: str) -> Any:
|
|
4504
793
|
"""
|
|
4505
|
-
|
|
794
|
+
Retrieves the profile information for a given Reddit user.
|
|
4506
795
|
|
|
4507
796
|
Args:
|
|
4508
|
-
|
|
4509
|
-
page (string): page
|
|
797
|
+
username: The username of the user to look up.
|
|
4510
798
|
|
|
4511
799
|
Returns:
|
|
4512
|
-
|
|
800
|
+
A dictionary containing the user's profile data.
|
|
4513
801
|
|
|
4514
802
|
Tags:
|
|
4515
|
-
|
|
803
|
+
users, profile, fetch
|
|
4516
804
|
"""
|
|
4517
|
-
if
|
|
4518
|
-
raise ValueError("Missing required parameter '
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
url = f"{self.base_url}/r/{subreddit}/wiki/settings/{page}"
|
|
4522
|
-
query_params = {k: v for k, v in [("page", page)] if v is not None}
|
|
805
|
+
if username is None:
|
|
806
|
+
raise ValueError("Missing required parameter 'username'")
|
|
807
|
+
url = f"{self.base_url}/user/{username}/about"
|
|
808
|
+
query_params = {k: v for k, v in [("username", username)] if v is not None}
|
|
4523
809
|
response = self._get(url, params=query_params)
|
|
4524
810
|
response.raise_for_status()
|
|
4525
811
|
return response.json()
|
|
4526
812
|
|
|
4527
813
|
def list_tools(self):
|
|
4528
814
|
return [
|
|
4529
|
-
# Manually defined, high-level tools for common Reddit interactions
|
|
4530
815
|
self.get_subreddit_posts,
|
|
4531
816
|
self.search_subreddits,
|
|
4532
817
|
self.get_post_flairs,
|
|
@@ -4536,129 +821,16 @@ class RedditApp(APIApplication):
|
|
|
4536
821
|
self.edit_content,
|
|
4537
822
|
self.delete_content,
|
|
4538
823
|
self.get_post_comments_details,
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
self.
|
|
4542
|
-
self.
|
|
4543
|
-
self.
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
self.
|
|
4547
|
-
self.
|
|
4548
|
-
self.
|
|
4549
|
-
self.
|
|
4550
|
-
self.
|
|
4551
|
-
|
|
4552
|
-
# Subreddit-specific listing tools
|
|
4553
|
-
self.r_subreddit_hot,
|
|
4554
|
-
self.r_subreddit_new,
|
|
4555
|
-
self.r_subreddit_top,
|
|
4556
|
-
|
|
4557
|
-
# A general-purpose search tool
|
|
4558
|
-
self.search,
|
|
4559
|
-
|
|
4560
|
-
# --- The following tools are more granular or niche and have been commented out ---
|
|
4561
|
-
|
|
4562
|
-
# self.api_v1_me_prefs,
|
|
4563
|
-
# self.api_v1_me_prefs1,
|
|
4564
|
-
# self.api_v1_me_trophies,
|
|
4565
|
-
# self.prefs_friends,
|
|
4566
|
-
# self.prefs_blocked,
|
|
4567
|
-
# self.prefs_messaging,
|
|
4568
|
-
# self.prefs_trusted,
|
|
4569
|
-
# self.api_needs_captcha,
|
|
4570
|
-
# self.api_v1_collections_collection,
|
|
4571
|
-
# self.api_v1_collections_subreddit_collections,
|
|
4572
|
-
# self.api_v1_subreddit_emoji_emoji_name,
|
|
4573
|
-
# self.api_v1_subreddit_emojis_all,
|
|
4574
|
-
# self.r_subreddit_api_flair,
|
|
4575
|
-
# self.r_subreddit_api_flairlist,
|
|
4576
|
-
# self.r_subreddit_api_link_flair,
|
|
4577
|
-
# self.r_subreddit_api_link_flair_v2,
|
|
4578
|
-
# self.r_subreddit_api_user_flair,
|
|
4579
|
-
# self.r_subreddit_api_user_flair_v2,
|
|
4580
|
-
# self.api_info,
|
|
4581
|
-
# self.r_subreddit_api_info,
|
|
4582
|
-
# self.api_morechildren,
|
|
4583
|
-
# self.api_saved_categories,
|
|
4584
|
-
# self.req,
|
|
4585
|
-
# self.best,
|
|
4586
|
-
# self.by_id_names,
|
|
4587
|
-
# self.comments_article,
|
|
4588
|
-
# self.duplicates_article,
|
|
4589
|
-
# self.r_subreddit_comments_article,
|
|
4590
|
-
# self.r_subreddit_controversial,
|
|
4591
|
-
# self.r_subreddit_random,
|
|
4592
|
-
# self.r_subreddit_rising,
|
|
4593
|
-
# self.random,
|
|
4594
|
-
# self.api_saved_media_text,
|
|
4595
|
-
# self.api_v1_scopes,
|
|
4596
|
-
# self.r_subreddit_api_saved_media_text,
|
|
4597
|
-
# self.r_subreddit_about_log,
|
|
4598
|
-
# self.r_subreddit_about_edited,
|
|
4599
|
-
# self.r_subreddit_about_modqueue,
|
|
4600
|
-
# self.r_subreddit_about_reports,
|
|
4601
|
-
# self.r_subreddit_about_spam,
|
|
4602
|
-
# self.r_subreddit_about_unmoderated,
|
|
4603
|
-
# self.r_subreddit_stylesheet,
|
|
4604
|
-
# self.stylesheet,
|
|
4605
|
-
# self.api_mod_notes1,
|
|
4606
|
-
# self.api_mod_notes,
|
|
4607
|
-
# self.api_mod_notes_recent,
|
|
4608
|
-
# self.api_multi_mine,
|
|
4609
|
-
# self.api_multi_user_username,
|
|
4610
|
-
# self.api_multi_multipath1,
|
|
4611
|
-
# self.api_multi_multipath,
|
|
4612
|
-
# self.api_multi_multipath_description,
|
|
4613
|
-
# self.api_multi_multipath_rsubreddit1,
|
|
4614
|
-
# self.api_multi_multipath_rsubreddit,
|
|
4615
|
-
# self.api_mod_conversations,
|
|
4616
|
-
# self.api_mod_conversations_conversation_id,
|
|
4617
|
-
# self.api_mod_conversations_conversation_id_highlight,
|
|
4618
|
-
# self.api_mod_conversations_conversation_id_unarchive,
|
|
4619
|
-
# self.api_mod_conversations_conversation_id_unban,
|
|
4620
|
-
# self.api_mod_conversations_conversation_id_unmute,
|
|
4621
|
-
# self.api_mod_conversations_conversation_id_user,
|
|
4622
|
-
# self.api_mod_conversations_subreddits,
|
|
4623
|
-
# self.api_mod_conversations_unread_count,
|
|
4624
|
-
# self.message_inbox,
|
|
4625
|
-
# self.message_sent,
|
|
4626
|
-
# self.message_unread,
|
|
4627
|
-
# self.r_subreddit_search,
|
|
4628
|
-
# self.api_search_reddit_names,
|
|
4629
|
-
# self.api_subreddit_autocomplete,
|
|
4630
|
-
# self.api_subreddit_autocomplete_v2,
|
|
4631
|
-
# self.api_v1_subreddit_post_requirements,
|
|
4632
|
-
# self.r_subreddit_about_banned,
|
|
4633
|
-
# self.r_subreddit_about,
|
|
4634
|
-
# self.r_subreddit_about_edit,
|
|
4635
|
-
# self.r_subreddit_about_contributors,
|
|
4636
|
-
# self.r_subreddit_about_moderators,
|
|
4637
|
-
# self.r_subreddit_about_muted,
|
|
4638
|
-
# self.r_subreddit_about_rules,
|
|
4639
|
-
# self.r_subreddit_about_sticky,
|
|
4640
|
-
# self.r_subreddit_about_traffic,
|
|
4641
|
-
# self.r_subreddit_about_wikibanned,
|
|
4642
|
-
# self.r_subreddit_about_wikicontributors,
|
|
4643
|
-
# self.r_subreddit_api_submit_text,
|
|
4644
|
-
# self.subreddits_mine_where,
|
|
4645
|
-
# self.subreddits_search,
|
|
4646
|
-
# self.subreddits_where,
|
|
4647
|
-
# self.api_user_data_by_account_ids,
|
|
4648
|
-
# self.api_username_available,
|
|
4649
|
-
# self.api_v1_me_friends_username1,
|
|
4650
|
-
# self.api_v1_me_friends_username,
|
|
4651
|
-
# self.api_v1_user_username_trophies,
|
|
4652
|
-
# self.user_username_where,
|
|
4653
|
-
# self.users_search,
|
|
4654
|
-
# self.users_where,
|
|
4655
|
-
# self.r_subreddit_api_widgets,
|
|
4656
|
-
# self.r_subreddit_api_widget_order_section,
|
|
4657
|
-
# self.r_subreddit_api_widget_widget_id,
|
|
4658
|
-
# self.r_subreddit_wiki_discussions_page,
|
|
4659
|
-
# self.r_subreddit_wiki_page,
|
|
4660
|
-
# self.r_subreddit_wiki_pages,
|
|
4661
|
-
# self.r_subreddit_wiki_revisions,
|
|
4662
|
-
# self.r_subreddit_wiki_revisions_page,
|
|
4663
|
-
# self.r_subreddit_wiki_settings_page,
|
|
4664
|
-
]
|
|
824
|
+
self.get_current_user_info,
|
|
825
|
+
self.get_current_user_karma,
|
|
826
|
+
self.get_hot_posts,
|
|
827
|
+
self.get_new_posts,
|
|
828
|
+
self.get_top_posts,
|
|
829
|
+
self.get_rising_posts,
|
|
830
|
+
self.get_controversial_posts,
|
|
831
|
+
self.get_subreddit_hot_posts,
|
|
832
|
+
self.get_subreddit_new_posts,
|
|
833
|
+
self.get_subreddit_top_posts,
|
|
834
|
+
self.search_reddit,
|
|
835
|
+
self.get_user_profile,
|
|
836
|
+
]
|