Public Member Functions |
| | __construct ($api_key, $auth_token= '', $debug=false) |
| | makeRequest ($method, $params=array()) |
| | getTicket ($params=array()) |
| | getAuthToken ($ticket, $username, $password) |
| | getfiletree ($path, $params=array()) |
| | buildtree ($sax, &$tree) |
| | getAccountTree ($params=array()) |
| | CreateFolder ($new_folder_name, $params=array()) |
| | UploadFile ($params=array()) |
| | RenameFile ($fileid, $newname) |
| | RegisterUser ($params=array()) |
| | AddTag ($tag, $id, $target_type, $params=array()) |
| | PublicShare ($message, $emails, $id, $target_type, $password, $params=array()) |
| | GetFriends ($params=array()) |
| | Logout ($params=array()) |
| | _checkForError ($data) |
| | isError () |
| | setError ($code=0, $msg) |
| | getErrorMsg () |
| | getErrorCode () |
| | _clearErrors () |
Data Fields |
| | $auth_token = '' |
Detailed Description
Definition at line 35 of file boxlib.php.
Constructor & Destructor Documentation
| __construct |
( |
$ |
api_key, |
|
|
$ |
auth_token = '', |
|
|
$ |
debug = false |
|
) |
| |
- Parameters:
-
| string | $api_key | |
| string | $auth_token | |
| bool | $debug | |
Definition at line 51 of file boxlib.php.
Member Function Documentation
- Parameters:
-
- Returns:
- bool
Definition at line 596 of file boxlib.php.
| AddTag |
( |
$ |
tag, |
|
|
$ |
id, |
|
|
$ |
target_type, |
|
|
$ |
params = array() |
|
) |
| |
- Parameters:
-
| array | $sax | |
| array | $tree | Passed by reference |
Definition at line 195 of file boxlib.php.
- Parameters:
-
| string | $new_folder_name | |
| array | $params | |
- Returns:
- bool|array Array or false
Definition at line 285 of file boxlib.php.
- Parameters:
-
- Returns:
- bool|array Array or false
Definition at line 234 of file boxlib.php.
$options['username'] and $options['password'] must be given, we will use them to obtain a valid auth_token To get a token, you should use following code:
$box = new boxclient('dmls97d8j3i9tn7av8y71m9eb55vrtj4'); Get a ticket $t = $box->getTicket(); $box->getAuthToken($t['ticket'], array( 'username'=>'dongsheng@moodle.com', 'password'=>'xxx'));
- Parameters:
-
| string | $ticket | |
| string | $username | |
| string | $password | |
- Returns:
- mixed
Definition at line 133 of file boxlib.php.
- Parameters:
-
| string | $path | Unused |
| array | $params | |
- Returns:
- array
Definition at line 168 of file boxlib.php.
- Parameters:
-
- Returns:
- array
Definition at line 93 of file boxlib.php.
Setup for Functions
- Parameters:
-
| string | $method | |
| array | $params | |
- Returns:
- array
Definition at line 67 of file boxlib.php.
| PublicShare |
( |
$ |
message, |
|
|
$ |
emails, |
|
|
$ |
id, |
|
|
$ |
target_type, |
|
|
$ |
password, |
|
|
$ |
params = array() |
|
) |
| |
Register New User
- Parameters:
-
- Returns:
- array|bool Outcome Array or false
Definition at line 418 of file boxlib.php.
- Parameters:
-
| string | $fileid | |
| string | $newname | |
- Returns:
- bool
Definition at line 388 of file boxlib.php.
Upload a File
- Parameters:
-
| array | $params | the file MUST be present in key 'file' and be a moodle stored_file object. |
- Returns:
- array|bool Array or false
Definition at line 341 of file boxlib.php.
Field Documentation
The documentation for this class was generated from the following file: