PHP Class Synology_FileStation_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
download ( string $path, string $mode = 'open' ) : array Download a file
getInfo ( ) Return Information about VideoStation - is_manager - version - version_string
getList ( string $path = '/home', number $limit = 25, number $offset, string $sortby = 'name', string $sortdirection = 'asc', string $pattern = '', string $filetype = 'all', boolean $additional = false ) : array Get a list of files/directories in a given path
getObjectInfo ( string $type, strng $id ) : array Get info about an object
getShares ( string $onlywritable = false, number $limit = 25, number $offset, string $sortby = 'name', string $sortdirection = 'asc', boolean $additional = false ) : array Get Available Shares
search ( string $pattern, string $path = '/home', number $limit = 25, number $offset, string $sortby = 'name', string $sortdirection = 'asc', string $filetype = 'all', boolean $additional = false ) : array Search for files/directories in a given path

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

download() public method

Download a file
public download ( string $path, string $mode = 'open' ) : array
$path string (comma separated)
$mode string
return array

getInfo() public method

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

getList() public method

Get a list of files/directories in a given path
public getList ( string $path = '/home', number $limit = 25, number $offset, string $sortby = 'name', string $sortdirection = 'asc', string $pattern = '', string $filetype = 'all', boolean $additional = false ) : array
$path string like '/home'
$limit number
$offset number
$sortby string (name|size|user|group|mtime|atime|ctime|crtime|posix|type)
$sortdirection string
$pattern string
$filetype string (all|file|dir)
$additional boolean
return array

getObjectInfo() public method

Get info about an object
public getObjectInfo ( string $type, strng $id ) : array
$type string (List|Sharing)
$id strng
return array

getShares() public method

Get Available Shares
public getShares ( string $onlywritable = false, number $limit = 25, number $offset, string $sortby = 'name', string $sortdirection = 'asc', boolean $additional = false ) : array
$onlywritable string
$limit number
$offset number
$sortby string
$sortdirection string
$additional boolean
return array