PHP Class seregazhuk\PinterestBot\Api\Providers\Auth

Inheritance: extends Provider
Show file Open project: seregazhuk/php-pinterest-bot Class Usage Examples

Protected Properties

Property Type Description
$loginRequiredFor array

Public Methods

Method Description
confirmEmail ( string $link ) : array | boolean
isLoggedIn ( ) : boolean
login ( string $username, string $password, boolean $autoLogin = true ) : boolean Login as pinner.
logout ( )
register ( string $email, string $password, string $name, string $country = 'GB', integer $age = 18 ) : boolean Register a new user.
registerBusiness ( string $email, string $password, string $businessName, string $website = '' ) : boolean | mixed Register a new business account.
visitMainPage ( )

Protected Methods

Method Description
checkCredentials ( string $username, string $password ) Validates password and login.
completeRegistration ( ) : boolean
getProfile ( ) : array
makeRegisterCall ( array $data ) : boolean | mixed
processAutoLogin ( string $username ) : boolean
processLogin ( string $username, string $password ) : boolean
sendEmailVerificationRequest ( ) : boolean | Response
sendRegisterActionRequest ( array $actions = [] ) : boolean | Response
sendRegisterActions ( ) : boolean

Method Details

checkCredentials() protected method

Validates password and login.
protected checkCredentials ( string $username, string $password )
$username string
$password string

completeRegistration() protected method

protected completeRegistration ( ) : boolean
return boolean

confirmEmail() public method

public confirmEmail ( string $link ) : array | boolean
$link string
return array | boolean

getProfile() protected method

protected getProfile ( ) : array
return array

isLoggedIn() public method

public isLoggedIn ( ) : boolean
return boolean

login() public method

Login as pinner.
public login ( string $username, string $password, boolean $autoLogin = true ) : boolean
$username string
$password string
$autoLogin boolean
return boolean

logout() public method

public logout ( )

makeRegisterCall() protected method

protected makeRegisterCall ( array $data ) : boolean | mixed
$data array
return boolean | mixed

processAutoLogin() protected method

protected processAutoLogin ( string $username ) : boolean
$username string
return boolean

processLogin() protected method

protected processLogin ( string $username, string $password ) : boolean
$username string
$password string
return boolean

register() public method

Register a new user.
public register ( string $email, string $password, string $name, string $country = 'GB', integer $age = 18 ) : boolean
$email string
$password string
$name string
$country string
$age integer
return boolean

registerBusiness() public method

Register a new business account.
public registerBusiness ( string $email, string $password, string $businessName, string $website = '' ) : boolean | mixed
$email string
$password string
$businessName string
$website string
return boolean | mixed

sendEmailVerificationRequest() protected method

protected sendEmailVerificationRequest ( ) : boolean | Response
return boolean | seregazhuk\PinterestBot\Api\Response

sendRegisterActionRequest() protected method

protected sendRegisterActionRequest ( array $actions = [] ) : boolean | Response
$actions array
return boolean | seregazhuk\PinterestBot\Api\Response

sendRegisterActions() protected method

protected sendRegisterActions ( ) : boolean
return boolean

visitMainPage() public method

public visitMainPage ( )

Property Details

$loginRequiredFor protected property

protected array $loginRequiredFor
return array