Example #1
0
 /**
  * 
  * @param string $apiKey  API Token provided by PivotalTracking
  * @param string $project Project ID
  */
 public function __construct($apiKey, $project)
 {
     $this->client = new Rest\Client(self::API_URL);
     $this->client->addHeader('Content-type', 'application/json');
     $this->client->addHeader('X-TrackerToken', $apiKey);
     $this->project = $project;
 }
 /**
  * Authenticates this client against PivotalTracker.
  *
  * @param string $username
  * @param string $password
  * @return void
  */
 public function authenticate($username, $password)
 {
     $this->client->addHeader('X-TrackerToken', $this->getToken($username, $password));
 }