pub struct PartnerLogin {
pub username: String,
pub password: String,
pub device_model: String,
pub version: String,
pub optional: HashMap<String, Value>,
}Expand description
This request additionally serves as API version validation, time synchronization and endpoint detection and must be sent over a TLS-encrypted link. The POST body however is not encrypted.
| Name | Type | Description | | username | string | See Partner passwords | | password | string | See Partner passwords | | deviceModel | string | See Partner passwords | | version | string | Current version number, “5”. | | includeUrls | boolean | | | returnDeviceType | boolean | | | returnUpdatePromptVersions | boolean | |
{
"username": "pandora one",
"password": "TVCKIBGS9AO9TSYLNNFUML0743LH82D",
"deviceModel": "D01",
"version": "5"
}Fields§
§username: StringThe partner login name (not the account-holder’s username) used to authenticate the application with the Pandora service.
password: StringThe partner login password (not the account-holder’s username) used to authenticate the application with the Pandora service.
device_model: StringThe partner device model name.
version: StringThe Pandora JSON API version
optional: HashMap<String, Value>Optional parameters on the call
Implementations§
Source§impl PartnerLogin
impl PartnerLogin
Sourcepub fn new(
username: &str,
password: &str,
device_model: &str,
version: Option<String>,
) -> Self
pub fn new( username: &str, password: &str, device_model: &str, version: Option<String>, ) -> Self
Create a new PartnerLogin with some values. All Optional fields are set to None.
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 include_urls(self, value: bool) -> Self
pub fn include_urls(self, value: bool) -> Self
Whether to request to include urls in the response. (Chaining call)
Sourcepub fn return_device_type(self, value: bool) -> Self
pub fn return_device_type(self, value: bool) -> Self
Whether to request to include the device type in the response. (Chaining call)
Sourcepub fn return_update_prompt_versions(self, value: bool) -> Self
pub fn return_update_prompt_versions(self, value: bool) -> Self
Whether to request to return a prompt to update versions in the response. (Chaining call)
Sourcepub async fn merge_response(
&self,
session: &mut PandoraSession,
) -> Result<PartnerLoginResponse, Error>
pub async fn merge_response( &self, session: &mut PandoraSession, ) -> Result<PartnerLoginResponse, Error>
This is a wrapper around the response method from the
PandoraJsonApiRequest trait that automatically merges the partner tokens
from the response back into the session.
Trait Implementations§
Source§impl Clone for PartnerLogin
impl Clone for PartnerLogin
Source§fn clone(&self) -> PartnerLogin
fn clone(&self) -> PartnerLogin
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more