Skip to content

Commit 74ceec2

Browse files
author
Jérôme Poskin
committed
Merge pull request #12 from fbourigault/feature-fetch-banner
Add fetchBanner method to retrieve banner raw data
2 parents ad74fa8 + 2309f12 commit 74ceec2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Moinax/TvDb/Client.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,19 @@ public function getUpdates($previousTime)
314314
}
315315

316316

317+
/**
318+
* Fetch banner raw jpeg data from banner mirror.
319+
*
320+
* @param string $banner the banner to fetch like graphical/79349-g7.jpg
321+
* @return string raw jpeg data
322+
*/
323+
public function fetchBanner($banner)
324+
{
325+
$url = $this->getMirror(self::MIRROR_TYPE_BANNER) . '/banners/' . $banner;
326+
return $this->httpClient->fetch($url, array(), self::GET);
327+
}
328+
329+
317330
/**
318331
* Fetches data via curl and returns result
319332
*

0 commit comments

Comments
 (0)