Skip to main content

RedditApiClient

Struct RedditApiClient 

Source
pub struct RedditApiClient { /* private fields */ }

Implementations§

Source§

impl RedditApiClient

Source

pub fn new_reddit() -> Self

service: reddit

Source

pub fn new(base_url: impl Into<String>) -> Self

Source

pub fn with_http(base_url: impl Into<String>, http: Client) -> Self

Source§

impl RedditApiClient

Source

pub async fn get_me(&self) -> Result<Value, Error>

Source

pub async fn get_me_karma(&self) -> Result<Value, Error>

Source

pub async fn get_me_prefs(&self, fields: String) -> Result<Value, Error>

Source

pub async fn patch_me_prefs(&self) -> Result<Value, Error>

Source

pub async fn get_me_trophies(&self) -> Result<Value, Error>

Source

pub async fn get_prefs_where( &self, where: String, after: String, before: String, count: i64, limit: String, show: String, sr_detail: String, ) -> Result<Value, Error>

Source

pub async fn get_announcements_v1( &self, after: String, before: String, limit: i64, ) -> Result<Value, Error>

Source

pub async fn post_announcements_v1_hide( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_announcements_v1_read( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_announcements_v1_read_all(&self) -> Result<Value, Error>

Source

pub async fn get_needs_captcha(&self) -> Result<Value, Error>

Source

pub async fn post_subreddit_emoji_json( &self, subreddit: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn delete_subreddit_emoji_emoji_name( &self, subreddit: String, emoji_name: String, ) -> Result<Value, Error>

Source

pub async fn post_subreddit_emoji_asset_upload_s3_json( &self, subreddit: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_subreddit_emoji_custom_size( &self, subreddit: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn get_subreddit_emojis_all( &self, subreddit: String, ) -> Result<Value, Error>

Source

pub async fn post_clearflairtemplates( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_deleteflair(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_deleteflairtemplate( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_flair(&self, body: Value) -> Result<Value, Error>

Source

pub async fn patch_flair_template_order( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_flairconfig(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_flaircsv(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_flairlist( &self, after: String, before: String, count: i64, limit: String, name: String, show: String, sr_detail: String, ) -> Result<Value, Error>

Source

pub async fn post_flairselector(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_flairtemplate(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_flairtemplate_v2(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_selectflair(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_setflairenabled(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_user_flair(&self) -> Result<Value, Error>

Source

pub async fn get_user_flair_v2(&self) -> Result<Value, Error>

Source

pub async fn post_comment(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_del(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_editusertext(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_follow_post(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_hide(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_info( &self, id: String, sr_name: String, url: String, ) -> Result<Value, Error>

Source

pub async fn post_lock(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_marknsfw(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_morechildren( &self, api_type: String, children: String, depth: i64, id: String, limit_children: bool, link_id: String, sort: String, ) -> Result<Value, Error>

Source

pub async fn post_report(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_save(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_saved_categories(&self) -> Result<Value, Error>

Source

pub async fn post_sendreplies(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_set_contest_mode(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_set_subreddit_sticky( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_set_suggested_sort(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_spoiler(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_store_visits(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_submit(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_unhide(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_unlock(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_unmarknsfw(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_unsave(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_unspoiler(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_vote(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_best(&self) -> Result<Value, Error>

Source

pub async fn get_by_id_names(&self, names: String) -> Result<Value, Error>

Source

pub async fn get_comments_article( &self, article: String, comment: String, context: i64, depth: i64, limit: i64, showedits: bool, showmedia: bool, showmore: bool, showtitle: bool, sort: String, sr_detail: String, theme: String, threaded: bool, truncate: i64, ) -> Result<Value, Error>

Source

pub async fn get_duplicates_article( &self, article: String, after: String, before: String, count: i64, crossposts_only: bool, limit: String, show: String, sort: String, sr: String, sr_detail: String, ) -> Result<Value, Error>

Source

pub async fn get_hot(&self, g: String) -> Result<Value, Error>

Source

pub async fn get_new(&self) -> Result<Value, Error>

Source

pub async fn get_rising(&self) -> Result<Value, Error>

Source

pub async fn get_sort(&self, sort: String, t: String) -> Result<Value, Error>

Source

pub async fn get_live_by_id_names(&self, names: String) -> Result<Value, Error>

Source

pub async fn post_live_create(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_live_happening_now( &self, show_announcements: bool, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_accept_contributor_invite( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_close_thread( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_delete_update( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_edit( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_hide_discussion( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_invite_contributor( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_leave_contributor( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_report( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_rm_contributor( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_rm_contributor_invite( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_set_contributor_permissions( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_strike_update( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_unhide_discussion( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_live_thread_update( &self, thread: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn get_live_thread( &self, thread: String, after: String, before: String, count: i64, is_embed: String, limit: String, stylesr: String, ) -> Result<Value, Error>

Source

pub async fn get_live_thread_about( &self, thread: String, ) -> Result<Value, Error>

Source

pub async fn get_live_thread_contributors( &self, thread: String, ) -> Result<Value, Error>

Source

pub async fn get_live_thread_discussions( &self, thread: String, after: String, before: String, count: i64, limit: String, show: String, sr_detail: String, ) -> Result<Value, Error>

Source

pub async fn get_live_thread_updates_update_id( &self, thread: String, update_id: String, ) -> Result<Value, Error>

Source

pub async fn post_compose(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_del_msg(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_read_all_messages(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_read_message(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_message_where( &self, where: String, mark: String, max_replies: String, mid: String, ) -> Result<Value, Error>

Source

pub async fn get_scopes(&self, scopes: String) -> Result<Value, Error>

Source

pub async fn get_about_log( &self, after: String, before: String, count: i64, limit: String, mod: String, show: String, sr_detail: String, type: String, ) -> Result<Value, Error>

Source

pub async fn get_about_location( &self, location: String, after: String, before: String, count: i64, limit: String, only: String, show: String, sr_detail: String, ) -> Result<Value, Error>

Source

pub async fn post_accept_moderator_invite( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_approve(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_distinguish(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_ignore_reports(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_leavecontributor(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_leavemoderator(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_remove(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_show_comment(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_snooze_reports(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_unignore_reports(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_unsnooze_reports(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_update_crowd_control_level( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn get_stylesheet(&self) -> Result<Value, Error>

Source

pub async fn post_mod_bulk_read(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_mod_conversations( &self, after: String, entity: String, limit: i64, sort: String, state: String, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_mod_conversations_conversation_id( &self, conversation_id: String, markRead: bool, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_conversation_id( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_conversation_id_approve( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_conversation_id_archive( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_conversation_id_disapprove( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn delete_mod_conversations_conversation_id_highlight( &self, conversation_id: String, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_conversation_id_highlight( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_conversation_id_mute( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_conversation_id_temp_ban( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_conversation_id_unarchive( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_conversation_id_unban( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_conversation_id_unmute( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_read( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn get_mod_conversations_subreddits(&self) -> Result<Value, Error>

Source

pub async fn post_mod_conversations_unread( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn get_mod_conversations_unread_count(&self) -> Result<Value, Error>

Source

pub async fn delete_mod_notes( &self, note_id: String, subreddit: String, user: String, ) -> Result<Value, Error>

Source

pub async fn get_mod_notes( &self, before: String, filter: String, limit: String, subreddit: String, user: String, ) -> Result<Value, Error>

Source

pub async fn post_mod_notes(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_mod_notes_recent( &self, subreddits: String, users: String, ) -> Result<Value, Error>

Source

pub async fn post_multi_copy(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_multi_mine(&self, expand_srs: bool) -> Result<Value, Error>

Source

pub async fn get_multi_user_username( &self, username: String, expand_srs: bool, ) -> Result<Value, Error>

Source

pub async fn delete_multi_multipath( &self, multipath: String, uh_X_Modhash_header: String, ) -> Result<Value, Error>

Source

pub async fn get_multi_multipath( &self, multipath: String, expand_srs: bool, ) -> Result<Value, Error>

Source

pub async fn post_multi_multipath( &self, multipath: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn put_multi_multipath( &self, multipath: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn get_multi_multipath_description( &self, multipath: String, ) -> Result<Value, Error>

Source

pub async fn put_multi_multipath_description( &self, multipath: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn delete_multi_multipath_r_srname( &self, multipath: String, srname: String, uh_X_Modhash_header: String, ) -> Result<Value, Error>

Source

pub async fn get_multi_multipath_r_srname( &self, multipath: String, srname: String, ) -> Result<Value, Error>

Source

pub async fn put_multi_multipath_r_srname( &self, multipath: String, srname: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn get_about_where( &self, where: String, after: String, before: String, count: i64, limit: String, show: String, sr_detail: String, user: String, ) -> Result<Value, Error>

Source

pub async fn post_delete_sr_banner(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_delete_sr_header(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_delete_sr_icon(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_delete_sr_img(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_recommend_sr_srnames( &self, srnames: String, omit: String, over_18: bool, ) -> Result<Value, Error>

Source

pub async fn get_search_reddit_names( &self, exact: bool, include_over_18: bool, include_unadvertisable: bool, query: String, search_query_id: String, typeahead_active: bool, ) -> Result<Value, Error>

Source

pub async fn post_search_reddit_names( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_search_subreddits(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_site_admin(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_submit_text(&self) -> Result<Value, Error>

Source

pub async fn get_subreddit_autocomplete( &self, include_over_18: bool, include_profiles: bool, query: String, ) -> Result<Value, Error>

Source

pub async fn get_subreddit_autocomplete_v2( &self, include_over_18: bool, include_profiles: bool, limit: i64, query: String, search_query_id: String, typeahead_active: bool, ) -> Result<Value, Error>

Source

pub async fn post_subreddit_stylesheet( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_subscribe(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_upload_sr_img(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_subreddit_post_requirements( &self, subreddit: String, ) -> Result<Value, Error>

Source

pub async fn get_r_subreddit_about( &self, subreddit: String, ) -> Result<Value, Error>

Source

pub async fn get_r_subreddit_about_edit( &self, subreddit: String, created: String, location: String, ) -> Result<Value, Error>

Source

pub async fn get_r_subreddit_about_rules( &self, subreddit: String, ) -> Result<Value, Error>

Source

pub async fn get_r_subreddit_about_traffic( &self, subreddit: String, ) -> Result<Value, Error>

Source

pub async fn get_sidebar(&self) -> Result<Value, Error>

Source

pub async fn get_sticky(&self, num: i64) -> Result<Value, Error>

Source

pub async fn get_subreddits_mine_where( &self, where: String, ) -> Result<Value, Error>

Source

pub async fn get_subreddits_where(&self, where: String) -> Result<Value, Error>

Source

pub async fn get_users_where(&self, where: String) -> Result<Value, Error>

Source

pub async fn post_block_user(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_friend(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_report_user(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_setpermissions(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_unfriend(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_user_data_by_account_ids( &self, ids: String, ) -> Result<Value, Error>

Source

pub async fn get_username_available(&self, user: String) -> Result<Value, Error>

Source

pub async fn delete_me_friends_username( &self, username: String, id: String, ) -> Result<Value, Error>

Source

pub async fn put_me_friends_username( &self, username: String, ) -> Result<Value, Error>

Source

pub async fn get_user_username_trophies( &self, username: String, id: String, ) -> Result<Value, Error>

Source

pub async fn get_user_username_about( &self, username: String, ) -> Result<Value, Error>

Source

pub async fn get_user_username_where( &self, username: String, where: String, context: i64, show: String, sort: String, t: String, type: String, ) -> Result<Value, Error>

Source

pub async fn post_widget(&self, body: Value) -> Result<Value, Error>

Source

pub async fn delete_widget_widget_id( &self, widget_id: String, ) -> Result<Value, Error>

Source

pub async fn put_widget_widget_id( &self, widget_id: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_widget_image_upload_s3( &self, body: Value, ) -> Result<Value, Error>

Source

pub async fn patch_widget_order_section( &self, section: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn get_widgets( &self, progressive_images: bool, ) -> Result<Value, Error>

Source

pub async fn post_wiki_alloweditor_act( &self, act: String, body: Value, ) -> Result<Value, Error>

Source

pub async fn post_wiki_edit(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_wiki_hide(&self, body: Value) -> Result<Value, Error>

Source

pub async fn post_wiki_revert(&self, body: Value) -> Result<Value, Error>

Source

pub async fn get_wiki_discussions_page( &self, page: String, after: String, before: String, count: i64, limit: String, show: String, sr_detail: String, ) -> Result<Value, Error>

Source

pub async fn get_wiki_pages(&self) -> Result<Value, Error>

Source

pub async fn get_wiki_revisions( &self, after: String, before: String, count: i64, limit: String, show: String, sr_detail: String, ) -> Result<Value, Error>

Source

pub async fn get_wiki_revisions_page( &self, page: String, after: String, before: String, count: i64, limit: String, show: String, sr_detail: String, ) -> Result<Value, Error>

Source

pub async fn get_wiki_settings_page(&self, page: String) -> Result<Value, Error>

Source

pub async fn post_wiki_settings_page( &self, page: String, body: Value, ) -> Result<Value, Error>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more