Is it possible to add a function to know if access token is set?
public function isAccessToken()
{
return $this->_accessToken ? true : false;
}
Since _accessToken is private, as it has to be, it would be great to know if it's set or not.
I did a script that does what's commented in #7 , basically a function I call to get phpParticle instance, when it returns, just calling isAccesToken() i know if getting token has gone fine or not without calling any _curlRequest function that will dramatically fail. The function takes care of token and its expiration and refreshes using refresh token.
I can make the PR if agree.
Thank you!
Is it possible to add a function to know if access token is set?
Since
_accessTokenis private, as it has to be, it would be great to know if it's set or not.I did a script that does what's commented in #7 , basically a function I call to get
phpParticleinstance, when it returns, just callingisAccesToken()i know if getting token has gone fine or not without calling any_curlRequestfunction that will dramatically fail. The function takes care of token and its expiration and refreshes using refresh token.I can make the PR if agree.
Thank you!