Struct pandora_api::json::PandoraSession[][src]

pub struct PandoraSession { /* fields omitted */ }

A builder to construct the properties of an http request to Pandora.

Implementations

impl PandoraSession[src]

pub fn new<T: ToEncryptionTokens, E: ToEndpoint>(
    client: Option<Client>,
    to_encryption_tokens: &T,
    to_endpoint: &E
) -> Self
[src]

Construct a new PandoraSession.

pub fn copy_session(&self) -> Self[src]

Create a new PandoraSession copying the endpoint and session values into the new object.

pub fn http_client(&self) -> &Client[src]

Get a reference to the http client.

pub fn endpoint<E: ToEndpoint>(&mut self, to_endpoint: E) -> &mut Self[src]

Set the Endpoint on this PandoraSession instance.

pub fn endpoint_mut<E: ToEndpoint>(&mut self) -> &mut Url[src]

Get a mutable reference to the endpoint url::Url to update or make calls on it.

pub fn update_partner_tokens<T: ToPartnerTokens>(
    &mut self,
    to_partner_tokens: &T
)
[src]

Update the session partner tokens from type implementing ToPartnerTokens.

pub fn update_user_tokens<T: ToUserTokens>(&mut self, to_user_tokens: &T)[src]

Update the session partner tokens from type implementing ToPartnerTokens.

pub fn session_tokens(&self) -> &SessionTokens[src]

Get a reference to the session tokens to check the state or make calls on it.

pub fn session_tokens_mut(&mut self) -> &mut SessionTokens[src]

Get a mutable reference to the session tokens to modify the state or make calls on it.

pub fn json(&mut self, json: Value) -> &mut Self[src]

Set the json object on this PandoraSession instance.

When build() is called, the json object will be updated with session keys from the session instance, if one was provided.

pub fn json_mut(&mut self) -> &mut Value[src]

Get a mutable reference to the json to update or make calls on it.

pub fn arg(&mut self, key: &str, value: &str) -> &mut Self[src]

Add query arguments to the http request.

pub fn encrypted(&mut self) -> &mut Self[src]

Require that the request body be encrypted using the session instance, if any was set. If no session instance is set, this will silently transmit the data unencrypted.

pub fn build(&mut self) -> RequestBuilder[src]

Build a reqwest::blocking::Request, which can be inspected, modified, and executed with reqwest::blocking::Client::execute().

Trait Implementations

impl Clone for PandoraSession[src]

impl Debug for PandoraSession[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.