Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion src/Asana/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,40 @@ class Client
private static $CLIENT_OPTIONS = null;
private static $ALL_OPTIONS = null;

public $dispatcher;
public $options;
public $attachments;
public $auditlogapi;
public $batchapi;
public $customfields;
public $customfieldsettings;
public $events;
public $goalrelationships;
public $goals;
public $jobs;
public $organizationexports;
public $portfolios;
public $projectbriefs;
public $portfoliomemberships;
public $projects;
public $projectmemberships;
public $projectstatuses;
public $projecttemplates;
public $stories;
public $sections;
public $statusupdates;
public $tags;
public $tasks;
public $teammemberships;
public $teams;
public $timeperiods;
public $typeahead;
public $users;
public $usertasklists;
public $webhooks;
public $workspacememberships;
public $workspaces;

public function __construct($dispatcher, $options = array())
{
Client::bootstrap();
Expand Down Expand Up @@ -234,7 +268,7 @@ public function getCollection($path, $query, $options = array())
}
return $this->get($path, $query, $options);
}
throw Exception('Unknown value for "iterator_type" option: ' . (string)$options['iterator_type']);
throw new \Exception('Unknown value for "iterator_type" option: ' . (string)$options['iterator_type']);
}

public function post($path, $data, $options = array())
Expand Down
4 changes: 4 additions & 0 deletions src/Asana/Errors/AsanaError.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

class AsanaError extends \Exception
{
public $message;
public $status;
public $response;

public function __construct($message, $status, $response)
{
$this->message = $message;
Expand Down
2 changes: 2 additions & 0 deletions src/Asana/Errors/RateLimitEnforcedError.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class RateLimitEnforcedError extends RetryableAsanaError
const MESSAGE = 'Rate Limit Enforced';
const STATUS = 429;

public $retryAfter;

public function __construct($response)
{
parent::__construct(self::MESSAGE, self::STATUS, $response);
Expand Down
15 changes: 8 additions & 7 deletions src/Asana/Resources/Gen/SectionsBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Asana\Resources\Gen;

class SectionsBase {
public $client;

/**
* @param Asana/Client client The client instance
Expand All @@ -17,7 +18,7 @@ public function __construct($client)
* @param string $section_gid (required) The globally unique identifier for the section.
* @param array $params
* @param array $options
* @return response
* @return \stdClass response
*/
public function addTaskForSection($section_gid, $params = array(), $options = array()) {
$path = "/sections/{section_gid}/addTask";
Expand All @@ -30,7 +31,7 @@ public function addTaskForSection($section_gid, $params = array(), $options = ar
* @param string $project_gid (required) Globally unique identifier for the project.
* @param array $params
* @param array $options
* @return response
* @return \stdClass response
*/
public function createSectionForProject($project_gid, $params = array(), $options = array()) {
$path = "/projects/{project_gid}/sections";
Expand All @@ -43,7 +44,7 @@ public function createSectionForProject($project_gid, $params = array(), $option
* @param string $section_gid (required) The globally unique identifier for the section.
* @param array $params
* @param array $options
* @return response
* @return \stdClass response
*/
public function deleteSection($section_gid, $params = array(), $options = array()) {
$path = "/sections/{section_gid}";
Expand All @@ -56,7 +57,7 @@ public function deleteSection($section_gid, $params = array(), $options = array(
* @param string $section_gid (required) The globally unique identifier for the section.
* @param array $params
* @param array $options
* @return response
* @return \stdClass response
*/
public function getSection($section_gid, $params = array(), $options = array()) {
$path = "/sections/{section_gid}";
Expand All @@ -69,7 +70,7 @@ public function getSection($section_gid, $params = array(), $options = array())
* @param string $project_gid (required) Globally unique identifier for the project.
* @param array $params
* @param array $options
* @return response
* @return \stdClass response
*/
public function getSectionsForProject($project_gid, $params = array(), $options = array()) {
$path = "/projects/{project_gid}/sections";
Expand All @@ -82,7 +83,7 @@ public function getSectionsForProject($project_gid, $params = array(), $options
* @param string $project_gid (required) Globally unique identifier for the project.
* @param array $params
* @param array $options
* @return response
* @return \stdClass response
*/
public function insertSectionForProject($project_gid, $params = array(), $options = array()) {
$path = "/projects/{project_gid}/sections/insert";
Expand All @@ -95,7 +96,7 @@ public function insertSectionForProject($project_gid, $params = array(), $option
* @param string $section_gid (required) The globally unique identifier for the section.
* @param array $params
* @param array $options
* @return response
* @return \stdClass response
*/
public function updateSection($section_gid, $params = array(), $options = array()) {
$path = "/sections/{section_gid}";
Expand Down