Completed
Push — master ( f63129...3a8a63 )
by Sergey
03:49
created

User::profile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace seregazhuk\PinterestBot\Api\Providers;
4
5
use seregazhuk\PinterestBot\Helpers\UrlHelper;
6
7
class User extends Provider {
8
9
    protected $loginRequired = ['profile'];
10
    
11
    /**
12
     * Update user profile info. Gets associative array as
13
     * a params. Available keys of array are: 
14
     * 'last_name', 'first_name', 'username', 'about', 'location' and 'website_url'.
15
     *
16
     * @param array $userInfo
17
     */ 
18
    public function profile($userInfo)
19
    {
20
        return $this->callPostRequest(
21
            $userInfo, UrlHelper::RESOURCE_UPDATE_USER_SETTINGS
22
        );
23
    }
24
25
}
26