getAlbumContents()

Pixelsilk API function to get the list of files inside an album--requires the access-libraries permission
Parameters:
type: the type of the album
albumName: the name of the album

Output:
The function getAlbumContents returns a list file objects for the album

C# Example:
string type = "albumType";
string albumName = "albumName";
IList<object> files = GetAlbumContents(type, albumName);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/getAlbumContents HTTP/1.1
HOST: www.example.com
Content-Length: 134
Content-Type: application/x-www-form-urlencoded
Cookie: auth=BCB83F6CF1E3...0206409D3C7D

Request Data:
Unencoded Data:
json={
   "type":"binary",
   "albumName":"FileAlbum1"
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json=%7b%0d%0a+++...%22%0d%0a%7d&token=7AdbNHZQBtwc...TEK8UvSUQ%3d

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=3A29A4C0D0D1...ADE11C6EF26; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 506

Response Data:
[{"filename":"20meg.bin","info":"20.00 MB",
"icon":"/www.example.com/Admin/Images/fticon-unknown.gif"},
{"filename":"navigation.js","info":"9.71 KB",
"icon":"/www.example.com/Admin/Images/fticon-unknown.gif"}]

JavaScript Example:
Method Call:
pixelsilk2.getAlbumContents(input, callback);

Input Object:
{
    type:"Image",
    albumName:"ImageAlbum2"
}

Returned Data:
[
    {
        "filename":"Galaxy.jpg",
        "info":"175px X 192px",
        "icon":null,
        "groupName":null,
        "availableTo":null
    },
    {
        "filename":"Sunset.jpg",
        "info":"82px X 110px",
        "icon":null,
        "groupName":null,
        "availableTo":null
    },
    {
        "filename":"Sunset2.jpg",
        "info":"110px X 82px",
        "icon":null,
        "groupName":null,
        "availableTo":null
    },
    {
        "filename":"Infinity.jpg",
        "info":"192px X 186px",
        "icon":null,
        "groupName":null,
        "availableTo":null
    }
]

Back to Files »