Brandfolder PHP SDK

Deprecated

Table of Contents

src/Brandfolder.php
src/BrandfolderClient.php

Brandfolder.php

Line Element Reason
16 Brandfolder

Use BrandfolderClient instead. The Brandfolder class name is retained here for backward compatibility, but may be reallocated in a future release.

BrandfolderClient.php

Line Element Reason
159 BrandfolderClient::getOrganizations()

Use listOrganizations() instead.

291 BrandfolderClient::getBrandfolders()

Use listBrandfolders() or listAllBrandfolderNames() instead.

465 BrandfolderClient::getCollectionsForUser()

Use listCollectionsForUser() instead.

577 BrandfolderClient::getCollectionsInBrandfolder()

Use listCollectionsInBrandfolder() or listAllCollectionNamesInBrandfolder() instead.

1140 BrandfolderClient::listAssetsInOrganization()

If you need to fetch all assets within an Organization you should instead do the following: list all Brandfolders (along with the linked Organization for each); iteratively list Assets for each of those Brandfolders that belong to the target Organization (see code example below).


 $bf = new BrandfolderClient($api_key);

 $all_org_assets = [];
 $all_brandfolders = $bf->listBrandfolders(['include' => 'organization']);
 foreach ($all_brandfolders->data as $brandfolder) {
   if (!empty($brandfolder->organizations)) {
     $organization = reset($brandfolder->organizations);
     if ($organization->id == $my_org_id) {
       $assets = $bf->listAssetsInBrandfolder($brandfolder->id);
       if ($assets) {
         $all_org_assets = array_merge($all_org_assets, $assets->data);
       }
     }
   }
 }

1767 BrandfolderClient::listAttachmentsForOrganization()

If you need to fetch Attachments across an entire Org, you can: (1) list all Brandfolders (include=organization), then (2) list all Sections within each of those Brandfolders that belongs to the relevant Org, then (3) list all Attachments within each of those Sections.

2981 BrandfolderClient::getTags()

This is provided mainly for backward compatibility. Consider using other Tag listing methods.

Search results