pub struct UserLogin {
pub login_type: String,
pub username: String,
pub password: String,
pub optional: HashMap<String, Value>,
}Expand description
This request must be sent over a TLS-encrypted link. It authenticates the Pandora user by sending his username, usually his email address, and password as well as the partnerAuthToken obtained by Partner login.
Additional response data can be requested by setting flags listed below.
| Name | Type | Description | | loginType | string | “user” | | username | string | Username | | password | string | User’s password | | partnerAuthToken | string | Partner token obtained by Partner login | | returnGenreStations | boolean | (optional) | | returnCapped | boolean | return isCapped parameter (optional) | | includePandoraOneInfo | boolean | (optional) | | includeDemographics | boolean | (optional) | | includeAdAttributes | boolean | (optional) | | returnStationList | boolean | Return station list, see Retrieve station list (optional) | | includeStationArtUrl | boolean | (optional) | | includeStationSeeds | boolean | (optional) | | includeShuffleInsteadOfQuickMix | boolean | (optional) | | stationArtSize | string | W130H130(optional) | | returnCollectTrackLifetimeStats | boolean | (optional) | | returnIsSubscriber | boolean | (optional) | | xplatformAdCapable | boolean | (optional) | | complimentarySponsorSupported | boolean | (optional) | | includeSubscriptionExpiration | boolean | (optional) | | returnHasUsedTrial | boolean | (optional) | | returnUserstate | boolean | (optional) | | includeAccountMessage | boolean | (optional) | | includeUserWebname | boolean | (optional) | | includeListeningHours | boolean | (optional) | | includeFacebook | boolean | (optional) | | includeTwitter | boolean | (optional) | | includeDailySkipLimit | boolean | (optional) | | includeSkipDelay | boolean | (optional) | | includeGoogleplay | boolean | (optional) | | includeShowUserRecommendations | boolean | (optional) | | includeAdvertiserAttributes | boolean | (optional) |
{
"loginType": "user",
"username": "user@example.com",
"password": "example",
"partnerAuthToken": "VAzrFQTtsy3BQ3K+3iqFi0WF5HA63B1nFA",
"includePandoraOneInfo":true,
"includeAdAttributes":true,
"includeSubscriptionExpiration":true,
"includeStationArtUrl":true,
"returnStationList":true,
"returnGenreStations":true,
"syncTime": 1335777573
}Fields§
§login_type: StringThis field should always have the value user.
username: StringThe account username to login with.
password: StringThe account password to login with.
optional: HashMap<String, Value>Optional parameters on the call
Implementations§
Source§impl UserLogin
impl UserLogin
Sourcepub fn new(username: &str, password: &str) -> Self
pub fn new(username: &str, password: &str) -> Self
Initialize a basic UserLogin request. 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 and_string_option(self, option: &str, value: &str) -> Self
pub fn and_string_option(self, option: &str, value: &str) -> Self
Convenience function for setting string flags in the request. (Chaining call)
Sourcepub fn return_genre_stations(self, value: bool) -> Self
pub fn return_genre_stations(self, value: bool) -> Self
Whether request should return genre stations in the response. (Chaining call)
Sourcepub fn return_capped(self, value: bool) -> Self
pub fn return_capped(self, value: bool) -> Self
Whether request should return capped in the response. (Chaining call)
Sourcepub fn include_pandora_one_info(self, value: bool) -> Self
pub fn include_pandora_one_info(self, value: bool) -> Self
Whether request should include PandoraOne info in the response. (Chaining call)
Sourcepub fn include_demographics(self, value: bool) -> Self
pub fn include_demographics(self, value: bool) -> Self
Whether request should include demographics in the response. (Chaining call)
Sourcepub fn include_ad_attributes(self, value: bool) -> Self
pub fn include_ad_attributes(self, value: bool) -> Self
Whether request should include ad attributes in the response. (Chaining call)
Sourcepub fn return_station_list(self, value: bool) -> Self
pub fn return_station_list(self, value: bool) -> Self
Whether request should return station list in the response. (Chaining call)
Sourcepub fn include_station_art_url(self, value: bool) -> Self
pub fn include_station_art_url(self, value: bool) -> Self
Whether request should include the station art url in the response. (Chaining call)
Sourcepub fn include_station_seeds(self, value: bool) -> Self
pub fn include_station_seeds(self, value: bool) -> Self
Whether request should include the station seeds in the response. (Chaining call)
Sourcepub fn include_shuffle_instead_of_quick_mix(self, value: bool) -> Self
pub fn include_shuffle_instead_of_quick_mix(self, value: bool) -> Self
Whether request should include shuffle stations instead of quickmix in the response. (Chaining call)
Sourcepub fn station_art_size(self, value: &str) -> Self
pub fn station_art_size(self, value: &str) -> Self
The size of station art to include in the response (if includeStationArlUrl was set). (Chaining call)
Sourcepub fn return_collect_track_lifetime_stats(self, value: bool) -> Self
pub fn return_collect_track_lifetime_stats(self, value: bool) -> Self
Whether request should return collect track lifetime stats in the response. (Chaining call)
Sourcepub fn return_is_subscriber(self, value: bool) -> Self
pub fn return_is_subscriber(self, value: bool) -> Self
Whether request should return whether the user is a subscriber in the response. (Chaining call)
Sourcepub fn xplatform_ad_capable(self, value: bool) -> Self
pub fn xplatform_ad_capable(self, value: bool) -> Self
Whether the requesting client is cross-platform ad capable. (Chaining call)
Sourcepub fn complimentary_sponsor_supported(self, value: bool) -> Self
pub fn complimentary_sponsor_supported(self, value: bool) -> Self
Whether the complimentary sponsors are supported. (Chaining call)
Sourcepub fn include_subscription_expiration(self, value: bool) -> Self
pub fn include_subscription_expiration(self, value: bool) -> Self
Whether request should include subscription expiration in the response. (Chaining call)
Sourcepub fn return_has_used_trial(self, value: bool) -> Self
pub fn return_has_used_trial(self, value: bool) -> Self
Whether request should return whether the user has used their trial subscription in the response. (Chaining call)
Sourcepub fn return_userstate(self, value: bool) -> Self
pub fn return_userstate(self, value: bool) -> Self
Whether request should return user state in the response. (Chaining call)
Sourcepub fn include_account_message(self, value: bool) -> Self
pub fn include_account_message(self, value: bool) -> Self
Whether request should return account message in the response. (Chaining call)
Sourcepub fn include_user_webname(self, value: bool) -> Self
pub fn include_user_webname(self, value: bool) -> Self
Whether request should include user webname in the response. (Chaining call)
Sourcepub fn include_listening_hours(self, value: bool) -> Self
pub fn include_listening_hours(self, value: bool) -> Self
Whether request should include listening hours in the response. (Chaining call)
Sourcepub fn include_facebook(self, value: bool) -> Self
pub fn include_facebook(self, value: bool) -> Self
Whether request should include facebook connections in the response. (Chaining call)
Sourcepub fn include_twitter(self, value: bool) -> Self
pub fn include_twitter(self, value: bool) -> Self
Whether request should include twitter connections in the response. (Chaining call)
Sourcepub fn include_daily_skip_limit(self, value: bool) -> Self
pub fn include_daily_skip_limit(self, value: bool) -> Self
Whether request should include daily skip limit in the response. (Chaining call)
Sourcepub fn include_skip_delay(self, value: bool) -> Self
pub fn include_skip_delay(self, value: bool) -> Self
Whether request should include the track skip delay in the response. (Chaining call)
Sourcepub fn include_googleplay(self, value: bool) -> Self
pub fn include_googleplay(self, value: bool) -> Self
Whether request should include Google Play metadata in the response. (Chaining call)
Sourcepub fn include_show_user_recommendations(self, value: bool) -> Self
pub fn include_show_user_recommendations(self, value: bool) -> Self
Whether request should include the user recommendations in the response. (Chaining call)
Sourcepub fn include_advertiser_attributes(self, value: bool) -> Self
pub fn include_advertiser_attributes(self, value: bool) -> Self
Whether request should include advertiser attributes in the response. (Chaining call)
Sourcepub async fn merge_response(
&self,
session: &mut PandoraSession,
) -> Result<UserLoginResponse, Error>
pub async fn merge_response( &self, session: &mut PandoraSession, ) -> Result<UserLoginResponse, Error>
This is a wrapper around the response method from the
PandoraJsonApiRequest trait that automatically merges the user tokens from
the response back into the session.