Completed
Push — master ( f77348...ad6f80 )
by Sergey
03:41
created

News   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 4
Bugs 0 Features 1
Metric Value
wmc 1
c 4
b 0
f 1
lcom 1
cbo 4
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A latest() 0 8 1
1
<?php
2
3
namespace seregazhuk\PinterestBot\Api\Providers;
4
5
use seregazhuk\PinterestBot\Api\Request;
6
use seregazhuk\PinterestBot\Helpers\UrlHelper;
7
8
class News extends Provider
9
{
10
    protected $loginRequired = ['latest'];
11
12
    /**
13
     * Get user's latest news array
14
     *
15
     * @return array
16
     */
17
    public function latest()
18
    {
19
        $data = ["options" => ['allow_state' => true]];
20
        $query = Request::createQuery($data);
21
        $response = $this->request->exec(UrlHelper::RESOURCE_GET_LATEST_NEWS."?{$query}");
22
23
        return $this->response->getData($response);
24
    }
25
}
26