PHP Class seregazhuk\PinterestBot\Api\Providers\User

Inheritance: extends Provider, use trait seregazhuk\PinterestBot\Api\Traits\UploadsImages
Show file Open project: seregazhuk/php-pinterest-bot Class Usage Examples

Protected Properties

Property Type Description
$loginRequiredFor array

Public Methods

Method Description
convertToBusiness ( string $businessName, string $websiteUrl = '' ) : boolean Convert your account to a business one.
deactivate ( string $reason = 'other', string $explanation = '' ) : boolean Deactivates your account.
invite ( string $email ) : boolean | Response Send invite to email
isBanned ( ) : boolean Checks if current user is banned
profile ( array $userInfo = [] ) : boolean | array Updates or returns user profile info. Gets associative array as a param. Available keys of array are: 'last_name', 'first_name', 'username', 'about', 'location' and 'website_url'.
username ( ) : string Returns current user username

Method Details

convertToBusiness() public method

Convert your account to a business one.
public convertToBusiness ( string $businessName, string $websiteUrl = '' ) : boolean
$businessName string
$websiteUrl string
return boolean

deactivate() public method

Deactivates your account.
public deactivate ( string $reason = 'other', string $explanation = '' ) : boolean
$reason string
$explanation string
return boolean

invite() public method

Send invite to email
public invite ( string $email ) : boolean | Response
$email string
return boolean | seregazhuk\PinterestBot\Api\Response

isBanned() public method

Checks if current user is banned
public isBanned ( ) : boolean
return boolean

profile() public method

You can also change user avatar by passing 'profile_image'.
public profile ( array $userInfo = [] ) : boolean | array
$userInfo array If empty returns current user profile.
return boolean | array

username() public method

Returns current user username
public username ( ) : string
return string

Property Details

$loginRequiredFor protected property

protected array $loginRequiredFor
return array