douban.fm 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -29,10 +29,17 @@ Usage: douban.fm [OPTIONS]
29
29
  -p, --password [password] douban.fm account password
30
30
  if not provided, will be asked
31
31
  -m, --mpd do not play by it own, send playlist to Music Player Daemon
32
+ -r, --remote remote mpd remote host, in format of <IP>:<Port>
32
33
  -c, --channel channel which channel to play
33
34
  if not provided, channel 0 will be selected but who knows what it is
34
35
  -l, --list list all available channels
35
- -v, --verbose verbose mode
36
+ -i, --interaction [port] start an http server for interaction
37
+ if omit port, 3000 will be used by default
38
+ GET /channels to get all available channels
39
+ GET /now to get current playing channel
40
+ GET /channel/<id> to switch to channel of the specified id
41
+ -V, --verbose verbose mode
42
+ -v, --version show current version
36
43
  -h, --help show this message
37
44
  </pre>
38
45
 
@@ -61,6 +68,10 @@ Basically there are two ways to play music
61
68
  * `douban.fm -m -u xxx@xxx.com -p xxx` will play private playlist
62
69
  * `douban.fm -m -u xxx@xxx.com -p xxx -c 1` will play channel 1 but with your account signed in
63
70
  * `douban.fm -m -u xxx@xx.com -p` will play private playlist but will ask for your password to sign in
71
+ * if "-m -i" is provided, a web server will start listening on 3000 by default, and you may
72
+ * GET /channels to get all available channels
73
+ * GET /now to get current playing channel
74
+ * GET /channel/<id> to switch to channel of the specified id
64
75
 
65
76
  ## Contributing
66
77
 
@@ -51,7 +51,10 @@ class DoubanFMCLI
51
51
 
52
52
  opts.on('-i', '--interaction [port]',
53
53
  'start an http server for interaction',
54
- 'if omit port, 3000 will be used by default') do |port|
54
+ 'if omit port, 3000 will be used by default',
55
+ 'GET /channels to get all available channels',
56
+ 'GET /now to get current playing channel',
57
+ 'GET /channel/<id> to switch to channel of the specified id') do |port|
55
58
  options.interaction = true
56
59
  options.port = port
57
60
  end
@@ -1,3 +1,3 @@
1
1
  module DoubanFM
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: douban.fm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-01-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-mpd
16
- requirement: &70272128749900 !ruby/object:Gem::Requirement
16
+ requirement: &70282342118460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - =
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.1.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70272128749900
24
+ version_requirements: *70282342118460
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: highline
27
- requirement: &70272128749180 !ruby/object:Gem::Requirement
27
+ requirement: &70282342117600 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - =
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 1.6.15
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70272128749180
35
+ version_requirements: *70282342117600
36
36
  description: douban.fm
37
37
  email:
38
38
  - hxliang1982@gmail.com