Ejemplo n.º 1
0
 /**
  * Adds a new task with <b>$description</b> to the story identified by the
  * given <b>$storyId</b>.
  *
  * @param integer $storyId
  * @param string $description
  * @return \SimpleXMLElement
  */
 public function addTask($storyId, $description)
 {
     return simplexml_load_string($this->client->post("/projects/{$this->project}/stories/{$storyId}/tasks", json_encode(array('description' => $description))));
 }
Ejemplo n.º 2
0
 /**
  * Returns the authentication token for the given username and password.
  *
  * @param string $username
  * @param string $password
  * @return string
  */
 public function getToken($username, $password)
 {
     return (string) simplexml_load_string($this->client->post('/tokens/active', http_build_query(array('username' => $username, 'password' => $password))))->guid;
 }