Skip to content

Commit

Permalink
added an example for working with files.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamagokun committed Dec 22, 2015
1 parent 8afdefd commit 1608ee4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions examples/files.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

require dirname(__DIR__).'/vendor/autoload.php';

$client = new \FridgeApi\Client("", "");

// retrieve an existing file
$path = 'Koen-AtorSledding.jpg';
$file = $client->file($path);
// echo $file;

// upload a file
$test = fopen('/path/to/file', 'r');
$result = $client->upload($test);
// print_r($result);

0 comments on commit 1608ee4

Please sign in to comment.