2017 © Pedro Peláez
 

library storj-php

Implementation of the Storj protocol for PHP

image

webweave/storj-php

Implementation of the Storj protocol for PHP

  • Sunday, October 1, 2017
  • by WebWeave
  • Repository
  • 8 Watchers
  • 12 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Storj PHP Package | In heavy development

Implementation of the Storj protocol for PHP, (*1)

WARNING

This piece of software is provided without warranty of any kind, use it at your own risk., (*2)

TODO AND DONE

  • [x] Create users
  • [x] Basic authentication
  • [x] Generate ecdsa and add them
  • [x] List and delete ecdsa keys
  • [x] List and create buckets
  • [ ] Ecdsa authentication
  • [ ] File upload
  • [ ] File download

REQUIREMENTS

php 5.6.0 or newer., (*3)

php-gmp needs to be installed., (*4)

USAGE

Installation, (*5)

Best way is to use composer, (*6)

  //since its still in development add it to your composer.json
  "require": {
    "webweave/storj-php": "dev-master"
  }

Basic Code examples, (*7)

Create a new user, (*8)

<?php

use WebWeave\StorjPHP\BridgeClient;

// Create client for interacting with API
$client = new BridgeClient('https://api.storj.io');
// Create user
$client->createUser($email, $password);

Add a new ecdsa public key to a account, (*9)

<?php

use WebWeave\StorjPHP\BridgeClient;
use WebWeave\StorjPHP\KeyPair;

// Create client for interacting with API
$client = new BridgeClient('https://api.storj.io');
// Login
$client->setBasicAuth($email, $password);

// Generate a new keypair
$keyPair = new KeyPair();

// Add it to the account
$client->addPublicKey($keyPair->getPublicKey());

Add a new bucket, and list all buckets, (*10)

<?php

use WebWeave\StorjPHP\BridgeClient;

// Create client for interacting with API
$client = new BridgeClient('https://api.storj.io');
// Login
$client->setBasicAuth($email, $password);

//BucketInfo
$bucketInfo = array('name' => 'bucket_name');

// Add a new bucket
$client->createBucket($bucketInfo);

// Get all buckets
$buckets = $client->getBuckets();

//List all buckets
foreach($buckets as $bucket) {
    echo $bucket->name . PHP_EOL;
    echo $bucket->status . PHP_EOL;
}

The Versions

01/10 2017

dev-master

9999999-dev

Implementation of the Storj protocol for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sander de Jonge

blockchain file storage storj

01/10 2017

dev-contribution

dev-contribution

Implementation of the Storj protocol for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sander de Jonge

blockchain file storage storj