PHP Class Synology_DownloadStation_Api

Inheritance: extends Synology_Api_Authenticate
Show file Open project: zzarbi/synology

Public Methods

Method Description
__construct ( string $address, integer $port = null, string $protocol = null, integer $version = 1, boolean $verifySSL = false ) Info API setup
addTask ( string $uri, unknown $file = null, string $login = null, string $password = null, string $zipPassword = null ) : Ambigous Add a new Task
cleanSearch ( ustring $taskId ) : stdClass Stops and destroys a search task
deleteTask ( string | array $taskId, boolean $forceComplete = false ) : Ambigous Delete a task
getCategory ( ) : stdClass Gets available categories from BTSearch
getConfig ( ) : stdClass Get Limitation settings
getInfo ( ) Return Information about DownloadStation - is_manager - version - version_string
getModule ( ) : stdClass Gets the installed modules (torrent providers) from BTSearch
getRssFeedList ( ustring | array $rssId = 'ALL', $offset, $limit ) : stdClass Refresh all RSS
getRssList ( integer $offset, integer $limit ) : stdClass Get a list of RSS "feeds"
getScheduleConfig ( ) : stdClass Get Schedule settings
getSearchList ( ustring $taskId, integer $offset, integer $limit, string $sortBy = 'title', string $sortDirection = 'desc', string $filterCategory = '', string $filterTitle = '' ) : stdClass Get list of the given search task
getStatistics ( ) : array Get Statistics
getTaskInfo ( string | array $taskId, array $additional = null ) : boolean Get more info about a task
getTaskList ( integer $offset, integer $limit, array $additional = null ) : boolean Get a list of Task
pauseTask ( ustring | array $taskId ) : Ambigous Pause a task
refreshRss ( ustring | array $rssId = 'ALL' ) : stdClass Refresh all RSS
resumeTask ( ustring | array $taskId ) : Ambigous Resume a task
setConfig ( $params ) : boolean Set Limitation settings
setScheduleConfig ( $params ) : boolean Set Limitation settings
startSearchTask ( ustring $keyword, string $module = 'enabled' ) : stdClass Starts a new search task

Method Details

__construct() public method

Info API setup
public __construct ( string $address, integer $port = null, string $protocol = null, integer $version = 1, boolean $verifySSL = false )
$address string
$port integer
$protocol string
$version integer
$verifySSL boolean

addTask() public method

Add a new Task
public addTask ( string $uri, unknown $file = null, string $login = null, string $password = null, string $zipPassword = null ) : Ambigous
$uri string
$file unknown
$login string
$password string
$zipPassword string
return Ambigous

cleanSearch() public method

Stops and destroys a search task
public cleanSearch ( ustring $taskId ) : stdClass
$taskId ustring
return stdClass

deleteTask() public method

Delete a task
public deleteTask ( string | array $taskId, boolean $forceComplete = false ) : Ambigous
$taskId string | array
$forceComplete boolean
return Ambigous

getCategory() public method

Gets available categories from BTSearch
public getCategory ( ) : stdClass
return stdClass

getConfig() public method

Get Limitation settings
public getConfig ( ) : stdClass
return stdClass

getInfo() public method

Return Information about DownloadStation - is_manager - version - version_string
public getInfo ( )

getModule() public method

Gets the installed modules (torrent providers) from BTSearch
public getModule ( ) : stdClass
return stdClass

getRssFeedList() public method

Refresh all RSS
public getRssFeedList ( ustring | array $rssId = 'ALL', $offset, $limit ) : stdClass
$rssId ustring | array
return stdClass

getRssList() public method

Get a list of RSS "feeds"
public getRssList ( integer $offset, integer $limit ) : stdClass
$offset integer
$limit integer
return stdClass

getScheduleConfig() public method

Get Schedule settings
public getScheduleConfig ( ) : stdClass
return stdClass

getSearchList() public method

Get list of the given search task
public getSearchList ( ustring $taskId, integer $offset, integer $limit, string $sortBy = 'title', string $sortDirection = 'desc', string $filterCategory = '', string $filterTitle = '' ) : stdClass
$taskId ustring
$offset integer Beginning task on the requested record
$limit integer Number of records requested
$sortBy string Possible value is title, size, date, peers, providers, seeds or leech
$sortDirection string Possible value is desc or asc
$filterCategory string Filter the records by the category using Category ID returned by getCategory function
$filterTitle string Filter the records by the title using this parameter
return stdClass

getStatistics() public method

Get Statistics
public getStatistics ( ) : array
return array

getTaskInfo() public method

Get more info about a task
public getTaskInfo ( string | array $taskId, array $additional = null ) : boolean
$taskId string | array (one ID or a list of ID)
$additional array (detail,transfer,file,tracker,peer)
return boolean

getTaskList() public method

Get a list of Task
public getTaskList ( integer $offset, integer $limit, array $additional = null ) : boolean
$offset integer
$limit integer
$additional array (detail,transfer,file,tracker,peer)
return boolean

pauseTask() public method

Pause a task
public pauseTask ( ustring | array $taskId ) : Ambigous
$taskId ustring | array
return Ambigous

refreshRss() public method

Refresh all RSS
public refreshRss ( ustring | array $rssId = 'ALL' ) : stdClass
$rssId ustring | array
return stdClass

resumeTask() public method

Resume a task
public resumeTask ( ustring | array $taskId ) : Ambigous
$taskId ustring | array
return Ambigous

setConfig() public method

Set Limitation settings
public setConfig ( $params ) : boolean
return boolean

setScheduleConfig() public method

Set Limitation settings
public setScheduleConfig ( $params ) : boolean
return boolean

startSearchTask() public method

Starts a new search task
public startSearchTask ( ustring $keyword, string $module = 'enabled' ) : stdClass
$keyword ustring The search keyword
$module string Module name concatenated by ',' or use 'all' or 'enabled'
return stdClass