A .NET client library for douban.fm
C#
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Kfstorm.DoubanFM.Core.FunctionalTest
Kfstorm.DoubanFM.Core.UnitTest
Kfstorm.DoubanFM.Core
WpfClientSample
.gitattributes
.gitignore
Kfstorm.DoubanFM.Core.sln
Kfstorm.DoubanFM.Core.sln.DotSettings
README.md
appveyor.yml

README.md

Kfstorm.DoubanFM.Core

A .NET client library for douban.fm

NOTE: This project is still under development.

Build status

Usage

  1. Install the nuget package to your project.
  2. Create an instance of IPlayer interface and call the methods. Here is the sample code:
    var session = new Session(new ServerConnection("02646d3fb69a52ff072d47bf23cef8fd", "cde5d61429abcd7c", "radio_iphone", "100", new Uri("http://www.douban.com/mobile/fm"), Guid.NewGuid().ToString("N")));
    var player = new Player(session);
    var discovery = new Discovery(session);
    var channelGroups = await discovery.GetRecommendedChannels();
    var newChannel = channelGroups[0].Channels[0];
    var channelName = newChannel.Name;
    await player.ChangeChannel(newChannel);
    var currentSong = player.CurrentSong;
    var title = currentSong.Title;
    var url = currentSong.Url;
    await player.Next(NextCommandType.SkipCurrentSong);