Skip to content

Commit

Permalink
added booktype for recommendations (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
rossb220 authored Feb 27, 2017
1 parent 06ee033 commit eca7f17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Entity/Book.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,14 @@ public static function search(Bookboon $bookboon, $query, $limit = 10, $offset =
* Recommendations.
*
* @param Bookboon $bookboon
* @param string $bookType
* @param array $bookIds array of book ids to base recommendations on, can be empty
* @param int $limit
* @return Book[]
*/
public static function recommendations(Bookboon $bookboon, array $bookIds = array(), $limit = 5)
public static function recommendations(Bookboon $bookboon, array $bookIds = array(), $limit = 5, $bookType = 'pdf')
{
$recommendations = $bookboon->rawRequest('/recommendations', array('limit' => $limit, 'book' => $bookIds));
$recommendations = $bookboon->rawRequest('/recommendations', array('limit' => $limit, 'book' => $bookIds, 'bookType' => $bookType));

return Book::getEntitiesFromArray($recommendations);
}
Expand Down

0 comments on commit eca7f17

Please sign in to comment.