-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from Schmidt-DevOps/develop
Will be v2.0
- Loading branch information
Showing
39 changed files
with
376 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
ALLOW_LIVE_DATA_MANIPULATION_ON_TEST_SERVER=0 | ||
TEST_SERVER="https://not-set.example.com" | ||
TEST_SERVER_AUTHORIZATION_TOKEN="not_set" | ||
TEST_LIB_ID="not_set" | ||
TEST_LIB_PASSWORD="not_set" | ||
TEST_LIB_UNENCRYPTED_ID="not_set" | ||
TEST_LIB_ENCRYPTED_ID="not_set" | ||
TEST_LIB_ENCRYPTED_PASSWORD="not_set" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ language: php | |
php: | ||
# using major version aliases | ||
|
||
- 7.2 | ||
- 7.3 | ||
- 7.4 | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,7 @@ Get in touch now: https://sdo.sh/DevOps/#contact | |
|
||
## How to get Started | ||
|
||
To get started with Seafile PHP SDK, you may either set up your own private Seafile server (see [https://www.seafile.com/en/product/private_server/](https://www.seafile.com/en/product/private_server/)) or obtain seacloud.cc account | ||
[https://seacloud.cc](https://seacloud.cc). Because the SDK is in its infancy it's highly recommended to set up a test server or create a test account. | ||
To get started with Seafile PHP SDK, you may either set up your own private Seafile server (see [https://www.seafile.com/en/product/private_server/](https://www.seafile.com/en/product/private_server/)) or obtain a cloud account. Because the SDK is in its infancy it's highly recommended to set up a test server or create a test account. | ||
|
||
It's not advisable yet to use your real server/account if you already got one. | ||
|
||
|
@@ -80,7 +79,7 @@ First, you need to include the API token (see above): | |
```php | ||
$client = new Client( | ||
[ | ||
'base_uri' => 'https://your.seafile-server.com', | ||
'base_uri' => 'https://your-seafile-server.example.com', | ||
'debug' => false, | ||
'headers' => [ | ||
'Authorization' => 'Token ' . $token | ||
|
@@ -157,14 +156,14 @@ $success = $libraryResource->decrypt($libId, ['query' => ['password' => $passwor | |
$fileToUpload = '/path/to/file/to/be/uploaded.zip'; | ||
$dir = '/'; // directory in the library to save the file in | ||
$response = $fileResource->upload($lib, $fileToUpload, $dir); | ||
$uploadedFileId = json_decode((string)$response->getBody()); | ||
$uploadedFileId = (string)$response->getBody(); | ||
``` | ||
|
||
### Update file | ||
|
||
```php | ||
$response = $fileResource->update($lib, $newFilename, '/'); | ||
$updatedFileId = json_decode((string)$response->getBody()); | ||
$updatedFileId = (string)$response->getBody(); | ||
``` | ||
|
||
### Get file details | ||
|
@@ -329,7 +328,7 @@ $stack->push( | |
|
||
$client = new Client( | ||
[ | ||
'base_uri' => 'https://your.seafile-server.com', | ||
'base_uri' => 'https://your-seafile-server.example.com', | ||
'debug' => true, | ||
'handler' => $stack, | ||
'headers' => [ | ||
|
@@ -341,19 +340,19 @@ $client = new Client( | |
|
||
## Issues | ||
|
||
- Please let me know of issues. | ||
- `File::upload()`: Parameter `$newFilename` actually does not set a new file name when uploading a file (thanks to https://github.com/FlorientR) | ||
|
||
## Dependencies | ||
|
||
- PHP >=7.0 64 bits | ||
- PHP >=7.3 64 bits | ||
- Guzzle 6 | ||
|
||
## Seafile Web API Support Matrix | ||
|
||
| Resource | Web API Version | Support grade | | ||
| ---------------------- | --------------- | ------------- | | ||
| Account | v2 | ★★★☆ | | ||
| Avatar | v2 | ★★★★ | | ||
| Avatar | v2.1 | ★★★★ | | ||
| Events | v2 | Yet to be done, [contact me](mailto:[email protected]) | | ||
| File Share Link | v2.1 | ★★★☆ | | ||
| Group | v2 | ★☆☆☆ | | ||
|
@@ -372,7 +371,7 @@ Tested with: | |
- ~~Seafile Server 5.1.3 for generic Linux/Debian Wheezy~~ | ||
- ~~Seafile Server 5.1.4 for generic Linux/Ubuntu Xenial~~ | ||
- ~~Seafile Server 6.0.3 for generic Linux/Ubuntu Xenial~~ | ||
- Seafile Server 6.3.4 for generic Linux/Ubuntu Xenial | ||
- Seafile Server 7.1.4 for Ubuntu 20.04 LTS | ||
|
||
## Contributing | ||
|
||
|
@@ -401,4 +400,4 @@ There are two types of tests: | |
|
||
## License | ||
|
||
[MIT](https://raw.githubusercontent.com/rene-s/seafile-php-sdk/master/LICENSE) © 2015-2017 Rene Schmidt DevOps UG (haftungsbeschränkt) & Co. KG | ||
[MIT](https://raw.githubusercontent.com/rene-s/seafile-php-sdk/master/LICENSE) © 2015-2020 Rene Schmidt DevOps UG (haftungsbeschränkt) & Co. KG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.