public function setCredentials($name = null)
    {
        // No name given.
        if (is_null($name)) {
            $name = config('personality-insights.default_credentials');
        }

        // Credentials does not exist.
        if (! config()->has('personality-insights.credentials.'.$name)) {
            throw new InvalidCredentialsName;
        }

        $this->credentials = config('personality-insights.credentials.'.$name);

        return $this;
    }
public function setCredentials($name = null)
    {
        // No name given.
        if (is_null($name)) {
            $name = config('personality-insights.default_credentials');
        }

        // Credentials does not exist.
        if (! config()->has('personality-insights.credentials.'.$name)) {
            throw new InvalidCredentialsName;
        }

        $this->credentials = config('personality-insights.credentials.'.$name);

        return $this;
    }
public function setCredentials ( $ name = null ) { // No name given. if ( is_null ( $ name ) ) { $ name = config ( 'personality-insights.default_credentials' ) ; } // Credentials does not exist. if ( ! config ( ) -> has ( 'personality-insights.credentials.' . $ name ) ) { throw new InvalidCredentialsName ; } $ this -> credentials = config ( 'personality-insights.credentials.' . $ name ) ; return $ this ; }
Sets the Credentials we will use to perform requests.

@param string $name

@throws InvalidCredentialsName

@return $this
Sets the Credentials we will use to perform requests .