pub struct GetAdMetadata {
pub ad_token: String,
pub optional: HashMap<String, Value>,
}
Expand description
Retrieve the metadata for the associated advertisement token (usually provided by one of the other methods responsible for retrieving the playlist).
Name | Type | Description |
---|---|---|
adToken | string | The adToken to retrieve the metadata for. (see Retrieve playlist) |
returnAdTrackingTokens | boolean | (optional - but the adTrackingTokens are required by Register advertisement ) |
supportAudioAds | boolean | audioUrl links for the ads are included in the results if set to ‘True’. (optional) |
includeBannerAd | boolean | bannerAdMap containing an HTML fragment that can be embedded in web pages is included in the results if set to ‘True’. (optional) |
Fields§
§ad_token: String
The ad token associated with the ad for which metadata is being requested.
optional: HashMap<String, Value>
Optional parameters on the call
Implementations§
Source§impl GetAdMetadata
impl GetAdMetadata
Sourcepub fn and_boolean_option(self, option: &str, value: bool) -> Self
pub fn and_boolean_option(self, option: &str, value: bool) -> Self
Convenience function for setting boolean flags in the request. (Chaining call)
Sourcepub fn return_ad_tracking_tokens(self, value: bool) -> Self
pub fn return_ad_tracking_tokens(self, value: bool) -> Self
Whether request should include ad tracking tokens in the response. (Chaining call)
Sourcepub fn support_audio_ads(self, value: bool) -> Self
pub fn support_audio_ads(self, value: bool) -> Self
Inform pandora whether audio ads are supported. (Chaining call)
Whether request should include banner ads in the response. (Chaining call)
Trait Implementations§
Source§impl Clone for GetAdMetadata
impl Clone for GetAdMetadata
Source§fn clone(&self) -> GetAdMetadata
fn clone(&self) -> GetAdMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GetAdMetadata
impl Debug for GetAdMetadata
Source§impl PandoraJsonApiRequest for GetAdMetadata
impl PandoraJsonApiRequest for GetAdMetadata
Source§type Response = GetAdMetadataResponse
type Response = GetAdMetadataResponse
The type that the json response will be deserialized to.
Source§fn encrypt_request(&self) -> bool
fn encrypt_request(&self) -> bool
Whether the json body of the API call is expected to be encrypted before
transmission.
Source§fn get_method(&self) -> String
fn get_method(&self) -> String
Returns the name of the Pandora JSON API call in the form that it must
appear when making that call.
Source§fn get_json(&self) -> Result<Value, Self::Error>
fn get_json(&self) -> Result<Value, Self::Error>
Returns the root json Value that should be serialized into the body of
the API call.
Source§fn request(
&self,
session: &mut PandoraSession,
) -> Result<RequestBuilder, Self::Error>
fn request( &self, session: &mut PandoraSession, ) -> Result<RequestBuilder, Self::Error>
Generate an HTTP request that, when send() is called on it, will submit
the built request.
Source§fn response<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut PandoraSession,
) -> Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn response<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut PandoraSession,
) -> Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Build the request, submit it, and extract the response content from the
body json, and deserialize it into the Self::Response type.
Auto Trait Implementations§
impl Freeze for GetAdMetadata
impl RefUnwindSafe for GetAdMetadata
impl Send for GetAdMetadata
impl Sync for GetAdMetadata
impl Unpin for GetAdMetadata
impl UnwindSafe for GetAdMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more