rossedman / teamwork

Laravel 5 Teamwork PM API Bridge
http://rossedman.github.io/teamwork/
MIT License
45 stars 47 forks source link

Added an authenticate class to get user data using the special teamwork URL #14

Closed ashleyhindle closed 8 years ago

ashleyhindle commented 9 years ago

Added ability to use the special teamwork URL to find out a users details so we can set the users URL automatically if needed:

$client     = new Client(new Guzzle, 'Cheese999Burger', '');
$teamwork   = new Teamwork($client);
$account = $teamwork->authenticate()->authenticate();
if (empty($account)) {
    return 'Bad API Key';
}

print_r($account); //$account['account']['URL'] has the users teamwork URL in it
rossedman commented 8 years ago

@ashleyhindle Awesome! Thanks a lot for doing this!