« Back to slideshowpro.net
SlideShowPro Help Wiki
Recent changes / Search

SlideShowPro for Flash

SlideShowPro for Lightroom

SlideShowPro Director

SlideShowPro Director Hosting

Extras

Screencasts

Page last modified by bdaily on September 02, 2008, at 12:09 PM

The Album methods allow you to access albums and content in Director by querying all albums or a single album.

all(only_published = true, only_active = true, list_only = false)

Return a list of all albums. Optional only_published parameter allows you to specify if you want to return only published albums or all albums. only_published defaults to true. Optional only_active parameter allows you to specify if you want to return active content or all content. only_active defaults to true. Optional list_only (added in version 1.0.1 of the DirectorPHP class) parameter allows you to only return the list of albums (with no associated content).

<?php

   include('classes/DirectorPHP.php');
   $director = new Director('your-api-key', 'your-api-path');

   $albums = $director->album->all();

   foreach($albums as $album) {
      echo $album->name . '<br />';
   }

?>

get(album_id, only_active = true)

Returns a single album along with its content. Optional only_active parameter allows you to specify if you want to return active content or all content. only_active defaults to true.

<?php

   include('classes/DirectorPHP.php');
   $director = new Director('your-api-key', 'your-api-path');

   $album = $director->album->get(1);
   echo $album->name;

?>

galleries(album_id)

Retrieves the galleries that the provided album is a part of. Only gallery data is returned, no associated albums or their content are returned.

<?php

   include('classes/DirectorPHP.php');
   $director = new Director('your-api-key', 'your-api-path');

   $galleries = $director->album->galleries(1);
   echo count($galleries);

?>

© 2008 Dominey Design Inc. All Rights Reserved.
About | Contact | Privacy policy | License agreements