seregazhuk\PinterestBot\Api\Providers\News::all PHP Method

all() public method

public all ( integer $limit = Pagination::DEFAULT_LIMIT ) : mixed
$limit integer
return mixed
    public function all($limit = Pagination::DEFAULT_LIMIT)
    {
        $data = ['allow_stale' => true];
        return $this->getFeed($data, UrlBuilder::RESOURCE_GET_LATEST_NEWS, $limit);
    }

Usage Example

 /** @test */
 public function it_returns_all_news()
 {
     $this->apiShouldReturnPagination()->apiShouldReturnEmpty();
     $news = $this->provider->all();
     $this->assertIsPaginatedResponse($news);
 }
News