Skip to content

Instantly share code, notes, and snippets.

@loginwashere
Last active September 28, 2015 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loginwashere/94bf2d68c6027fc01b01 to your computer and use it in GitHub Desktop.
Save loginwashere/94bf2d68c6027fc01b01 to your computer and use it in GitHub Desktop.
$ ACCESS_TOKEN=111111 php index.php
array(2) {
'usedBytes' =>
string(8) "82656436"
'availableBytes' =>
string(11) "10654761804"
}
<?php
require './vendor/autoload.php';
use Yandex\Disk\DiskClient;
$accessToken = getenv('ACCESS_TOKEN');
$diskClient = new DiskClient($accessToken);
$diskClient->setServiceScheme(DiskClient::HTTPS_SCHEME);
$result = $diskClient->diskSpaceInfo();
var_dump($result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment