C# Класс ChobiQ.DoubanFMAPICodePack.DoubanFMClient

Provides methods for sending data to and receiving data from DoubanFM server.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
DequeueToHistory ( PlayOperation operationType ) : Song
ExtractPlaylist ( PlaylistResponse resp, bool clearList ) : void

Описание методов

ClearLastChannel() публичный Метод

Removes saved last time played channel if exists.
public ClearLastChannel ( ) : void
Результат void

DoubanFMClient() публичный Метод

Initializes a new instance of the DoubanFMClient class.
public DoubanFMClient ( ) : System.Collections.Generic
Результат System.Collections.Generic

Like() публичный Метод

Indicates user mark current song as a liked-song.
public Like ( ) : void
Результат void

LoadLastChannel() публичный Метод

Loads last time played channel from local storage.
If no saved channel, a default channel will be applied.
public LoadLastChannel ( ) : void
Результат void

Login() публичный Метод

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.
Результат LoginResponse

Logout() публичный Метод

Signs out and remove saved user status if exists.
public Logout ( ) : void
Результат void

NewList() публичный Метод

Gets a new playlist.
public NewList ( ) : void
Результат void

Next() публичный Метод

Notifies server that current song plays to end, then play next song.
public Next ( ) : void
Результат void

PlayNoMore() публичный Метод

Indicates do not play current song any more.
public PlayNoMore ( ) : void
Результат void

SaveCurrentChannel() публичный Метод

Saves current playing channel to local storage.
public SaveCurrentChannel ( ) : void
Результат void

SaveStatus() публичный Метод

Saves current user sign-in status if exists.
public SaveStatus ( ) : void
Результат void

Skip() публичный Метод

Skips current song.
public Skip ( ) : void
Результат void

SwitchChannel() публичный Метод

Switches to another channel, playlist will be updated.
public SwitchChannel ( Channel newChannel ) : void
newChannel Channel
Результат void

TryLoadStatus() публичный Метод

Tries to recover user sign-in status from storage.
public TryLoadStatus ( ) : bool
Результат bool

Unlike() публичный Метод

Indicates user unmark current song as a liked-song.
public Unlike ( ) : void
Результат void