theod02 / p-cloud-api
There is no license information available for the latest version (dev-master) of this package.
pCloud package for call API
dev-master
2022-09-26 22:26 UTC
Requires
- php: ^8.1
- ext-curl: *
- doctrine/collections: ^1.6
- guzzlehttp/guzzle: ^7.4
- symfony/dotenv: ^5.4|^6.0
- symfony/http-client: ^5.0|^6.0
Requires (Dev)
- phpunit/phpunit: ^9.5
- symfony/var-dumper: ^6.0
This package is auto-updated.
Last update: 2024-12-27 03:33:57 UTC
README
$pCloud = new PCloudService('email', 'password');
Upload on or multiple files
# Version 1 $upload = new UploadFileWithFolderIdInput( [ new PCloudFile('/my/folder/location/file.txt') ] ); # Version 2 can used in foreach for example $upload = new UploadFileWithFolderIdInput(folderId: 123456); # OR $upload = new UploadFileWithPathInput(path: '/an/directory/in/cloud'); $upload->addFile( new PCloudFile('/my/folder/location/file.txt')); $res = $p->uploadFile($upload);
Delete file
$p->deleteFile(new DeleteFileWithFileIdInput(123465));
List files
$p->listFolder(new ListFolderWithIdInput(123456));
Most functionality accept both path or folder/file ID
You can use solution you prefer, pCloud recommend use of folder/file ID instead of path. The case of upload is the same for another methods, you just need replace Id/FolderId or FileId by path
For moment is just a first "working" release. not really tested, not implemented on any project for moment. Is not completed yet, you can only list some folder, upload, delete. Documentation is less, but will make better after :) Please use only for personal development for moment. Accept any help ! :)