Skip to content

Commit 48101db

Browse files
committed
Update exampleAPI.php
1 parent 9f7dfcf commit 48101db

1 file changed

Lines changed: 40 additions & 11 deletions

File tree

exampleAPI.php

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,45 @@
33
include "Keep2ShareAPI.php";
44

55
$api = new Keep2ShareAPI();
6-
$api->username='test_api@k2s.cc';
7-
$api->password='testapik2scc';
8-
9-
//getUploadFormData
10-
var_dump($api->getUploadFormData());
11-
12-
13-
//get File List
14-
$hash=$api->getFilesList();
15-
16-
6+
$api->username='your_account';
7+
$api->password='your_password';
8+
9+
//getFilesList
10+
var_dump($api->getFilesList());
11+
/*
12+
array(3) {
13+
["status"]=>
14+
string(7) "success"
15+
["code"]=>
16+
int(200)
17+
["files"]=>
18+
array(1) {
19+
[0]=>
20+
array(4) {
21+
["id"]=>
22+
string(13) "522f0bf5672f8"
23+
["name"]=>
24+
string(9) "README.md"
25+
["is_available"]=>
26+
bool(true)
27+
["size"]=>
28+
string(4) "2857"
29+
}
30+
}
31+
}
32+
*/
33+
34+
//uploadFile
35+
var_dump($api->uploadFile('file_path'));
36+
/*
37+
object(stdClass)#2 (3) {
38+
["user_file_id"]=>
39+
string(13) "5238354a724c3"
40+
["status"]=>
41+
string(7) "success"
42+
["status_code"]=>
43+
int(200)
44+
}
45+
*/
1746

1847
?>

0 commit comments

Comments
 (0)