Example #1
0
 /**
  * Get the list of comments for a given content.
  *
  * @param array $args
  * @param \Vinelab\Minion\Dictionary $data
  *
  * @return void
  */
 public function get($args, Dictionary $data)
 {
     TokenAuth::loginWithToken($data->access_token);
     $content = Content::make($data);
     return Api::content(['CommentMapper', 'mapFromCache'], $this->comments->get($content, Pagination::make($data)), $this->comments->totalForContent($content));
 }
Example #2
0
 /**
  * Get the range values (start, stop) out of the given pagination instance.
  *
  * @param  \Fahita\RealTime\Pagination $pagination
  *
  * @return \Fahita\Caching\Range
  */
 public function getPaginationRange(Pagination $pagination)
 {
     return $this->getRange($pagination->limit(), $pagination->offset());
 }