xbmc-jsonrpc 0.2.0 → 0.2.1
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.rdoc +34 -34
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/xbmc-jsonrpc.gemspec +4 -1
- metadata +17 -3
data/README.rdoc
CHANGED
@@ -3,78 +3,78 @@
|
|
3
3
|
XBMC_JSONRPC is a module created for simple interaction with the XBMC JSONRPC API introduced in XBMC dharma 2.
|
4
4
|
|
5
5
|
Create a new connection:
|
6
|
-
|
7
|
-
|
6
|
+
irb(main):001:0> x = XBMC_JSONRPC.new
|
7
|
+
=> XBMC_JSONRPC
|
8
8
|
|
9
9
|
List all commands (including the details):
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
irb(main):002:0> x.commands
|
12
|
+
=> {"System.GetInfoLabels"=>{"executable"=>true, "permission"=>"ReadData", "description"=>"Retrieve info labels about the system"}, "Files.Download"=>{"executable"=>true, "permission"=>"ReadData", "description"=>"Specify a file to download to get info about how to download it, i.e a proper URL"}, "PicturePlayer.PlayPause"=>{"executable"=>true, "permission"=>"ControlPlayback", "description"=>"Pauses or unpause slideshow"}.....
|
13
13
|
|
14
14
|
Find suitable commands based on name / description:
|
15
15
|
|
16
|
-
|
16
|
+
irb(main):003:0> x.apropos :slideshow
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
PicturePlayer.PlayPause
|
19
|
+
Pauses or unpause slideshow
|
20
20
|
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
XBMC.StartSlideshow
|
23
|
+
Starts slideshow. Parameter example {"directory": "/foo/", "random": true, "recursive": true} or just string to recursively and random run directory
|
24
24
|
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
PicturePlayer.Stop
|
27
|
+
Stops slideshow
|
28
28
|
|
29
29
|
|
30
|
-
|
31
|
-
|
30
|
+
PicturePlayer.SkipNext
|
31
|
+
Skips to next picture in the slideshow
|
32
32
|
|
33
33
|
|
34
|
-
|
35
|
-
|
34
|
+
PicturePlayer.SkipPrevious
|
35
|
+
Skips to previous picture in the slideshow
|
36
36
|
|
37
|
-
|
37
|
+
=> nil
|
38
38
|
|
39
39
|
|
40
40
|
Get the commands for a namespace:
|
41
41
|
|
42
|
-
|
42
|
+
irb(main):007:0> x::XBMC.commands
|
43
43
|
|
44
|
-
|
45
|
-
|
44
|
+
XBMC.Play
|
45
|
+
Starts playback
|
46
46
|
|
47
47
|
|
48
|
-
|
49
|
-
|
48
|
+
XBMC.GetVolume
|
49
|
+
Retrieve the current volume
|
50
50
|
|
51
51
|
|
52
|
-
|
53
|
-
|
52
|
+
XBMC.StartSlideshow
|
53
|
+
Starts slideshow. Parameter example {"directory": "/foo/", "random": true, "recursive": true} or just string to recursively and random run directory
|
54
54
|
|
55
55
|
|
56
|
-
|
57
|
-
|
56
|
+
XBMC.SetVolume
|
57
|
+
Set volume. Parameter integer between 0 amd 100
|
58
58
|
|
59
59
|
|
60
|
-
|
61
|
-
|
60
|
+
XBMC.Quit
|
61
|
+
Quit xbmc
|
62
62
|
|
63
63
|
|
64
|
-
|
65
|
-
|
64
|
+
XBMC.Log
|
65
|
+
Logs a line in the xbmc.log. Parameter example {"message": "foo", "level": "info"} or just a string to log message with level debug
|
66
66
|
|
67
67
|
|
68
|
-
|
69
|
-
|
68
|
+
XBMC.ToggleMute
|
69
|
+
Toggle mute
|
70
70
|
|
71
|
-
=> [nil, nil, nil, nil, nil, nil, nil]
|
71
|
+
=> [nil, nil, nil, nil, nil, nil, nil]
|
72
72
|
|
73
73
|
|
74
74
|
Commands are run like so:
|
75
75
|
|
76
|
-
|
77
|
-
|
76
|
+
irb(main):008:0> x::VideoPlayer.PlayPause
|
77
|
+
=> {"result"=>{"playing"=>true, "paused"=>false}, "id"=>1, "jsonrpc"=>"2.0"}
|
78
78
|
|
79
79
|
== Note on Patches/Pull Requests
|
80
80
|
|
data/Rakefile
CHANGED
@@ -11,6 +11,7 @@ begin
|
|
11
11
|
gem.homepage = "http://github.com/re5et/xbmc-jsonrpc"
|
12
12
|
gem.authors = ["atom smith"]
|
13
13
|
gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
|
14
|
+
gem.add_dependency "json", ">= 0"
|
14
15
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
16
|
end
|
16
17
|
Jeweler::GemcutterTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/xbmc-jsonrpc.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{xbmc-jsonrpc}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["atom smith"]
|
@@ -44,11 +44,14 @@ Gem::Specification.new do |s|
|
|
44
44
|
|
45
45
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
46
46
|
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
47
|
+
s.add_runtime_dependency(%q<json>, [">= 0"])
|
47
48
|
else
|
48
49
|
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
50
|
+
s.add_dependency(%q<json>, [">= 0"])
|
49
51
|
end
|
50
52
|
else
|
51
53
|
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
54
|
+
s.add_dependency(%q<json>, [">= 0"])
|
52
55
|
end
|
53
56
|
end
|
54
57
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xbmc-jsonrpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- atom smith
|
@@ -32,6 +32,20 @@ dependencies:
|
|
32
32
|
version: "0"
|
33
33
|
type: :development
|
34
34
|
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: json
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id002
|
35
49
|
description: A module for interacting with xbmc's json-rpc server
|
36
50
|
email: re5etsmyth@gmail.com
|
37
51
|
executables: []
|