Skip to content

Commit

Permalink
Merge pull request #59 from bookboon/hotfix/booksLimit
Browse files Browse the repository at this point in the history
limit for frontpage books
  • Loading branch information
lkm authored Jul 1, 2020
2 parents e5d14c4 + 025b3b5 commit a7b77d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Entity/Frontpage.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Frontpage extends Entity
* @throws UsageException
* @throws \Bookboon\Api\Exception\ApiDecodeException
*/
public static function get(Bookboon $bookboon, array $bookTypes = ['professional']) : BookboonResponse
public static function get(Bookboon $bookboon, array $bookTypes = ['professional'], ?int $limit = null) : BookboonResponse
{
$bResponse = $bookboon->rawRequest('/v1/frontpage', ['bookType' => implode(',', $bookTypes)]);
$bResponse = $bookboon->rawRequest('/v1/frontpage', ['bookType' => implode(',', $bookTypes), 'limit' => $limit]);

$bResponse->setEntityStore(
new EntityStore(self::getEntitiesFromArray($bResponse->getReturnArray()))
Expand All @@ -44,9 +44,9 @@ public static function get(Bookboon $bookboon, array $bookTypes = ['professional
* @throws \Bookboon\Api\Exception\ApiDecodeException
* @throws \Bookboon\Api\Exception\EntityDataException
*/
public static function getBySlug(Bookboon $bookboon, string $slug, array $bookTypes = ['professional']) : BookboonResponse
public static function getBySlug(Bookboon $bookboon, string $slug, array $bookTypes = ['professional'], ?int $limit = null) : BookboonResponse
{
$bResponse = $bookboon->rawRequest("/v1/frontpage/$slug", ['bookType' => join(',', $bookTypes)]);
$bResponse = $bookboon->rawRequest("/v1/frontpage/$slug", ['bookType' => join(',', $bookTypes), 'limit' => $limit]);

$bResponse->setEntityStore(
new EntityStore(
Expand Down

0 comments on commit a7b77d3

Please sign in to comment.