readyshare / sdk
Official PHP SDK for the ReadyShare Secure Partitioned Cloud Storage Network
dev-main
2026-05-27 03:58 UTC
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
This package is auto-updated.
Last update: 2026-05-27 04:04:11 UTC
README
Official PHP client library for the ReadyShare secure, partitioned cloud storage network.
Installation
Install using Composer:
composer require readyshare/sdk
Quick Start
<?php require 'vendor/autoload.php'; use ReadyShare\ReadyShare; // Initialize ReadyShare Client $rs = new ReadyShare([ 'apiKey' => 'your_api_key_here', 'baseUrl' => 'https://api.readyshare.app/v1', 'timeout' => 30 // Timeout in seconds ]); try { // Validate credentials $authRes = $rs->validateAuth(); print_r($authRes); // Upload file with live upload progress callback $uploadRes = $rs->uploadFile( 'path/to/local/file.txt', 'root', function($uploaded, $total) { echo "Uploaded $uploaded of $total bytes.\n"; } ); print_r($uploadRes); // List folder files $files = $rs->listFiles('root'); print_r($files); // Download file back to your machine $downloadedPath = $rs->downloadFile( 'your_file_id_here', './downloads', function($downloaded, $total) { echo "Downloaded $downloaded of $total bytes.\n"; } ); echo "Downloaded to: $downloadedPath\n"; } catch (\Exception $e) { echo "Error: " . $e->getMessage() . "\n"; }