Hi Folks,
just wanted to let you know that I've created a (very alpha and basic) Ruby client for the JSON RPC API.
It does not explicitly define all the classes and methods in the source code, but rather builds itself on the fly by calling JSONRPC.Introspect and then dynamically defining all namespaces and methods, so with very little code, the API is (kind of) covered completely.
You can find the source on Github: https://github.com/colszowka/xbmc-client
It is available as a Rubygem "xbmc-client", see the gem website at http://rubygems.org/gems/xbmc-client
I've only tried it with the AudioLibrary and AudioPlayer API so far, but I don't see a reason why it shouldn't work for the other API requests as long as there are no quirks in certain API calls that I'm not aware of.
I've also filed a related feature request for the JSON RPC API on Trac: http://trac.xbmc.org/ticket/10763
Ruby JSON RPC API Client
TheDeadSerious
Junior Member Posts: 10 Joined: Nov 2010 Reputation: 0 |
|
| find quote |
spiff
Grumpy Bastard Developer Joined: Nov 2003 Reputation: 82 |
2010-11-25 12:54
Post: #2
damn that's beautiful code
Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. |
| find quote |
TheDeadSerious
Junior Member Posts: 10 Joined: Nov 2010 Reputation: 0 |
2010-11-25 13:09
Post: #3
spiff Wrote:damn that's beautiful code Thanks mate
|
| find quote |
topfs2
Team-XBMC Developer Joined: Dec 2007 Reputation: 8 |
2010-11-25 17:50
Post: #4
I must say, building the methods on the fly is so beautiful I want to cry
Perfect example why we added the introspect.Great job! Hope to see some awesome clients thanks to this! If you have problems please read this before posting Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() "Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#." |
| find quote |
TheDeadSerious
Junior Member Posts: 10 Joined: Nov 2010 Reputation: 0 |
2010-11-25 18:57
Post: #5
Thanks again
![]() I'm currently working on a music web client based upon this with Rhythmbox/Itunes-ish UI. Basic stuff is (kinda) working already, but it will need a lot more work - no real UI at the moment. We'll see... |
| find quote |
Walter Sobchak
Junior Member Posts: 40 Joined: Sep 2011 Reputation: 0 |
2011-09-18 00:08
Post: #6
Very nice usage of the ruby language! Now wouldn't it be nice if we could write addons for xmbc in ruby?
|
| find quote |
Phobia
Junior Member Posts: 24 Joined: Oct 2007 Reputation: 0 |
2012-02-07 19:02
Post: #7
Hello,
Firstly - sorry for dragging up such an old thread. I've recently found an interesting Ruby client for AirVideo - a Windows and Mac based Server which transcodes content on the fly (on the remote side) primarily for consumption over the Internet. The server was developed for iOS devices (iPhone/iPod/iPad etc.). One installs the "Server" component on their machine at home with enough horsepower to transcode video, and the AirVideo "App" on their iDevice to stream that content on the road. I've been looking for a way to add a remote video source to XBMC that would be capable of traversing a WAN connection, served by a typical home Internet connection. As most of my content is 720p+, that really means there is a need to transcode due to limited available bandwidth. I use AirVideo on my iPhone, and if you have a recent build of XBMC running, you can use Apple's own AirPlay technology to achieve this already, but that requires an iDevice to leverage. I'd like to be able to eliminate the iDevice, and instead stream directly from the Server to the remote XBMC client. Here is the link to the forum post which in turn links to the software (including source) : http://inmethod.com/forum/posts/list/195/514.page#23889 Here is the post inline as well : Code: Air Video Client for Windows: [url]http://dl.dropbox.com/u/10205542/AirVideoClient_win32_20111218.zip[/url]Is a Ruby client like this something which can be made to work with XBMC? Not being one who can program, I have little to no idea. Thanks, -- Phob |
| find quote |

![[Image: badge.gif]](http://www.ohloh.net/projects/149/badge.gif)
Search
Help