PHP code example of eyeem / php-wrapper

1. Go to this page and download the library: Download eyeem/php-wrapper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

eyeem / php-wrapper example snippets




$eyeem = new Eyeem();
$eyeem->setClientId('CLIENT_ID');
$eyeem->setClientSecret('CLIENT_SECRET');
echo $photo->caption;
echo $photo->getCaption();
$array = $photo->toArray();
foreach ($photo->getLikers() as $user) { echo $user->getFullname(); }
echo $user->fullname;
echo $user->getFullname();
foreach ($user->getFriends() as $friend) { echo $friend->getFullname(); }
foreach ($eyeem->searchUsers('ramz') as $user) { echo $user->getFullname(); }
$authUser->update(array('fullname' => 'Santa Klaus'));
foreach ($album->getPhotos() as $photo) { echo $photo->getCaption(); }
foreach ($eyeem->searchAlbums('berlin') as $album) { echo $album->getName(); }

$filename = $eyeem->uploadPhoto('/home/me/a-nice-photo.jpg');
$photo = $eyeem->postPhoto(array('filename' => $filename, 'caption' => 'A nice photo.'));