InstagramAPI

Struct InstagramAPI 

Source
pub struct InstagramAPI<'a> {
    pub api: RocketAPI<'a>,
    pub last_response: Value,
    pub counter: u32,
}

Fields§

§api: RocketAPI<'a>§last_response: Value§counter: u32

Implementations§

Source§

impl<'a> InstagramAPI<'a>

Source

pub fn new(token: &'a str, max_timeout: Duration) -> Self

Source

pub async fn search(&mut self, query: &str) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_info( &mut self, username: &str, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_info_by_id( &mut self, user_id: &u64, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_media( &mut self, user_id: &u64, count: Option<u8>, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_clips( &mut self, user_id: &u64, count: Option<u8>, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_guides( &mut self, user_id: &u64, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_tags( &mut self, user_id: &u64, count: Option<u8>, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_following( &mut self, user_id: &u64, count: Option<u16>, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn search_user_following( &mut self, user_id: &u64, query: &str, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_followers( &mut self, user_id: &u64, count: Option<u8>, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn search_user_followers( &mut self, user_id: &u64, query: &str, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_stories_bulk( &mut self, user_ids: Vec<&u64>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_stories( &mut self, user_id: &u64, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_highlights( &mut self, user_id: &u64, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_live( &mut self, user_id: &u64, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_similar_accounts( &mut self, user_id: &u64, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_media_info( &mut self, media_id: &u64, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_media_info_by_shortcode( &mut self, shortcode: &str, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_media_likes( &mut self, shortcode: &str, count: Option<u8>, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_media_comments( &mut self, media_id: &u64, can_support_threading: Option<bool>, min_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_media_shortcode_by_id( &mut self, media_id: &u64, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_media_id_by_shortcode( &mut self, shortcode: &str, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_guide_info( &mut self, guide_id: &u64, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_location_info( &mut self, location_id: &u64, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_location_media( &mut self, location_id: &u64, page: Option<&u64>, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_hashtag_info( &mut self, name: &str, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_hashtag_media( &mut self, name: &str, page: Option<&u64>, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_highlight_stories_bulk( &mut self, highlight_ids: Vec<&u64>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_highlight_stories( &mut self, highlight_id: &u64, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_comment_likes( &mut self, comment_id: &u64, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_comment_replies( &mut self, comment_id: &u64, media_id: &u64, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_audio_media( &mut self, audio_id: &u64, max_id: Option<&str>, ) -> Result<Value, RocketAPIError>

Source

pub async fn get_user_about( &mut self, user_id: &u64, ) -> Result<Value, RocketAPIError>

Auto Trait Implementations§

§

impl<'a> Freeze for InstagramAPI<'a>

§

impl<'a> RefUnwindSafe for InstagramAPI<'a>

§

impl<'a> Send for InstagramAPI<'a>

§

impl<'a> Sync for InstagramAPI<'a>

§

impl<'a> Unpin for InstagramAPI<'a>

§

impl<'a> UnwindSafe for InstagramAPI<'a>

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, 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<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
Source§

impl<T> ErasedDestructor for T
where T: 'static,