Skip to content

Commit aabc3e8

Browse files
committed
Add method getSeasonalGalleries
There is a problem with arg theme_id : cannot to be set to 0 (zero) for get all galleries. So script will added it to args if the $theme_id is more than 0
1 parent a15aaea commit aabc3e8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

php/fotolia-api.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,23 @@ public function getGalleries($language_id = Fotolia_Api::LANGUAGE_ID_EN_US)
201201
));
202202
}
203203

204+
/**
205+
* This method returns public seasonal galleries for a defined language
206+
*
207+
* @param int $language_id
208+
* @return array
209+
*/
210+
public function getSeasonalGalleries($language_id = Fotolia_Api::LANGUAGE_ID_EN_US, $thumbnail_size = 110, $theme_id = 0)
211+
{
212+
$args = array(
213+
'language_id' => $language_id
214+
,'thumbnail_size' => $thumbnail_size
215+
);
216+
if ((int)$theme_id > 0) $args['theme_id'] = $theme_id;
217+
218+
return $this->_api('getSeasonalGalleries', $args);
219+
}
220+
204221
/**
205222
* This method returns Fotolia list of countries.
206223
*
@@ -944,6 +961,7 @@ protected function _getNamespace($method)
944961
case 'getCategories2':
945962
case 'getTags':
946963
case 'getGalleries':
964+
case 'getSeasonalGalleries':
947965
case 'getCountries':
948966
return 'search';
949967

0 commit comments

Comments
 (0)