C# Class ChobiQ.DoubanFMAPICodePack.DoubanFMClient

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

Public Methods

Method 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

Method Description
DequeueToHistory ( PlayOperation operationType ) : Song
ExtractPlaylist ( PlaylistResponse resp, bool clearList ) : void

Method Details

ClearLastChannel() public method

Removes saved last time played channel if exists.
public ClearLastChannel ( ) : void
return void

DoubanFMClient() public method

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

Like() public method

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

LoadLastChannel() public method

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

Login() public method

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.
return LoginResponse

Logout() public method

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

NewList() public method

Gets a new playlist.
public NewList ( ) : void
return void

Next() public method

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

PlayNoMore() public method

Indicates do not play current song any more.
public PlayNoMore ( ) : void
return void

SaveCurrentChannel() public method

Saves current playing channel to local storage.
public SaveCurrentChannel ( ) : void
return void

SaveStatus() public method

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

Skip() public method

Skips current song.
public Skip ( ) : void
return void

SwitchChannel() public method

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

TryLoadStatus() public method

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

Unlike() public method

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