Official PHP SDK for the ReadyShare Secure Partitioned Cloud Storage Network

Maintainers

Package info

github.com/shreyash729/readyshare-php-sdk

pkg:composer/readyshare/sdk

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-05-27 03:58 UTC

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";
}