Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amenk/xbmc-api
https://github.com/amenk/xbmc-api
hacktoberfest
Last synced: about 6 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/amenk/xbmc-api
- Owner: amenk
- Created: 2013-04-13T14:42:38.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-04-13T14:45:22.000Z (over 11 years ago)
- Last Synced: 2024-10-12T01:09:36.236Z (27 days ago)
- Topics: hacktoberfest
- Language: PHP
- Size: 144 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Interface for the XBMC RPC v4 (Eden)
This is a library, which handles the connection to the json-rpc interface of xbmc. Therefore nearly all datatypes of the interface are mapped to php classes. That way, you have a consistent way of interacting with xbmc.
The interface allows to fetch only certain attributes, when - for example - a movie should be fetched. However, this library will always provide you with the full data set.
## Installation
Installation is prefered by composer. This is what you need in your composer.json:
"require" : {
"najidev/xbmc-rpc" : "*"
}## Basic Usage
First, the XbmcConnector will be initialized. All other Services depend only on the connector:
// initialize connector and two services
$connector = new XbmcConnector($host, $port, $username, $password);
$videoLibrary = new VideoLibrary($connector)
$system = new System($connector);// print name of all movies
$movies = $videoLibrary->getMovies();
foreach ($movies as $movie)
echo $movie->getTitle() . "\n";// suspend xbmc host
$system->suspend();