C# Class ChobiQ.DoubanFMAPICodePack.DoubanFMClient

Provides methods for sending data to and receiving data from DoubanFM server.
Afficher le fichier Open project: jasine/SaveDouban Class Usage Examples

Méthodes publiques

Méthode Description
ClearLastChannel ( ) : void

Removes saved last time played channel if exists.

DoubanFMClient ( ) : System.Collections.Generic

Initializes a new instance of the DoubanFMClient class.

Like ( ) : void

Indicates user mark current song as a liked-song.

LoadLastChannel ( ) : void

Loads last time played channel from local storage.

If no saved channel, a default channel will be applied.

Login ( string email, string password, bool saveStatus ) : LoginResponse

Signs in with user email and password and receives response from DoubanFM server.

Logout ( ) : void

Signs out and remove saved user status if exists.

NewList ( ) : void

Gets a new playlist.

Next ( ) : void

Notifies server that current song plays to end, then play next song.

PlayNoMore ( ) : void

Indicates do not play current song any more.

SaveCurrentChannel ( ) : void

Saves current playing channel to local storage.

SaveStatus ( ) : void

Saves current user sign-in status if exists.

Skip ( ) : void

Skips current song.

SwitchChannel ( Channel newChannel ) : void

Switches to another channel, playlist will be updated.

TryLoadStatus ( ) : bool

Tries to recover user sign-in status from storage.

Unlike ( ) : void

Indicates user unmark current song as a liked-song.

Private Methods

Méthode Description
DequeueToHistory ( PlayOperation operationType ) : Song
ExtractPlaylist ( PlaylistResponse resp, bool clearList ) : void

Method Details

ClearLastChannel() public méthode

Removes saved last time played channel if exists.
public ClearLastChannel ( ) : void
Résultat void

DoubanFMClient() public méthode

Initializes a new instance of the DoubanFMClient class.
public DoubanFMClient ( ) : System.Collections.Generic
Résultat System.Collections.Generic

Like() public méthode

Indicates user mark current song as a liked-song.
public Like ( ) : void
Résultat void

LoadLastChannel() public méthode

Loads last time played channel from local storage.
If no saved channel, a default channel will be applied.
public LoadLastChannel ( ) : void
Résultat void

Login() public méthode

Signs in with user email and password and receives response from DoubanFM server.
public Login ( string email, string password, bool saveStatus ) : LoginResponse
email string User email.
password string User password.
saveStatus bool Indicates if this client should /// save user's status when sign-in succeeded.
Résultat LoginResponse

Logout() public méthode

Signs out and remove saved user status if exists.
public Logout ( ) : void
Résultat void

NewList() public méthode

Gets a new playlist.
public NewList ( ) : void
Résultat void

Next() public méthode

Notifies server that current song plays to end, then play next song.
public Next ( ) : void
Résultat void

PlayNoMore() public méthode

Indicates do not play current song any more.
public PlayNoMore ( ) : void
Résultat void

SaveCurrentChannel() public méthode

Saves current playing channel to local storage.
public SaveCurrentChannel ( ) : void
Résultat void

SaveStatus() public méthode

Saves current user sign-in status if exists.
public SaveStatus ( ) : void
Résultat void

Skip() public méthode

Skips current song.
public Skip ( ) : void
Résultat void

SwitchChannel() public méthode

Switches to another channel, playlist will be updated.
public SwitchChannel ( Channel newChannel ) : void
newChannel Channel
Résultat void

TryLoadStatus() public méthode

Tries to recover user sign-in status from storage.
public TryLoadStatus ( ) : bool
Résultat bool

Unlike() public méthode

Indicates user unmark current song as a liked-song.
public Unlike ( ) : void
Résultat void