Completed
Pull Request — master (#197)
by Sergey
02:32
created

News::last()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace seregazhuk\PinterestBot\Api\Providers;
4
5
use seregazhuk\PinterestBot\Api\Traits\HasFeed;
6
use seregazhuk\PinterestBot\Helpers\UrlBuilder;
7
8
class News extends Provider
9
{
10
    use HasFeed;
11
12
    /**
13
     * @var array
14
     */
15
    protected $loginRequiredFor = [
16
        'last',
17
        'all',
18
    ];
19
20
    /**
21
     * @param int $limit
22
     * @return mixed
23
     */
24
    public function all($limit = 0)
25
    {
26
        $data = ['allow_stale' => true];
27
28
        return $this->getFeed($data, UrlBuilder::RESOURCE_GET_LATEST_NEWS, $limit);
29
    }
30
}
31