A simple API interface for real-debrid.com.
It allows you to communicate with Real-Debrid API and do things like unrestrict your download links or download some torrent files.
You may install the Real-Debrid API with Composer (recommended) or manually.
Via Composer (preferred method)
$ composer require vgot/real-debrid
Manually
If you don't want/have composer installed on your computer, you can manually download the library by cloning it with git.
$ git clone https://github.com/ValentinGot/real-debrid.git
You need PHP >= 5.6.0.
To retrieve your token, you must authenticate to Real-Debrid and then go to the following URL:
https://real-debrid.com/apitoken
You must have a Real-Debrid premium account to access most of the API features.
This section provides a quick introduction to Real-Debrid API interface and some examples.
use RealDebridRealDebrid;use RealDebridAuthToken;$token = new Token('MY_TOKEN');$realDebrid = new RealDebrid($token);
Here is some examples on how to use the Real-Debrid API.
If you want more information about the available requests, please refer to the Available requests section of the documentation.
// Retrieve user information$userInformation = $realDebrid->user->get();// Unrestrict a link$link = $realDebrid->unrestrict->link('http://MY_LINK');// Add a magnet link and start the torrent$torrent = $realDebrid->torrents->addMagnet('magnet:MY_MAGNET_LINK');$realDebrid->torrents->selectFiles($torrent->id);// Retrieve torrents list$torrentQueue = $realDebrid->torrents->get();
The current version can be seen at valentingot.github.io/real-debrid.
The Real-Debrid API is released under the MIT license.
https://github.com/ValentinGot/real-debrid/blob/master/LICENSE