From 64af61e1ce5bbb66be3e220bedbb0b3bdb6314ef Mon Sep 17 00:00:00 2001 From: Ross Grambo Date: Thu, 23 Jan 2020 13:16:03 -0800 Subject: [PATCH 01/11] Used the openapi spec to fill the gen. Promoted previous gen files to manually maintained. --- .swagger-codegen-ignore | 5 + src/Asana/Resources/Attachments.php | 24 + src/Asana/Resources/CustomFieldSettings.php | 23 + src/Asana/Resources/CustomFields.php | 120 ++++ src/Asana/Resources/Gen/AttachmentsBase.php | 75 +- src/Asana/Resources/Gen/BatchAPIBase.php | 24 + .../Resources/Gen/CustomFieldSettingsBase.php | 80 ++- src/Asana/Resources/Gen/CustomFieldsBase.php | 198 +++--- src/Asana/Resources/Gen/EventsBase.php | 45 +- src/Asana/Resources/Gen/ItemsBase.php | 50 ++ src/Asana/Resources/Gen/JobsBase.php | 32 +- .../Resources/Gen/OrganizationExportsBase.php | 60 +- .../Gen/PortfolioMembershipsBase.php | 66 +- src/Asana/Resources/Gen/PortfoliosBase.php | 259 +++---- .../Resources/Gen/ProjectMembershipsBase.php | 52 +- .../Resources/Gen/ProjectStatusesBase.php | 96 ++- src/Asana/Resources/Gen/ProjectsBase.php | 346 ++++------ src/Asana/Resources/Gen/SectionsBase.php | 178 ++--- src/Asana/Resources/Gen/StoriesBase.php | 120 ++-- src/Asana/Resources/Gen/TagsBase.php | 170 ++--- src/Asana/Resources/Gen/TasksBase.php | 639 +++++++----------- .../Resources/Gen/TeamMembershipsBase.php | 60 ++ src/Asana/Resources/Gen/TeamsBase.php | 129 ++-- src/Asana/Resources/Gen/TypeaheadBase.php | 26 + src/Asana/Resources/Gen/UserTaskListsBase.php | 95 +-- src/Asana/Resources/Gen/UsersBase.php | 116 ++-- src/Asana/Resources/Gen/WebhooksBase.php | 143 ++-- .../Gen/WorkspaceMembershipsBase.php | 50 ++ src/Asana/Resources/Gen/WorkspacesBase.php | 142 ++-- src/Asana/Resources/Jobs.php | 11 + src/Asana/Resources/OrganizationExports.php | 22 + src/Asana/Resources/PortfolioMemberships.php | 34 + src/Asana/Resources/Portfolios.php | 171 +++++ src/Asana/Resources/ProjectMemberships.php | 31 + src/Asana/Resources/ProjectStatuses.php | 60 ++ src/Asana/Resources/Projects.php | 230 +++++++ src/Asana/Resources/Sections.php | 112 +++ src/Asana/Resources/Stories.php | 65 ++ src/Asana/Resources/Tags.php | 105 +++ src/Asana/Resources/Tasks.php | 447 ++++++++++++ src/Asana/Resources/Teams.php | 78 +++ src/Asana/Resources/UserTaskLists.php | 53 ++ src/Asana/Resources/Users.php | 63 ++ src/Asana/Resources/Webhooks.php | 60 ++ src/Asana/Resources/Workspaces.php | 81 +++ swagger_templates/api.mustache | 36 + swagger_templates/php-config.json | 9 + 47 files changed, 3262 insertions(+), 1829 deletions(-) create mode 100644 .swagger-codegen-ignore create mode 100644 src/Asana/Resources/Gen/BatchAPIBase.php create mode 100644 src/Asana/Resources/Gen/ItemsBase.php create mode 100644 src/Asana/Resources/Gen/TeamMembershipsBase.php create mode 100644 src/Asana/Resources/Gen/TypeaheadBase.php create mode 100644 src/Asana/Resources/Gen/WorkspaceMembershipsBase.php create mode 100644 swagger_templates/api.mustache create mode 100644 swagger_templates/php-config.json diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore new file mode 100644 index 0000000..fb9ac36 --- /dev/null +++ b/.swagger-codegen-ignore @@ -0,0 +1,5 @@ +# Swagger Codegen Ignore + +test/* +docs/* +src/Asana/Client.php diff --git a/src/Asana/Resources/Attachments.php b/src/Asana/Resources/Attachments.php index 665c7fe..50d6b95 100644 --- a/src/Asana/Resources/Attachments.php +++ b/src/Asana/Resources/Attachments.php @@ -12,4 +12,28 @@ public function createOnTask($task, $content, $filename, $contentType, $options $options['files'] = array('file' => array($content, $filename, $contentType)); return $this->client->request('POST', $path, $options); } + + /** + * Returns the full record for a single attachment. + * + * @param attachment Globally unique identifier for the attachment. + * @return response + */ + public function findById($attachment, $params = array(), $options = array()) + { + $path = sprintf("/attachments/%s", $attachment); + return $this->client->get($path, $params, $options); + } + + /** + * Returns the compact records for all attachments on the task. + * + * @param task Globally unique identifier for the task. + * @return response + */ + public function findByTask($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/attachments", $task); + return $this->client->getCollection($path, $params, $options); + } } diff --git a/src/Asana/Resources/CustomFieldSettings.php b/src/Asana/Resources/CustomFieldSettings.php index f99f52d..493538a 100644 --- a/src/Asana/Resources/CustomFieldSettings.php +++ b/src/Asana/Resources/CustomFieldSettings.php @@ -6,4 +6,27 @@ class CustomFieldSettings extends CustomFieldSettingsBase { + /** + * Returns a list of all of the custom fields settings on a project. + * + * @param project The ID of the project for which to list custom field settings + * @return response + */ + public function findByProject($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/custom_field_settings", $project); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns a list of all of the custom fields settings on a portfolio. + * + * @param portfolio The ID of the portfolio for which to list custom field settings + * @return response + */ + public function findByPortfolio($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s/custom_field_settings", $portfolio); + return $this->client->getCollection($path, $params, $options); + } } diff --git a/src/Asana/Resources/CustomFields.php b/src/Asana/Resources/CustomFields.php index 022d1cb..7c59262 100644 --- a/src/Asana/Resources/CustomFields.php +++ b/src/Asana/Resources/CustomFields.php @@ -15,4 +15,124 @@ public function reorderEnumOption($customField, $params = array(), $options = ar { return $this->insertEnumOption($customField, $params, $options); } + + /** + * Creates a new custom field in a workspace. Every custom field is required to be created in a specific workspace, and this workspace cannot be changed once set. + * + * A custom field's `name` must be unique within a workspace and not conflict with names of existing task properties such as 'Due Date' or 'Assignee'. A custom field's `type` must be one of 'text', 'enum', or 'number'. + * + * Returns the full record of the newly created custom field. + * + * @return response + */ + public function create($params = array(), $options = array()) + { + return $this->client->post("/custom_fields", $params, $options); + } + + /** + * Returns the complete definition of a custom field's metadata. + * + * @param custom_field Globally unique identifier for the custom field. + * @return response + */ + public function findById($customField, $params = array(), $options = array()) + { + $path = sprintf("/custom_fields/%s", $customField); + return $this->client->get($path, $params, $options); + } + + /** + * Returns a list of the compact representation of all of the custom fields in a workspace. + * + * @param workspace The workspace or organization to find custom field definitions in. + * @return response + */ + public function findByWorkspace($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s/custom_fields", $workspace); + return $this->client->getCollection($path, $params, $options); + } + + /** + * A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged + * + * When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field. + * + * An enum custom field's `enum_options` cannot be updated with this endpoint. Instead see "Work With Enum Options" for information on how to update `enum_options`. + * + * Locked custom fields can only be updated by the user who locked the field. + * + * Returns the complete updated custom field record. + * + * @param custom_field Globally unique identifier for the custom field. + * @return response + */ + public function update($customField, $params = array(), $options = array()) + { + $path = sprintf("/custom_fields/%s", $customField); + return $this->client->put($path, $params, $options); + } + + /** + * A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field. + * + * Locked custom fields can only be deleted by the user who locked the field. + * + * Returns an empty data record. + * + * @param custom_field Globally unique identifier for the custom field. + * @return response + */ + public function delete($customField, $params = array(), $options = array()) + { + $path = sprintf("/custom_fields/%s", $customField); + return $this->client->delete($path, $params, $options); + } + + /** + * Creates an enum option and adds it to this custom field's list of enum options. A custom field can have at most 50 enum options (including disabled options). By default new enum options are inserted at the end of a custom field's list. + * + * Locked custom fields can only have enum options added by the user who locked the field. + * + * Returns the full record of the newly created enum option. + * + * @param custom_field Globally unique identifier for the custom field. + * @return response + */ + public function createEnumOption($customField, $params = array(), $options = array()) + { + $path = sprintf("/custom_fields/%s/enum_options", $customField); + return $this->client->post($path, $params, $options); + } + + /** + * Updates an existing enum option. Enum custom fields require at least one enabled enum option. + * + * Locked custom fields can only be updated by the user who locked the field. + * + * Returns the full record of the updated enum option. + * + * @param enum_option Globally unique identifier for the enum option. + * @return response + */ + public function updateEnumOption($enumOption, $params = array(), $options = array()) + { + $path = sprintf("/enum_options/%s", $enumOption); + return $this->client->put($path, $params, $options); + } + + /** + * Moves a particular enum option to be either before or after another specified enum option in the custom field. + * + * Locked custom fields can only be reordered by the user who locked the field. + * + * @param custom_field Globally unique identifier for the custom field. + * @return response + */ + public function insertEnumOption($customField, $params = array(), $options = array()) + { + $path = sprintf("/custom_fields/%s/enum_options/insert", $customField); + return $this->client->post($path, $params, $options); + } } diff --git a/src/Asana/Resources/Gen/AttachmentsBase.php b/src/Asana/Resources/Gen/AttachmentsBase.php index df33e2a..79a5966 100644 --- a/src/Asana/Resources/Gen/AttachmentsBase.php +++ b/src/Asana/Resources/Gen/AttachmentsBase.php @@ -2,42 +2,61 @@ namespace Asana\Resources\Gen; -/** - * An _attachment_ object represents any file attached to a task in Asana, - * whether it's an uploaded file or one associated via a third-party service - * such as Dropbox or Google Drive. -*/ -class AttachmentsBase -{ +class AttachmentsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Returns the full record for a single attachment. - * - * @param attachment Globally unique identifier for the attachment. - * @return response - */ - public function findById($attachment, $params = array(), $options = array()) - { - $path = sprintf("/attachments/%s", $attachment); + public function deleteAttachment($attachment_gid, $params = array(), $options = array()) { + /** Delete an attachment + * + * @param $attachment_gid string: (required) Globally unique identifier for the attachment. + * @param $params : + * @return response + */ + $path = "/attachments/{attachment_gid}"; + $path = str_replace($path,"{attachment_gid}", $attachment_gid); + return $this->client->delete($path, $params, $options); + } + + public function getAttachment($attachment_gid, $params = array(), $options = array()) { + /** Get an attachment + * + * @param $attachment_gid string: (required) Globally unique identifier for the attachment. + * @param $params : + * @return response + */ + $path = "/attachments/{attachment_gid}"; + $path = str_replace($path,"{attachment_gid}", $attachment_gid); return $this->client->get($path, $params, $options); } - /** - * Returns the compact records for all attachments on the task. - * - * @param task Globally unique identifier for the task. - * @return response - */ - public function findByTask($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/attachments", $task); - return $this->client->getCollection($path, $params, $options); + public function getAttachmentsForTask($task_gid, $params = array(), $options = array()) { + /** Get attachments for a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/attachments"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->get($path, $params, $options); + } + + public function uploadAttachmentToTask($task_gid, $params = array(), $options = array()) { + /** Upload an attachment + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/attachments"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->post($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/BatchAPIBase.php b/src/Asana/Resources/Gen/BatchAPIBase.php new file mode 100644 index 0000000..f31a463 --- /dev/null +++ b/src/Asana/Resources/Gen/BatchAPIBase.php @@ -0,0 +1,24 @@ +client = $client; + } + + public function batchRequest($params = array(), $options = array()) { + /** Submit parallel requests + * + * @param $params : + * @return response + */ + $path = "/batch"; + return $this->client->post($path, $params, $options); + } +} diff --git a/src/Asana/Resources/Gen/CustomFieldSettingsBase.php b/src/Asana/Resources/Gen/CustomFieldSettingsBase.php index 7d793b4..6902117 100644 --- a/src/Asana/Resources/Gen/CustomFieldSettingsBase.php +++ b/src/Asana/Resources/Gen/CustomFieldSettingsBase.php @@ -2,45 +2,61 @@ namespace Asana\Resources\Gen; -/** - * Custom fields are applied to a particular project or portfolio with the - * Custom Field Settings resource. This resource both represents the - * many-to-many join of the Custom Field and Project or Portfolio as well as - * stores information that is relevant to that particular pairing; for instance, - * the `is_important` property determines some possible application-specific - * handling of that custom field and parent. -*/ -class CustomFieldSettingsBase -{ +class CustomFieldSettingsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Returns a list of all of the custom fields settings on a project. - * - * @param project The ID of the project for which to list custom field settings - * @return response - */ - public function findByProject($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/custom_field_settings", $project); - return $this->client->getCollection($path, $params, $options); + public function getCustomFieldSettingsForPortfolio($portfolio_gid, $params = array(), $options = array()) { + /** Get a portfolio's custom fields + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/custom_field_settings"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->get($path, $params, $options); } - /** - * Returns a list of all of the custom fields settings on a portfolio. - * - * @param portfolio The ID of the portfolio for which to list custom field settings - * @return response - */ - public function findByPortfolio($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s/custom_field_settings", $portfolio); - return $this->client->getCollection($path, $params, $options); + public function getCustomFieldSettingsForProject($project_gid, $params = array(), $options = array()) { + /** Get a project's custom fields + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/custom_field_settings"; + $path = str_replace($path,"{project_gid}", $project_gid); + return $this->client->get($path, $params, $options); + } + + public function portfolioAddCustomFieldSetting($portfolio_gid, $params = array(), $options = array()) { + /** Add a custom field to a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/addCustomFieldSetting"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->post($path, $params, $options); + } + + public function portfolioRemoveCustomFieldSetting($portfolio_gid, $params = array(), $options = array()) { + /** Remove a custom field from a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/removeCustomFieldSetting"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->post($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/CustomFieldsBase.php b/src/Asana/Resources/Gen/CustomFieldsBase.php index 84939ce..c29fc83 100644 --- a/src/Asana/Resources/Gen/CustomFieldsBase.php +++ b/src/Asana/Resources/Gen/CustomFieldsBase.php @@ -2,145 +2,107 @@ namespace Asana\Resources\Gen; -/** - * Custom Fields store the metadata that is used in order to add user-specified - * information to tasks in Asana. Be sure to reference the [Custom - * Fields](/developers/documentation/getting-started/custom-fields) developer - * documentation for more information about how custom fields relate to various - * resources in Asana. - * - * Users in Asana can [lock custom - * fields](/guide/help/premium/custom-fields#gl-lock-fields), which will make - * them read-only when accessed by other users. Attempting to edit a locked - * custom field will return HTTP error code `403 Forbidden`. -*/ -class CustomFieldsBase -{ +class CustomFieldsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Creates a new custom field in a workspace. Every custom field is required to be created in a specific workspace, and this workspace cannot be changed once set. - * - * A custom field's `name` must be unique within a workspace and not conflict with names of existing task properties such as 'Due Date' or 'Assignee'. A custom field's `type` must be one of 'text', 'enum', or 'number'. - * - * Returns the full record of the newly created custom field. - * - * @return response - */ - public function create($params = array(), $options = array()) - { - return $this->client->post("/custom_fields", $params, $options); + public function addEnumOption($custom_field_gid, $params = array(), $options = array()) { + /** Create an enum option + * + * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. + * @param $params : + * @return response + */ + $path = "/custom_fields/{custom_field_gid}/enum_options"; + $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); + return $this->client->post($path, $params, $options); } - /** - * Returns the complete definition of a custom field's metadata. - * - * @param custom_field Globally unique identifier for the custom field. - * @return response - */ - public function findById($customField, $params = array(), $options = array()) - { - $path = sprintf("/custom_fields/%s", $customField); - return $this->client->get($path, $params, $options); + public function createCustomField($params = array(), $options = array()) { + /** Create a custom field + * + * @param $params : + * @return response + */ + $path = "/custom_fields"; + return $this->client->post($path, $params, $options); } - /** - * Returns a list of the compact representation of all of the custom fields in a workspace. - * - * @param workspace The workspace or organization to find custom field definitions in. - * @return response - */ - public function findByWorkspace($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s/custom_fields", $workspace); - return $this->client->getCollection($path, $params, $options); + public function deleteCustomField($custom_field_gid, $params = array(), $options = array()) { + /** Delete a custom field + * + * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. + * @param $params : + * @return response + */ + $path = "/custom_fields/{custom_field_gid}"; + $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); + return $this->client->delete($path, $params, $options); } - /** - * A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged - * - * When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field. - * - * An enum custom field's `enum_options` cannot be updated with this endpoint. Instead see "Work With Enum Options" for information on how to update `enum_options`. - * - * Locked custom fields can only be updated by the user who locked the field. - * - * Returns the complete updated custom field record. - * - * @param custom_field Globally unique identifier for the custom field. - * @return response - */ - public function update($customField, $params = array(), $options = array()) - { - $path = sprintf("/custom_fields/%s", $customField); - return $this->client->put($path, $params, $options); + public function getCustomField($custom_field_gid, $params = array(), $options = array()) { + /** Get a custom field + * + * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. + * @param $params : + * @return response + */ + $path = "/custom_fields/{custom_field_gid}"; + $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); + return $this->client->get($path, $params, $options); } - /** - * A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field. - * - * Locked custom fields can only be deleted by the user who locked the field. - * - * Returns an empty data record. - * - * @param custom_field Globally unique identifier for the custom field. - * @return response - */ - public function delete($customField, $params = array(), $options = array()) - { - $path = sprintf("/custom_fields/%s", $customField); - return $this->client->delete($path, $params, $options); + public function getCustomFieldsInWorkspace($workspace_gid, $params = array(), $options = array()) { + /** Get a workspace's custom fields + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}/custom_fields"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->get($path, $params, $options); } - /** - * Creates an enum option and adds it to this custom field's list of enum options. A custom field can have at most 50 enum options (including disabled options). By default new enum options are inserted at the end of a custom field's list. - * - * Locked custom fields can only have enum options added by the user who locked the field. - * - * Returns the full record of the newly created enum option. - * - * @param custom_field Globally unique identifier for the custom field. - * @return response - */ - public function createEnumOption($customField, $params = array(), $options = array()) - { - $path = sprintf("/custom_fields/%s/enum_options", $customField); + public function reorderEnumOption($custom_field_gid, $params = array(), $options = array()) { + /** Reorder a custom field's enum + * + * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. + * @param $params : + * @return response + */ + $path = "/custom_fields/{custom_field_gid}/enum_options/insert"; + $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); return $this->client->post($path, $params, $options); } - /** - * Updates an existing enum option. Enum custom fields require at least one enabled enum option. - * - * Locked custom fields can only be updated by the user who locked the field. - * - * Returns the full record of the updated enum option. - * - * @param enum_option Globally unique identifier for the enum option. - * @return response - */ - public function updateEnumOption($enumOption, $params = array(), $options = array()) - { - $path = sprintf("/enum_options/%s", $enumOption); + public function updateCustomField($custom_field_gid, $params = array(), $options = array()) { + /** Update a custom field + * + * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. + * @param $params : + * @return response + */ + $path = "/custom_fields/{custom_field_gid}"; + $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); return $this->client->put($path, $params, $options); } - /** - * Moves a particular enum option to be either before or after another specified enum option in the custom field. - * - * Locked custom fields can only be reordered by the user who locked the field. - * - * @param custom_field Globally unique identifier for the custom field. - * @return response - */ - public function insertEnumOption($customField, $params = array(), $options = array()) - { - $path = sprintf("/custom_fields/%s/enum_options/insert", $customField); - return $this->client->post($path, $params, $options); + public function updateEnumOption($enum_option_gid, $params = array(), $options = array()) { + /** Update an enum option + * + * @param $enum_option_gid string: (required) Globally unique identifier for the enum option. + * @param $params : + * @return response + */ + $path = "/enum_options/{enum_option_gid}"; + $path = str_replace($path,"{enum_option_gid}", $enum_option_gid); + return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/EventsBase.php b/src/Asana/Resources/Gen/EventsBase.php index 54d4398..a10f9ab 100644 --- a/src/Asana/Resources/Gen/EventsBase.php +++ b/src/Asana/Resources/Gen/EventsBase.php @@ -2,40 +2,23 @@ namespace Asana\Resources\Gen; -/** - * An _event_ is an object representing a change to a resource that was observed - * by an event subscription. - * - * In general, requesting events on a resource is faster and subject to higher - * rate limits than requesting the resource itself. Additionally, change events - * bubble up - listening to events on a project would include when stories are - * added to tasks in the project, even on subtasks. - * - * Establish an initial sync token by making a request with no sync token. - * The response will be a `412` error - the same as if the sync token had - * expired. - * - * Subsequent requests should always provide the sync token from the immediately - * preceding call. - * - * Sync tokens may not be valid if you attempt to go 'backward' in the history - * by requesting previous tokens, though re-requesting the current sync token - * is generally safe, and will always return the same results. - * - * When you receive a `412 Precondition Failed` error, it means that the - * sync token is either invalid or expired. If you are attempting to keep a set - * of data in sync, this signals you may need to re-crawl the data. - * - * Sync tokens always expire after 24 hours, but may expire sooner, depending on - * load on the service. -*/ -class EventsBase -{ +class EventsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + + public function getEvents($params = array(), $options = array()) { + /** Get events on a resource + * + * @param $params : + * @return response + */ + $path = "/events"; + return $this->client->get($path, $params, $options); + } } diff --git a/src/Asana/Resources/Gen/ItemsBase.php b/src/Asana/Resources/Gen/ItemsBase.php new file mode 100644 index 0000000..d3acedf --- /dev/null +++ b/src/Asana/Resources/Gen/ItemsBase.php @@ -0,0 +1,50 @@ +client = $client; + } + + public function addPortfolioItem($portfolio_gid, $params = array(), $options = array()) { + /** Add a portfolio item + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/addItem"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->post($path, $params, $options); + } + + public function getPortfolioItems($portfolio_gid, $params = array(), $options = array()) { + /** Get portfolio items + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/items"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->get($path, $params, $options); + } + + public function removePortfolioItem($portfolio_gid, $params = array(), $options = array()) { + /** Remove a portfolio item + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/removeItem"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->post($path, $params, $options); + } +} diff --git a/src/Asana/Resources/Gen/JobsBase.php b/src/Asana/Resources/Gen/JobsBase.php index 8070cee..9469ea7 100644 --- a/src/Asana/Resources/Gen/JobsBase.php +++ b/src/Asana/Resources/Gen/JobsBase.php @@ -2,31 +2,25 @@ namespace Asana\Resources\Gen; -/** - * A _job_ represents a process that handles asynchronous work. - * - * Jobs are created when an endpoint requests an action that will be handled asynchronously. - * Such as project or task duplication. -*/ -class JobsBase -{ +class JobsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Returns the complete job record for a single job. - * - * @param job The job to get. - * @return response - */ - public function findById($job, $params = array(), $options = array()) - { - $path = sprintf("/jobs/%s", $job); + public function getJob($job_gid, $params = array(), $options = array()) { + /** Get a job by id + * + * @param $job_gid string: (required) Globally unique identifier for the job. + * @param $params : + * @return response + */ + $path = "/jobs/{job_gid}"; + $path = str_replace($path,"{job_gid}", $job_gid); return $this->client->get($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/OrganizationExportsBase.php b/src/Asana/Resources/Gen/OrganizationExportsBase.php index 97d1227..34e8074 100644 --- a/src/Asana/Resources/Gen/OrganizationExportsBase.php +++ b/src/Asana/Resources/Gen/OrganizationExportsBase.php @@ -2,51 +2,35 @@ namespace Asana\Resources\Gen; -/** - * An _organization_export_ object represents a request to export the complete data of an Organization - * in JSON format. - * - * To export an Organization using this API: - * - * * Create an `organization_export` [request](#create) and store the id that is returned.\ - * * Request the `organization_export` every few minutes, until the `state` field contains 'finished'.\ - * * Download the file located at the URL in the `download_url` field. - * - * Exports can take a long time, from several minutes to a few hours for large Organizations. - * - * **Note:** These endpoints are only available to [Service Accounts](/guide/help/premium/service-accounts) - * of an [Enterprise](/enterprise) Organization. -*/ -class OrganizationExportsBase -{ +class OrganizationExportsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Returns details of a previously-requested Organization export. - * - * @param organization_export Globally unique identifier for the Organization export. - * @return response - */ - public function findById($organizationExport, $params = array(), $options = array()) - { - $path = sprintf("/organization_exports/%s", $organizationExport); - return $this->client->get($path, $params, $options); + public function createOrganizationExport($params = array(), $options = array()) { + /** Create an organization export request + * + * @param $params : + * @return response + */ + $path = "/organization_exports"; + return $this->client->post($path, $params, $options); } - /** - * This method creates a request to export an Organization. Asana will complete the export at some - * point after you create the request. - * - * @return response - */ - public function create($params = array(), $options = array()) - { - return $this->client->post("/organization_exports", $params, $options); + public function getOrganizationExport($organization_export_gid, $params = array(), $options = array()) { + /** Get details on an org export request + * + * @param $organization_export_gid string: (required) Globally unique identifier for the organization export. + * @param $params : + * @return response + */ + $path = "/organization_exports/{organization_export_gid}"; + $path = str_replace($path,"{organization_export_gid}", $organization_export_gid); + return $this->client->get($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/PortfolioMembershipsBase.php b/src/Asana/Resources/Gen/PortfolioMembershipsBase.php index 2fefaf2..b06f122 100644 --- a/src/Asana/Resources/Gen/PortfolioMembershipsBase.php +++ b/src/Asana/Resources/Gen/PortfolioMembershipsBase.php @@ -2,51 +2,47 @@ namespace Asana\Resources\Gen; -/** - * This object determines if a user is a member of a portfolio. -*/ -class PortfolioMembershipsBase -{ +class PortfolioMembershipsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Returns the compact portfolio membership records for the portfolio. You must - * specify `portfolio`, `portfolio` and `user`, or `workspace` and `user`. - * - * @return response - */ - public function findAll($params = array(), $options = array()) - { - return $this->client->getCollection("/portfolio_memberships", $params, $options); + public function getPortfolioMembership($portfolio_membership_path_gid, $params = array(), $options = array()) { + /** Get a portfolio membership + * + * @param $portfolio_membership_path_gid string: (required) + * @param $params : + * @return response + */ + $path = "/portfolio_memberships/{portfolio_membership_gid}"; + $path = str_replace($path,"{portfolio_membership_path_gid}", $portfolio_membership_path_gid); + return $this->client->get($path, $params, $options); } - /** - * Returns the compact portfolio membership records for the portfolio. - * - * @param portfolio The portfolio for which to fetch memberships. - * @return response - */ - public function findByPortfolio($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s/portfolio_memberships", $portfolio); - return $this->client->getCollection($path, $params, $options); + public function getPortfolioMemberships($params = array(), $options = array()) { + /** Get multiple portfolio memberships + * + * @param $params : + * @return response + */ + $path = "/portfolio_memberships"; + return $this->client->get($path, $params, $options); } - /** - * Returns the portfolio membership record. - * - * @param portfolio_membership Globally unique identifier for the portfolio membership. - * @return response - */ - public function findById($portfolioMembership, $params = array(), $options = array()) - { - $path = sprintf("/portfolio_memberships/%s", $portfolioMembership); + public function getPortfolioMembershipsForPortfolio($portfolio_gid, $params = array(), $options = array()) { + /** Get memberships from a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/portfolio_memberships"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); return $this->client->get($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/PortfoliosBase.php b/src/Asana/Resources/Gen/PortfoliosBase.php index 0c7dc5e..43f21e3 100644 --- a/src/Asana/Resources/Gen/PortfoliosBase.php +++ b/src/Asana/Resources/Gen/PortfoliosBase.php @@ -2,194 +2,129 @@ namespace Asana\Resources\Gen; -/** - * A _portfolio_ gives a high-level overview of the status of multiple - * initiatives in Asana. Portfolios provide a dashboard overview of the state - * of multiple items, including a progress report and the most recent - * [project status](/developers/api-reference/project_statuses) update. - * - * Portfolios have some restrictions on size. Each portfolio has a maximum of 250 - * items and, like projects, a maximum of 20 custom fields. -*/ -class PortfoliosBase -{ +class PortfoliosBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Creates a new portfolio in the given workspace with the supplied name. - * - * Note that portfolios created in the Asana UI may have some state - * (like the "Priority" custom field) which is automatically added to the - * portfolio when it is created. Portfolios created via our API will **not** - * be created with the same initial state to allow integrations to create - * their own starting state on a portfolio. - * - * @return response - */ - public function create($params = array(), $options = array()) - { - return $this->client->post("/portfolios", $params, $options); + public function addPortfolioItem($portfolio_gid, $params = array(), $options = array()) { + /** Add a portfolio item + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/addItem"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->post($path, $params, $options); } - /** - * Returns the complete record for a single portfolio. - * - * @param portfolio The portfolio to get. - * @return response - */ - public function findById($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s", $portfolio); - return $this->client->get($path, $params, $options); + public function addPortfolioMembers($portfolio_gid, $params = array(), $options = array()) { + /** Add users to a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/addMembers"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->post($path, $params, $options); } - /** - * An existing portfolio can be updated by making a PUT request on the - * URL for that portfolio. Only the fields provided in the `data` block will be - * updated; any unspecified fields will remain unchanged. - * - * Returns the complete updated portfolio record. - * - * @param portfolio The portfolio to update. - * @return response - */ - public function update($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s", $portfolio); - return $this->client->put($path, $params, $options); + public function createPortfolio($params = array(), $options = array()) { + /** Create a portfolio + * + * @param $params : + * @return response + */ + $path = "/portfolios"; + return $this->client->post($path, $params, $options); } - /** - * An existing portfolio can be deleted by making a DELETE request - * on the URL for that portfolio. - * - * Returns an empty data record. - * - * @param portfolio The portfolio to delete. - * @return response - */ - public function delete($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s", $portfolio); + public function deletePortfolio($portfolio_gid, $params = array(), $options = array()) { + /** Delete a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); return $this->client->delete($path, $params, $options); } - /** - * Returns a list of the portfolios in compact representation that are owned - * by the current API user. - * - * @return response - */ - public function findAll($params = array(), $options = array()) - { - return $this->client->getCollection("/portfolios", $params, $options); - } - - /** - * Get a list of the items in compact form in a portfolio. - * - * @param portfolio The portfolio from which to get the list of items. - * @return response - */ - public function getItems($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s/items", $portfolio); - return $this->client->getCollection($path, $params, $options); - } - - /** - * Add an item to a portfolio. - * - * Returns an empty data block. - * - * @param portfolio The portfolio to which to add an item. - * @return response - */ - public function addItem($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s/addItem", $portfolio); - return $this->client->post($path, $params, $options); + public function getPortfolio($portfolio_gid, $params = array(), $options = array()) { + /** Get a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->get($path, $params, $options); } - /** - * Remove an item to a portfolio. - * - * Returns an empty data block. - * - * @param portfolio The portfolio from which to remove the item. - * @return response - */ - public function removeItem($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s/removeItem", $portfolio); - return $this->client->post($path, $params, $options); + public function getPortfolioItems($portfolio_gid, $params = array(), $options = array()) { + /** Get portfolio items + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/items"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->get($path, $params, $options); } - /** - * Adds the specified list of users as members of the portfolio. Returns the updated portfolio record. - * - * @param portfolio The portfolio to add members to. - * @return response - */ - public function addMembers($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s/addMembers", $portfolio); - return $this->client->post($path, $params, $options); + public function getPortfolios($params = array(), $options = array()) { + /** Get multiple portfolios + * + * @param $params : + * @return response + */ + $path = "/portfolios"; + return $this->client->get($path, $params, $options); } - /** - * Removes the specified list of members from the portfolio. Returns the updated portfolio record. - * - * @param portfolio The portfolio to remove members from. - * @return response - */ - public function removeMembers($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s/removeMembers", $portfolio); + public function removePortfolioItem($portfolio_gid, $params = array(), $options = array()) { + /** Remove a portfolio item + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/removeItem"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); return $this->client->post($path, $params, $options); } - /** - * Get the custom field settings on a portfolio. - * - * @param portfolio The portfolio from which to get the custom field settings. - * @return response - */ - public function customFieldSettings($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s/custom_field_settings", $portfolio); - return $this->client->getCollection($path, $params, $options); - } - - /** - * Create a new custom field setting on the portfolio. Returns the full - * record for the new custom field setting. - * - * @param portfolio The portfolio onto which to add the custom field. - * @return response - */ - public function addCustomFieldSetting($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s/addCustomFieldSetting", $portfolio); + public function removePortfolioMembers($portfolio_gid, $params = array(), $options = array()) { + /** Remove users from a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}/removeMembers"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); return $this->client->post($path, $params, $options); } - /** - * Remove a custom field setting on the portfolio. Returns an empty data - * block. - * - * @param portfolio The portfolio from which to remove the custom field. - * @return response - */ - public function removeCustomFieldSetting($portfolio, $params = array(), $options = array()) - { - $path = sprintf("/portfolios/%s/removeCustomFieldSetting", $portfolio); - return $this->client->post($path, $params, $options); + public function updateportfolio($portfolio_gid, $params = array(), $options = array()) { + /** Update a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params : + * @return response + */ + $path = "/portfolios/{portfolio_gid}"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/ProjectMembershipsBase.php b/src/Asana/Resources/Gen/ProjectMembershipsBase.php index 55923cf..ab02add 100644 --- a/src/Asana/Resources/Gen/ProjectMembershipsBase.php +++ b/src/Asana/Resources/Gen/ProjectMembershipsBase.php @@ -2,43 +2,37 @@ namespace Asana\Resources\Gen; -/** - * With the introduction of "comment-only" projects in Asana, a user's membership - * in a project comes with associated permissions. These permissions (whether a - * user has full access to the project or comment-only access) are accessible - * through the project memberships endpoints described here. -*/ -class ProjectMembershipsBase -{ +class ProjectMembershipsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Returns the compact project membership records for the project. - * - * @param project The project for which to fetch memberships. - * @return response - */ - public function findByProject($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/project_memberships", $project); - return $this->client->getCollection($path, $params, $options); + public function getProjectMembership($project_membership_path_gid, $params = array(), $options = array()) { + /** Get a project membership + * + * @param $project_membership_path_gid string: (required) + * @param $params : + * @return response + */ + $path = "/project_memberships/{project_membership_gid}"; + $path = str_replace($path,"{project_membership_path_gid}", $project_membership_path_gid); + return $this->client->get($path, $params, $options); } - /** - * Returns the project membership record. - * - * @param project_membership Globally unique identifier for the project membership. - * @return response - */ - public function findById($projectMembership, $params = array(), $options = array()) - { - $path = sprintf("/project_memberships/%s", $projectMembership); + public function getProjectMembershipsForProject($project_gid, $params = array(), $options = array()) { + /** Get memberships from a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/project_memberships"; + $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->get($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/ProjectStatusesBase.php b/src/Asana/Resources/Gen/ProjectStatusesBase.php index 4761d56..a80145c 100644 --- a/src/Asana/Resources/Gen/ProjectStatusesBase.php +++ b/src/Asana/Resources/Gen/ProjectStatusesBase.php @@ -2,73 +2,61 @@ namespace Asana\Resources\Gen; -/** - * A _project status_ is an update on the progress of a particular project, and is sent out to all project - * followers when created. These updates include both text describing the update and a color code intended to - * represent the overall state of the project: "green" for projects that are on track, "yellow" for projects - * at risk, and "red" for projects that are behind. - * - * Project statuses can be created and deleted, but not modified. -*/ -class ProjectStatusesBase -{ +class ProjectStatusesBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Creates a new status update on the project. - * - * Returns the full record of the newly created project status update. - * - * @param project The project on which to create a status update. - * @return response - */ - public function createInProject($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/project_statuses", $project); + public function createProjectStatus($project_gid, $params = array(), $options = array()) { + /** Create a project status + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/project_statuses"; + $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } - /** - * Returns the compact project status update records for all updates on the project. - * - * @param project The project to find status updates for. - * @return response - */ - public function findByProject($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/project_statuses", $project); - return $this->client->getCollection($path, $params, $options); + public function deleteProductStatus($project_status_path_gid, $params = array(), $options = array()) { + /** Delete a project status + * + * @param $project_status_path_gid string: (required) The project status update to get. + * @param $params : + * @return response + */ + $path = "/project_statuses/{project_status_gid}"; + $path = str_replace($path,"{project_status_path_gid}", $project_status_path_gid); + return $this->client->delete($path, $params, $options); } - /** - * Returns the complete record for a single status update. - * - * @param project-status The project status update to get. - * @return response - */ - public function findById($projectStatus, $params = array(), $options = array()) - { - $path = sprintf("/project_statuses/%s", $projectStatus); + public function getProductStatus($project_status_path_gid, $params = array(), $options = array()) { + /** Get a project status + * + * @param $project_status_path_gid string: (required) The project status update to get. + * @param $params : + * @return response + */ + $path = "/project_statuses/{project_status_gid}"; + $path = str_replace($path,"{project_status_path_gid}", $project_status_path_gid); return $this->client->get($path, $params, $options); } - /** - * Deletes a specific, existing project status update. - * - * Returns an empty data record. - * - * @param project-status The project status update to delete. - * @return response - */ - public function delete($projectStatus, $params = array(), $options = array()) - { - $path = sprintf("/project_statuses/%s", $projectStatus); - return $this->client->delete($path, $params, $options); + public function getProductStatuses($project_gid, $params = array(), $options = array()) { + /** Get statuses from a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/project_statuses"; + $path = str_replace($path,"{project_gid}", $project_gid); + return $this->client->get($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/ProjectsBase.php b/src/Asana/Resources/Gen/ProjectsBase.php index 19233ac..b3ea07a 100644 --- a/src/Asana/Resources/Gen/ProjectsBase.php +++ b/src/Asana/Resources/Gen/ProjectsBase.php @@ -2,255 +2,177 @@ namespace Asana\Resources\Gen; -/** - * A _project_ represents a prioritized list of tasks in Asana or a board with - * columns of tasks represented as cards. It exists in a single workspace or - * organization and is accessible to a subset of users in that workspace or - * organization, depending on its permissions. - * - * Projects in organizations are shared with a single team. You cannot currently - * change the team of a project via the API. Non-organization workspaces do not - * have teams and so you should not specify the team of project in a regular - * workspace. -*/ -class ProjectsBase -{ +class ProjectsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Creates a new project in a workspace or team. - * - * Every project is required to be created in a specific workspace or - * organization, and this cannot be changed once set. Note that you can use - * the `workspace` parameter regardless of whether or not it is an - * organization. - * - * If the workspace for your project _is_ an organization, you must also - * supply a `team` to share the project with. - * - * Returns the full record of the newly created project. - * - * @return response - */ - public function create($params = array(), $options = array()) - { - return $this->client->post("/projects", $params, $options); - } - - /** - * If the workspace for your project _is_ an organization, you must also - * supply a `team` to share the project with. - * - * Returns the full record of the newly created project. - * - * @param workspace The workspace or organization to create the project in. - * @return response - */ - public function createInWorkspace($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s/projects", $workspace); + public function createProject($params = array(), $options = array()) { + /** Create a project + * + * @param $params : + * @return response + */ + $path = "/projects"; return $this->client->post($path, $params, $options); } - /** - * Creates a project shared with the given team. - * - * Returns the full record of the newly created project. - * - * @param team The team to create the project in. - * @return response - */ - public function createInTeam($team, $params = array(), $options = array()) - { - $path = sprintf("/teams/%s/projects", $team); + public function createProjectsInWorkspace($workspace_gid, $params = array(), $options = array()) { + /** Create a project in a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}/projects"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); return $this->client->post($path, $params, $options); } - /** - * Returns the complete project record for a single project. - * - * @param project The project to get. - * @return response - */ - public function findById($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s", $project); - return $this->client->get($path, $params, $options); - } - - /** - * A specific, existing project can be updated by making a PUT request on the - * URL for that project. Only the fields provided in the `data` block will be - * updated; any unspecified fields will remain unchanged. - * - * When using this method, it is best to specify only those fields you wish - * to change, or else you may overwrite changes made by another user since - * you last retrieved the task. - * - * Returns the complete updated project record. - * - * @param project The project to update. - * @return response - */ - public function update($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s", $project); - return $this->client->put($path, $params, $options); + public function createProjectsWithTeam($team_gid, $params = array(), $options = array()) { + /** Create a project in a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params : + * @return response + */ + $path = "/teams/{team_gid}/projects"; + $path = str_replace($path,"{team_gid}", $team_gid); + return $this->client->post($path, $params, $options); } - /** - * A specific, existing project can be deleted by making a DELETE request - * on the URL for that project. - * - * Returns an empty data record. - * - * @param project The project to delete. - * @return response - */ - public function delete($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s", $project); + public function deleteProject($project_gid, $params = array(), $options = array()) { + /** Delete a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}"; + $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->delete($path, $params, $options); } - /** - * Creates and returns a job that will asynchronously handle the duplication. - * - * @param project The project to duplicate. - * @return response - */ - public function duplicateProject($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/duplicate", $project); + public function duplicateProject($project_gid, $params = array(), $options = array()) { + /** Duplicate a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/duplicate"; + $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } - /** - * Returns the compact project records for some filtered set of projects. - * Use one or more of the parameters provided to filter the projects returned. - * - * @return response - */ - public function findAll($params = array(), $options = array()) - { - return $this->client->getCollection("/projects", $params, $options); - } - - /** - * Returns the compact project records for all projects in the workspace. - * - * @param workspace The workspace or organization to find projects in. - * @return response - */ - public function findByWorkspace($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s/projects", $workspace); - return $this->client->getCollection($path, $params, $options); + public function getProject($project_gid, $params = array(), $options = array()) { + /** Get a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}"; + $path = str_replace($path,"{project_gid}", $project_gid); + return $this->client->get($path, $params, $options); } - /** - * Returns the compact project records for all projects in the team. - * - * @param team The team to find projects in. - * @return response - */ - public function findByTeam($team, $params = array(), $options = array()) - { - $path = sprintf("/teams/%s/projects", $team); - return $this->client->getCollection($path, $params, $options); + public function getProjectTaskCounts($project_gid, $params = array(), $options = array()) { + /** Get task count of a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/task_counts"; + $path = str_replace($path,"{project_gid}", $project_gid); + return $this->client->get($path, $params, $options); } - /** - * Returns the compact task records for all tasks within the given project, - * ordered by their priority within the project. Tasks can exist in more than one project at a time. - * - * @param project The project in which to search for tasks. - * @return response - */ - public function tasks($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/tasks", $project); - return $this->client->getCollection($path, $params, $options); + public function getProjects($params = array(), $options = array()) { + /** Get multiple projects + * + * @param $params : + * @return response + */ + $path = "/projects"; + return $this->client->get($path, $params, $options); } - /** - * Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if - * the users are not already members of the project they will also become members as a result of this operation. - * Returns the updated project record. - * - * @param project The project to add followers to. - * @return response - */ - public function addFollowers($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/addFollowers", $project); - return $this->client->post($path, $params, $options); + public function getProjectsInTeam($team_gid, $params = array(), $options = array()) { + /** Get a team's projects + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params : + * @return response + */ + $path = "/teams/{team_gid}/projects"; + $path = str_replace($path,"{team_gid}", $team_gid); + return $this->client->get($path, $params, $options); } - /** - * Removes the specified list of users from following the project, this will not affect project membership status. - * Returns the updated project record. - * - * @param project The project to remove followers from. - * @return response - */ - public function removeFollowers($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/removeFollowers", $project); - return $this->client->post($path, $params, $options); + public function getProjectsInWorkspace($workspace_gid, $params = array(), $options = array()) { + /** Get all projects in a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}/projects"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->get($path, $params, $options); } - /** - * Adds the specified list of users as members of the project. Returns the updated project record. - * - * @param project The project to add members to. - * @return response - */ - public function addMembers($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/addMembers", $project); - return $this->client->post($path, $params, $options); + public function getTaskProjects($task_gid, $params = array(), $options = array()) { + /** Get projects a task is in + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/projects"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->get($path, $params, $options); } - /** - * Removes the specified list of members from the project. Returns the updated project record. - * - * @param project The project to remove members from. - * @return response - */ - public function removeMembers($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/removeMembers", $project); + public function projectAddCustomFieldSetting($project_gid, $params = array(), $options = array()) { + /** Add a custom field to a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/addCustomFieldSetting"; + $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } - /** - * Create a new custom field setting on the project. - * - * @param project The project to associate the custom field with - * @return response - */ - public function addCustomFieldSetting($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/addCustomFieldSetting", $project); + public function projectRemoveCustomFieldSetting($project_gid, $params = array(), $options = array()) { + /** Remove a custom field from a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/removeCustomFieldSetting"; + $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } - /** - * Remove a custom field setting on the project. - * - * @param project The project to associate the custom field with - * @return response - */ - public function removeCustomFieldSetting($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/removeCustomFieldSetting", $project); - return $this->client->post($path, $params, $options); + public function updateProject($project_gid, $params = array(), $options = array()) { + /** Update a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}"; + $path = str_replace($path,"{project_gid}", $project_gid); + return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/SectionsBase.php b/src/Asana/Resources/Gen/SectionsBase.php index a1490d2..3d826aa 100644 --- a/src/Asana/Resources/Gen/SectionsBase.php +++ b/src/Asana/Resources/Gen/SectionsBase.php @@ -2,131 +2,97 @@ namespace Asana\Resources\Gen; -/** - * A _section_ is a subdivision of a project that groups tasks together. It can - * either be a header above a list of tasks in a list view or a column in a - * board view of a project. -*/ -class SectionsBase -{ +class SectionsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Creates a new section in a project. - * - * Returns the full record of the newly created section. - * - * @param project The project to create the section in - * @return response - */ - public function createInProject($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/sections", $project); + public function addTaskToSection($section_gid, $params = array(), $options = array()) { + /** Add task to section + * + * @param $section_gid string: (required) The globally unique identifier for the section. + * @param $params : + * @return response + */ + $path = "/sections/{section_gid}/addTask"; + $path = str_replace($path,"{section_gid}", $section_gid); return $this->client->post($path, $params, $options); } - /** - * Returns the compact records for all sections in the specified project. - * - * @param project The project to get sections from. - * @return response - */ - public function findByProject($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/sections", $project); - return $this->client->getCollection($path, $params, $options); + public function createSectionInProject($project_gid, $params = array(), $options = array()) { + /** Create a section in a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/sections"; + $path = str_replace($path,"{project_gid}", $project_gid); + return $this->client->post($path, $params, $options); } - /** - * Returns the complete record for a single section. - * - * @param section The section to get. - * @return response - */ - public function findById($section, $params = array(), $options = array()) - { - $path = sprintf("/sections/%s", $section); - return $this->client->get($path, $params, $options); + public function deleteSection($section_gid, $params = array(), $options = array()) { + /** Delete a section + * + * @param $section_gid string: (required) The globally unique identifier for the section. + * @param $params : + * @return response + */ + $path = "/sections/{section_gid}"; + $path = str_replace($path,"{section_gid}", $section_gid); + return $this->client->delete($path, $params, $options); } - /** - * A specific, existing section can be updated by making a PUT request on - * the URL for that project. Only the fields provided in the `data` block - * will be updated; any unspecified fields will remain unchanged. (note that - * at this time, the only field that can be updated is the `name` field.) - * - * When using this method, it is best to specify only those fields you wish - * to change, or else you may overwrite changes made by another user since - * you last retrieved the task. - * - * Returns the complete updated section record. - * - * @param section The section to update. - * @return response - */ - public function update($section, $params = array(), $options = array()) - { - $path = sprintf("/sections/%s", $section); - return $this->client->put($path, $params, $options); + public function getSection($section_gid, $params = array(), $options = array()) { + /** Get a section + * + * @param $section_gid string: (required) The globally unique identifier for the section. + * @param $params : + * @return response + */ + $path = "/sections/{section_gid}"; + $path = str_replace($path,"{section_gid}", $section_gid); + return $this->client->get($path, $params, $options); } - /** - * A specific, existing section can be deleted by making a DELETE request - * on the URL for that section. - * - * Note that sections must be empty to be deleted. - * - * The last remaining section in a board view cannot be deleted. - * - * Returns an empty data block. - * - * @param section The section to delete. - * @return response - */ - public function delete($section, $params = array(), $options = array()) - { - $path = sprintf("/sections/%s", $section); - return $this->client->delete($path, $params, $options); + public function getSectionsInProject($project_gid, $params = array(), $options = array()) { + /** Get sections in a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/sections"; + $path = str_replace($path,"{project_gid}", $project_gid); + return $this->client->get($path, $params, $options); } - /** - * Add a task to a specific, existing section. This will remove the task from other sections of the project. - * - * The task will be inserted at the top of a section unless an `insert_before` or `insert_after` parameter is declared. - * - * This does not work for separators (tasks with the `resource_subtype` of section). - * - * @param task The task to add to this section - * @return response - */ - public function addTask($task, $params = array(), $options = array()) - { - $path = sprintf("/sections/%s/addTask", $task); + public function moveSection($project_gid, $params = array(), $options = array()) { + /** Move sections + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/sections/insert"; + $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } - /** - * Move sections relative to each other in a board view. One of - * `before_section` or `after_section` is required. - * - * Sections cannot be moved between projects. - * - * At this point in time, moving sections is not supported in list views, only board views. - * - * Returns an empty data block. - * - * @param project The project in which to reorder the given section - * @return response - */ - public function insertInProject($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/sections/insert", $project); - return $this->client->post($path, $params, $options); + public function updateSection($section_gid, $params = array(), $options = array()) { + /** Update a section + * + * @param $section_gid string: (required) The globally unique identifier for the section. + * @param $params : + * @return response + */ + $path = "/sections/{section_gid}"; + $path = str_replace($path,"{section_gid}", $section_gid); + return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/StoriesBase.php b/src/Asana/Resources/Gen/StoriesBase.php index b197eda..fc4040d 100644 --- a/src/Asana/Resources/Gen/StoriesBase.php +++ b/src/Asana/Resources/Gen/StoriesBase.php @@ -2,85 +2,73 @@ namespace Asana\Resources\Gen; -/** - * A _story_ represents an activity associated with an object in the Asana - * system. Stories are generated by the system whenever users take actions such - * as creating or assigning tasks, or moving tasks between projects. _Comments_ - * are also a form of user-generated story. -*/ -class StoriesBase -{ +class StoriesBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Returns the compact records for all stories on the task. - * - * @param task Globally unique identifier for the task. - * @return response - */ - public function findByTask($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/stories", $task); - return $this->client->getCollection($path, $params, $options); + public function createCommentStory($task_gid, $params = array(), $options = array()) { + /** Create a comment on a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/stories"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->post($path, $params, $options); } - /** - * Returns the full record for a single story. - * - * @param story Globally unique identifier for the story. - * @return response - */ - public function findById($story, $params = array(), $options = array()) - { - $path = sprintf("/stories/%s", $story); - return $this->client->get($path, $params, $options); + public function deleteStory($story_gid, $params = array(), $options = array()) { + /** Delete a story + * + * @param $story_gid string: (required) Globally unique identifier for the story. + * @param $params : + * @return response + */ + $path = "/stories/{story_gid}"; + $path = str_replace($path,"{story_gid}", $story_gid); + return $this->client->delete($path, $params, $options); } - /** - * Adds a comment to a task. The comment will be authored by the - * currently authenticated user, and timestamped when the server receives - * the request. - * - * Returns the full record for the new story added to the task. - * - * @param task Globally unique identifier for the task. - * @return response - */ - public function createOnTask($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/stories", $task); - return $this->client->post($path, $params, $options); + public function getStory($story_gid, $params = array(), $options = array()) { + /** Get a story + * + * @param $story_gid string: (required) Globally unique identifier for the story. + * @param $params : + * @return response + */ + $path = "/stories/{story_gid}"; + $path = str_replace($path,"{story_gid}", $story_gid); + return $this->client->get($path, $params, $options); } - /** - * Updates the story and returns the full record for the updated story. - * Only comment stories can have their text updated, and only comment stories and - * attachment stories can be pinned. Only one of `text` and `html_text` can be specified. - * - * @param story Globally unique identifier for the story. - * @return response - */ - public function update($story, $params = array(), $options = array()) - { - $path = sprintf("/stories/%s", $story); - return $this->client->put($path, $params, $options); + public function getTaskStories($task_gid, $params = array(), $options = array()) { + /** Get stories from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/stories"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->get($path, $params, $options); } - /** - * Deletes a story. A user can only delete stories they have created. Returns an empty data record. - * - * @param story Globally unique identifier for the story. - * @return response - */ - public function delete($story, $params = array(), $options = array()) - { - $path = sprintf("/stories/%s", $story); - return $this->client->delete($path, $params, $options); + public function updateStory($story_gid, $params = array(), $options = array()) { + /** Update a story + * + * @param $story_gid string: (required) Globally unique identifier for the story. + * @param $params : + * @return response + */ + $path = "/stories/{story_gid}"; + $path = str_replace($path,"{story_gid}", $story_gid); + return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/TagsBase.php b/src/Asana/Resources/Gen/TagsBase.php index b1612cb..5ac9fa6 100644 --- a/src/Asana/Resources/Gen/TagsBase.php +++ b/src/Asana/Resources/Gen/TagsBase.php @@ -2,127 +2,93 @@ namespace Asana\Resources\Gen; -/** - * A _tag_ is a label that can be attached to any task in Asana. It exists in a - * single workspace or organization. - * - * Tags have some metadata associated with them, but it is possible that we will - * simplify them in the future so it is not encouraged to rely too heavily on it. - * Unlike projects, tags do not provide any ordering on the tasks they - * are associated with. -*/ -class TagsBase -{ +class TagsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Creates a new tag in a workspace or organization. - * - * Every tag is required to be created in a specific workspace or - * organization, and this cannot be changed once set. Note that you can use - * the `workspace` parameter regardless of whether or not it is an - * organization. - * - * Returns the full record of the newly created tag. - * - * @return response - */ - public function create($params = array(), $options = array()) - { - return $this->client->post("/tags", $params, $options); + public function createTag($params = array(), $options = array()) { + /** Create a tag + * + * @param $params : + * @return response + */ + $path = "/tags"; + return $this->client->post($path, $params, $options); } - /** - * Creates a new tag in a workspace or organization. - * - * Every tag is required to be created in a specific workspace or - * organization, and this cannot be changed once set. Note that you can use - * the `workspace` parameter regardless of whether or not it is an - * organization. - * - * Returns the full record of the newly created tag. - * - * @param workspace The workspace or organization to create the tag in. - * @return response - */ - public function createInWorkspace($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s/tags", $workspace); + public function createTagInWorkspace($workspace_gid, $params = array(), $options = array()) { + /** Create a tag in a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}/tags"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); return $this->client->post($path, $params, $options); } - /** - * Returns the complete tag record for a single tag. - * - * @param tag The tag to get. - * @return response - */ - public function findById($tag, $params = array(), $options = array()) - { - $path = sprintf("/tags/%s", $tag); + public function getTag($tag_gid, $params = array(), $options = array()) { + /** Get a tag + * + * @param $tag_gid string: (required) Globally unique identifier for the tag. + * @param $params : + * @return response + */ + $path = "/tags/{tag_gid}"; + $path = str_replace($path,"{tag_gid}", $tag_gid); return $this->client->get($path, $params, $options); } - /** - * Updates the properties of a tag. Only the fields provided in the `data` - * block will be updated; any unspecified fields will remain unchanged. - * - * When using this method, it is best to specify only those fields you wish - * to change, or else you may overwrite changes made by another user since - * you last retrieved the task. - * - * Returns the complete updated tag record. - * - * @param tag The tag to update. - * @return response - */ - public function update($tag, $params = array(), $options = array()) - { - $path = sprintf("/tags/%s", $tag); - return $this->client->put($path, $params, $options); + public function getTaskTags($task_gid, $params = array(), $options = array()) { + /** Get a task's tags + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/tags"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->get($path, $params, $options); } - /** - * A specific, existing tag can be deleted by making a DELETE request - * on the URL for that tag. - * - * Returns an empty data record. - * - * @param tag The tag to delete. - * @return response - */ - public function delete($tag, $params = array(), $options = array()) - { - $path = sprintf("/tags/%s", $tag); - return $this->client->delete($path, $params, $options); + public function queryAllTagsInWorkspace($workspace_gid, $params = array(), $options = array()) { + /** Get tags in a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}/tags"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->get($path, $params, $options); } - /** - * Returns the compact tag records for some filtered set of tags. - * Use one or more of the parameters provided to filter the tags returned. - * - * @return response - */ - public function findAll($params = array(), $options = array()) - { - return $this->client->getCollection("/tags", $params, $options); + public function queryTags($params = array(), $options = array()) { + /** Get multiple tags + * + * @param $params : + * @return response + */ + $path = "/tags"; + return $this->client->get($path, $params, $options); } - /** - * Returns the compact tag records for all tags in the workspace. - * - * @param workspace The workspace or organization to find tags in. - * @return response - */ - public function findByWorkspace($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s/tags", $workspace); - return $this->client->getCollection($path, $params, $options); + public function updateTag($tag_gid, $params = array(), $options = array()) { + /** Update a tag + * + * @param $tag_gid string: (required) Globally unique identifier for the tag. + * @param $params : + * @return response + */ + $path = "/tags/{tag_gid}"; + $path = str_replace($path,"{tag_gid}", $tag_gid); + return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/TasksBase.php b/src/Asana/Resources/Gen/TasksBase.php index 41da589..0c41616 100644 --- a/src/Asana/Resources/Gen/TasksBase.php +++ b/src/Asana/Resources/Gen/TasksBase.php @@ -2,466 +2,309 @@ namespace Asana\Resources\Gen; -/** - * The _task_ is the basic object around which many operations in Asana are - * centered. In the Asana application, multiple tasks populate the middle pane - * according to some view parameters, and the set of selected tasks determines - * the more detailed information presented in the details pane. -*/ -class TasksBase -{ +class TasksBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Creating a new task is as easy as POSTing to the `/tasks` endpoint - * with a data block containing the fields you'd like to set on the task. - * Any unspecified fields will take on default values. - * - * Every task is required to be created in a specific workspace, and this - * workspace cannot be changed once set. The workspace need not be set - * explicitly if you specify `projects` or a `parent` task instead. - * - * `projects` can be a comma separated list of projects, or just a single - * project the task should belong to. - * - * @return response - */ - public function create($params = array(), $options = array()) - { - return $this->client->post("/tasks", $params, $options); - } - - /** - * Creating a new task is as easy as POSTing to the `/tasks` endpoint - * with a data block containing the fields you'd like to set on the task. - * Any unspecified fields will take on default values. - * - * Every task is required to be created in a specific workspace, and this - * workspace cannot be changed once set. The workspace need not be set - * explicitly if you specify a `project` or a `parent` task instead. - * - * @param workspace The workspace to create a task in. - * @return response - */ - public function createInWorkspace($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s/tasks", $workspace); + public function addFollowerToTask($task_gid, $params = array(), $options = array()) { + /** Add followers to a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/addFollowers"; + $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - /** - * Returns the complete task record for a single task. - * - * @param task The task to get. - * @return response - */ - public function findById($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s", $task); - return $this->client->get($path, $params, $options); - } - - /** - * A specific, existing task can be updated by making a PUT request on the - * URL for that task. Only the fields provided in the `data` block will be - * updated; any unspecified fields will remain unchanged. - * - * When using this method, it is best to specify only those fields you wish - * to change, or else you may overwrite changes made by another user since - * you last retrieved the task. - * - * Returns the complete updated task record. - * - * @param task The task to update. - * @return response - */ - public function update($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s", $task); - return $this->client->put($path, $params, $options); + public function addProjectToTask($task_gid, $params = array(), $options = array()) { + /** Add a project to a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/addProject"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->post($path, $params, $options); } - /** - * A specific, existing task can be deleted by making a DELETE request on the - * URL for that task. Deleted tasks go into the "trash" of the user making - * the delete request. Tasks can be recovered from the trash within a period - * of 30 days; afterward they are completely removed from the system. - * - * Returns an empty data record. - * - * @param task The task to delete. - * @return response - */ - public function delete($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s", $task); - return $this->client->delete($path, $params, $options); + public function addTagToTask($task_gid, $params = array(), $options = array()) { + /** Add a tag to a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/addTag"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->post($path, $params, $options); } - /** - * Creates and returns a job that will asynchronously handle the duplication. - * - * @param task The task to duplicate. - * @return response - */ - public function duplicateTask($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/duplicate", $task); + public function addTaskDependencies($task_gid, $params = array(), $options = array()) { + /** Set dependencies for a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/addDependencies"; + $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - /** - * Returns the compact task records for all tasks within the given project, - * ordered by their priority within the project. - * - * @param project The project in which to search for tasks. - * @return response - */ - public function findByProject($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/tasks", $project); - return $this->client->getCollection($path, $params, $options); + public function addTaskDependents($task_gid, $params = array(), $options = array()) { + /** Set dependents for a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/addDependents"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->post($path, $params, $options); } - /** - * Returns the compact task records for all tasks with the given tag. - * - * @param tag The tag in which to search for tasks. - * @return response - */ - public function findByTag($tag, $params = array(), $options = array()) - { - $path = sprintf("/tags/%s/tasks", $tag); - return $this->client->getCollection($path, $params, $options); + public function changeSubtaskParent($task_gid, $params = array(), $options = array()) { + /** Change the parent of a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/setParent"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->post($path, $params, $options); } - /** - * Board view only: Returns the compact section records for all tasks within the given section. - * - * @param section The section in which to search for tasks. - * @return response - */ - public function findBySection($section, $params = array(), $options = array()) - { - $path = sprintf("/sections/%s/tasks", $section); - return $this->client->getCollection($path, $params, $options); + public function createSubtask($task_gid, $params = array(), $options = array()) { + /** Create a subtask + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/subtasks"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->post($path, $params, $options); } - /** - * Returns the compact list of tasks in a user's My Tasks list. The returned - * tasks will be in order within each assignee status group of `Inbox`, - * `Today`, and `Upcoming`. - * - * **Note:** tasks in `Later` have a different ordering in the Asana web app - * than the other assignee status groups; this endpoint will still return - * them in list order in `Later` (differently than they show up in Asana, - * but the same order as in Asana's mobile apps). - * - * **Note:** Access control is enforced for this endpoint as with all Asana - * API endpoints, meaning a user's private tasks will be filtered out if the - * API-authenticated user does not have access to them. - * - * **Note:** Both complete and incomplete tasks are returned by default - * unless they are filtered out (for example, setting `completed_since=now` - * will return only incomplete tasks, which is the default view for "My - * Tasks" in Asana.) - * - * @param user_task_list The user task list in which to search for tasks. - * @return response - */ - public function findByUserTaskList($userTaskList, $params = array(), $options = array()) - { - $path = sprintf("/user_task_lists/%s/tasks", $userTaskList); - return $this->client->getCollection($path, $params, $options); + public function createTask($params = array(), $options = array()) { + /** Create a task + * + * @param $params : + * @return response + */ + $path = "/tasks"; + return $this->client->post($path, $params, $options); } - /** - * Returns the compact task records for some filtered set of tasks. Use one - * or more of the parameters provided to filter the tasks returned. You must - * specify a `project`, `section`, `tag`, or `user_task_list` if you do not - * specify `assignee` and `workspace`. - * - * @return response - */ - public function findAll($params = array(), $options = array()) - { - return $this->client->getCollection("/tasks", $params, $options); + public function deleteTask($task_gid, $params = array(), $options = array()) { + /** Delete a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->delete($path, $params, $options); } - /** - * The search endpoint allows you to build complex queries to find and fetch exactly the data you need from Asana. For a more comprehensive description of all the query parameters and limitations of this endpoint, see our [long-form documentation](/developers/documentation/getting-started/search-api) for this feature. - * - * @param workspace The workspace or organization in which to search for tasks. - * @return response - */ - public function searchInWorkspace($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s/tasks/search", $workspace); - return $this->client->getCollection($path, $params, $options); + public function duplicateTask($task_gid, $params = array(), $options = array()) { + /** Duplicate a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/duplicate"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->post($path, $params, $options); } - /** - * Returns the compact representations of all of the dependencies of a task. - * - * @param task The task to get dependencies on. - * @return response - */ - public function dependencies($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/dependencies", $task); + public function getProjectTasks($project_gid, $params = array(), $options = array()) { + /** Get tasks from a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params : + * @return response + */ + $path = "/projects/{project_gid}/tasks"; + $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->get($path, $params, $options); } - /** - * Returns the compact representations of all of the dependents of a task. - * - * @param task The task to get dependents on. - * @return response - */ - public function dependents($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/dependents", $task); + public function getSectionTasks($section_gid, $params = array(), $options = array()) { + /** Get tasks from a section + * + * @param $section_gid string: (required) The globally unique identifier for the section. + * @param $params : + * @return response + */ + $path = "/sections/{section_gid}/tasks"; + $path = str_replace($path,"{section_gid}", $section_gid); return $this->client->get($path, $params, $options); } - /** - * Marks a set of tasks as dependencies of this task, if they are not - * already dependencies. *A task can have at most 15 dependencies.* - * - * @param task The task to add dependencies to. - * @return response - */ - public function addDependencies($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/addDependencies", $task); - return $this->client->post($path, $params, $options); - } - - /** - * Marks a set of tasks as dependents of this task, if they are not already - * dependents. *A task can have at most 30 dependents.* - * - * @param task The task to add dependents to. - * @return response - */ - public function addDependents($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/addDependents", $task); - return $this->client->post($path, $params, $options); + public function getSubTasks($task_gid, $params = array(), $options = array()) { + /** Get subtasks from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/subtasks"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->get($path, $params, $options); } - /** - * Unlinks a set of dependencies from this task. - * - * @param task The task to remove dependencies from. - * @return response - */ - public function removeDependencies($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/removeDependencies", $task); - return $this->client->post($path, $params, $options); + public function getTagTasks($tag_gid, $params = array(), $options = array()) { + /** Get tasks from a tag + * + * @param $tag_gid string: (required) Globally unique identifier for the tag. + * @param $params : + * @return response + */ + $path = "/tags/{tag_gid}/tasks"; + $path = str_replace($path,"{tag_gid}", $tag_gid); + return $this->client->get($path, $params, $options); } - /** - * Unlinks a set of dependents from this task. - * - * @param task The task to remove dependents from. - * @return response - */ - public function removeDependents($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/removeDependents", $task); - return $this->client->post($path, $params, $options); + public function getTask($task_gid, $params = array(), $options = array()) { + /** Get a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->get($path, $params, $options); } - /** - * Adds each of the specified followers to the task, if they are not already - * following. Returns the complete, updated record for the affected task. - * - * @param task The task to add followers to. - * @return response - */ - public function addFollowers($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/addFollowers", $task); - return $this->client->post($path, $params, $options); + public function getTaskDependencies($task_gid, $params = array(), $options = array()) { + /** Get dependencies from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/dependencies"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->get($path, $params, $options); } - /** - * Removes each of the specified followers from the task if they are - * following. Returns the complete, updated record for the affected task. - * - * @param task The task to remove followers from. - * @return response - */ - public function removeFollowers($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/removeFollowers", $task); - return $this->client->post($path, $params, $options); + public function getTaskDependents($task_gid, $params = array(), $options = array()) { + /** Get dependents from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/dependents"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->get($path, $params, $options); } - /** - * Returns a compact representation of all of the projects the task is in. - * - * @param task The task to get projects on. - * @return response - */ - public function projects($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/projects", $task); - return $this->client->getCollection($path, $params, $options); + public function getWorkspaceTasksSearch($workspace_gid, $params = array(), $options = array()) { + /** Search tasks in a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}/tasks/search"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->get($path, $params, $options); } - /** - * Adds the task to the specified project, in the optional location - * specified. If no location arguments are given, the task will be added to - * the end of the project. - * - * `addProject` can also be used to reorder a task within a project or section that - * already contains it. - * - * At most one of `insert_before`, `insert_after`, or `section` should be - * specified. Inserting into a section in an non-order-dependent way can be - * done by specifying `section`, otherwise, to insert within a section in a - * particular place, specify `insert_before` or `insert_after` and a task - * within the section to anchor the position of this task. - * - * Returns an empty data block. - * - * @param task The task to add to a project. - * @return response - */ - public function addProject($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/addProject", $task); - return $this->client->post($path, $params, $options); + public function queryTasks($params = array(), $options = array()) { + /** Get multiple tasks + * + * @param $params : + * @return response + */ + $path = "/tasks"; + return $this->client->get($path, $params, $options); } - /** - * Removes the task from the specified project. The task will still exist - * in the system, but it will not be in the project anymore. - * - * Returns an empty data block. - * - * @param task The task to remove from a project. - * @return response - */ - public function removeProject($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/removeProject", $task); + public function removeFollowerToTask($task_gid, $params = array(), $options = array()) { + /** Remove followers from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/removeFollowers"; + $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - /** - * Returns a compact representation of all of the tags the task has. - * - * @param task The task to get tags on. - * @return response - */ - public function tags($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/tags", $task); - return $this->client->getCollection($path, $params, $options); - } - - /** - * Adds a tag to a task. Returns an empty data block. - * - * @param task The task to add a tag to. - * @return response - */ - public function addTag($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/addTag", $task); + public function removeProjectFromTask($task_gid, $params = array(), $options = array()) { + /** Remove a project from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/removeProject"; + $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - /** - * Removes a tag from the task. Returns an empty data block. - * - * @param task The task to remove a tag from. - * @return response - */ - public function removeTag($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/removeTag", $task); + public function removeTagFromTask($task_gid, $params = array(), $options = array()) { + /** Remove a tag from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/removeTag"; + $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - /** - * Returns a compact representation of all of the subtasks of a task. - * - * @param task The task to get the subtasks of. - * @return response - */ - public function subtasks($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/subtasks", $task); - return $this->client->getCollection($path, $params, $options); - } - - /** - * Creates a new subtask and adds it to the parent task. Returns the full record - * for the newly created subtask. - * - * @param task The task to add a subtask to. - * @return response - */ - public function addSubtask($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/subtasks", $task); + public function removeTaskDependencies($task_gid, $params = array(), $options = array()) { + /** Unlink dependencies from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/removeDependencies"; + $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - /** - * Returns a compact representation of all of the stories on the task. - * - * @param task The task containing the stories to get. - * @return response - */ - public function stories($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/stories", $task); - return $this->client->getCollection($path, $params, $options); - } - - /** - * Adds a comment to a task. The comment will be authored by the - * currently authenticated user, and timestamped when the server receives - * the request. - * - * Returns the full record for the new story added to the task. - * - * @param task Globally unique identifier for the task. - * @return response - */ - public function addComment($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/stories", $task); + public function removeTaskDependents($task_gid, $params = array(), $options = array()) { + /** Unlink dependents from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}/removeDependents"; + $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - /** - * Insert or reorder tasks in a user's My Tasks list. If the task was not - * assigned to the owner of the user task list it will be reassigned when - * this endpoint is called. If neither `insert_before` nor `insert_after` - * are provided the task will be inserted at the top of the assignee's - * inbox. - * - * Returns an empty data block. - * - * @param user_task_list Globally unique identifier for the user task list. - * @return response - */ - public function insertInUserTaskList($userTaskList, $params = array(), $options = array()) - { - $path = sprintf("/user_task_lists/%s/tasks/insert", $userTaskList); - return $this->client->post($path, $params, $options); + public function updateTask($task_gid, $params = array(), $options = array()) { + /** Update a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params : + * @return response + */ + $path = "/tasks/{task_gid}"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/TeamMembershipsBase.php b/src/Asana/Resources/Gen/TeamMembershipsBase.php new file mode 100644 index 0000000..c38ce02 --- /dev/null +++ b/src/Asana/Resources/Gen/TeamMembershipsBase.php @@ -0,0 +1,60 @@ +client = $client; + } + + public function getTeamMembership($team_membership_path_gid, $params = array(), $options = array()) { + /** Get a team membership + * + * @param $team_membership_path_gid string: (required) + * @param $params : + * @return response + */ + $path = "/team_memberships/{team_membership_gid}"; + $path = str_replace($path,"{team_membership_path_gid}", $team_membership_path_gid); + return $this->client->get($path, $params, $options); + } + + public function getTeamMemberships($params = array(), $options = array()) { + /** Get team memberships + * + * @param $params : + * @return response + */ + $path = "/team_memberships"; + return $this->client->get($path, $params, $options); + } + + public function getTeamMembershipsForTeam($team_gid, $params = array(), $options = array()) { + /** Get memberships from a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params : + * @return response + */ + $path = "/teams/{team_gid}/team_memberships"; + $path = str_replace($path,"{team_gid}", $team_gid); + return $this->client->get($path, $params, $options); + } + + public function getTeamMembershipsForUser($user_gid, $params = array(), $options = array()) { + /** Get memberships from a user + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params : + * @return response + */ + $path = "/users/{user_gid}/team_memberships"; + $path = str_replace($path,"{user_gid}", $user_gid); + return $this->client->get($path, $params, $options); + } +} diff --git a/src/Asana/Resources/Gen/TeamsBase.php b/src/Asana/Resources/Gen/TeamsBase.php index 2775a67..15e44c0 100644 --- a/src/Asana/Resources/Gen/TeamsBase.php +++ b/src/Asana/Resources/Gen/TeamsBase.php @@ -2,96 +2,73 @@ namespace Asana\Resources\Gen; -/** - * A _team_ is used to group related projects and people together within an - * organization. Each project in an organization is associated with a team. -*/ -class TeamsBase -{ +class TeamsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Returns the full record for a single team. - * - * @param team Globally unique identifier for the team. - * @return response - */ - public function findById($team, $params = array(), $options = array()) - { - $path = sprintf("/teams/%s", $team); - return $this->client->get($path, $params, $options); - } - - /** - * Returns the compact records for all teams in the organization visible to - * the authorized user. - * - * @param organization Globally unique identifier for the workspace or organization. - * @return response - */ - public function findByOrganization($organization, $params = array(), $options = array()) - { - $path = sprintf("/organizations/%s/teams", $organization); - return $this->client->getCollection($path, $params, $options); + public function addUserToTeam($team_gid, $params = array(), $options = array()) { + /** Add a user to a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params : + * @return response + */ + $path = "/teams/{team_gid}/addUser"; + $path = str_replace($path,"{team_gid}", $team_gid); + return $this->client->post($path, $params, $options); } - /** - * Returns the compact records for all teams to which user is assigned. - * - * @param user An identifier for the user. Can be one of an email address, - * the globally unique identifier for the user, or the keyword `me` - * to indicate the current user making the request. - * @return response - */ - public function findByUser($user, $params = array(), $options = array()) - { - $path = sprintf("/users/%s/teams", $user); - return $this->client->getCollection($path, $params, $options); + public function getAllTeams($workspace_gid, $params = array(), $options = array()) { + /** Get teams in an organization + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/organizations/{workspace_gid}/teams"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->get($path, $params, $options); } - /** - * Returns the compact records for all users that are members of the team. - * - * @param team Globally unique identifier for the team. - * @return response - */ - public function users($team, $params = array(), $options = array()) - { - $path = sprintf("/teams/%s/users", $team); - return $this->client->getCollection($path, $params, $options); + public function getTeam($team_gid, $params = array(), $options = array()) { + /** Get a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params : + * @return response + */ + $path = "/teams/{team_gid}"; + $path = str_replace($path,"{team_gid}", $team_gid); + return $this->client->get($path, $params, $options); } - /** - * The user making this call must be a member of the team in order to add others. - * The user to add must exist in the same organization as the team in order to be added. - * The user to add can be referenced by their globally unique user ID or their email address. - * Returns the full user record for the added user. - * - * @param team Globally unique identifier for the team. - * @return response - */ - public function addUser($team, $params = array(), $options = array()) - { - $path = sprintf("/teams/%s/addUser", $team); - return $this->client->post($path, $params, $options); + public function getTeamsForUser($user_gid, $params = array(), $options = array()) { + /** Get teams for a user + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params : + * @return response + */ + $path = "/users/{user_gid}/teams"; + $path = str_replace($path,"{user_gid}", $user_gid); + return $this->client->get($path, $params, $options); } - /** - * The user to remove can be referenced by their globally unique user ID or their email address. - * Removes the user from the specified team. Returns an empty data record. - * - * @param team Globally unique identifier for the team. - * @return response - */ - public function removeUser($team, $params = array(), $options = array()) - { - $path = sprintf("/teams/%s/removeUser", $team); + public function removeUserFromTeam($team_gid, $params = array(), $options = array()) { + /** Remove a user from a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params : + * @return response + */ + $path = "/teams/{team_gid}/removeUser"; + $path = str_replace($path,"{team_gid}", $team_gid); return $this->client->post($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/TypeaheadBase.php b/src/Asana/Resources/Gen/TypeaheadBase.php new file mode 100644 index 0000000..cd01dba --- /dev/null +++ b/src/Asana/Resources/Gen/TypeaheadBase.php @@ -0,0 +1,26 @@ +client = $client; + } + + public function getTypeahead($workspace_gid, $params = array(), $options = array()) { + /** Get objects via typeahead + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}/typeahead"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->get($path, $params, $options); + } +} diff --git a/src/Asana/Resources/Gen/UserTaskListsBase.php b/src/Asana/Resources/Gen/UserTaskListsBase.php index 3d9fe6b..8f7e58c 100644 --- a/src/Asana/Resources/Gen/UserTaskListsBase.php +++ b/src/Asana/Resources/Gen/UserTaskListsBase.php @@ -2,80 +2,49 @@ namespace Asana\Resources\Gen; -/** - * A _user task list_ represents the tasks assigned to a particular user. It provides API access to a user's "My Tasks" view in Asana. - * - * A user's "My Tasks" represent all of the tasks assigned to that user. It is - * visually divided into regions based on the task's - * [`assignee_status`](/developers/api-reference/tasks#field-assignee_status) - * for Asana users to triage their tasks based on when they can address them. - * When building an integration it's worth noting that tasks with due dates will - * automatically move through `assignee_status` states as their due dates - * approach; read up on [task - * auto-promotion](/guide/help/fundamentals/my-tasks#gl-auto-promote) for more - * infomation. -*/ -class UserTaskListsBase -{ +class UserTaskListsBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Returns the full record for the user task list for the given user - * - * @param user An identifier for the user. Can be one of an email address, - * the globally unique identifier for the user, or the keyword `me` - * to indicate the current user making the request. - * @return response - */ - public function findByUser($user, $params = array(), $options = array()) - { - $path = sprintf("/users/%s/user_task_list", $user); + public function getUserTaskList($user_task_list_gid, $params = array(), $options = array()) { + /** Get a user task list + * + * @param $user_task_list_gid string: (required) Globally unique identifier for the user task list. + * @param $params : + * @return response + */ + $path = "/user_task_list/{user_task_list_gid}"; + $path = str_replace($path,"{user_task_list_gid}", $user_task_list_gid); return $this->client->get($path, $params, $options); } - /** - * Returns the full record for a user task list. - * - * @param user_task_list Globally unique identifier for the user task list. - * @return response - */ - public function findById($userTaskList, $params = array(), $options = array()) - { - $path = sprintf("/user_task_lists/%s", $userTaskList); + public function getUserTaskListTasks($user_task_list_gid, $params = array(), $options = array()) { + /** Get tasks from a user task list + * + * @param $user_task_list_gid string: (required) Globally unique identifier for the user task list. + * @param $params : + * @return response + */ + $path = "/user_task_lists/{user_task_list_gid}/tasks"; + $path = str_replace($path,"{user_task_list_gid}", $user_task_list_gid); return $this->client->get($path, $params, $options); } - /** - * Returns the compact list of tasks in a user's My Tasks list. The returned - * tasks will be in order within each assignee status group of `Inbox`, - * `Today`, and `Upcoming`. - * - * **Note:** tasks in `Later` have a different ordering in the Asana web app - * than the other assignee status groups; this endpoint will still return - * them in list order in `Later` (differently than they show up in Asana, - * but the same order as in Asana's mobile apps). - * - * **Note:** Access control is enforced for this endpoint as with all Asana - * API endpoints, meaning a user's private tasks will be filtered out if the - * API-authenticated user does not have access to them. - * - * **Note:** Both complete and incomplete tasks are returned by default - * unless they are filtered out (for example, setting `completed_since=now` - * will return only incomplete tasks, which is the default view for "My - * Tasks" in Asana.) - * - * @param user_task_list The user task list in which to search for tasks. - * @return response - */ - public function tasks($userTaskList, $params = array(), $options = array()) - { - $path = sprintf("/user_task_lists/%s/tasks", $userTaskList); - return $this->client->getCollection($path, $params, $options); + public function getUsersTaskList($user_gid, $params = array(), $options = array()) { + /** Get a user's task list + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params : + * @return response + */ + $path = "/users/{user_gid}/user_task_list"; + $path = str_replace($path,"{user_gid}", $user_gid); + return $this->client->get($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/UsersBase.php b/src/Asana/Resources/Gen/UsersBase.php index 34755ab..45363e9 100644 --- a/src/Asana/Resources/Gen/UsersBase.php +++ b/src/Asana/Resources/Gen/UsersBase.php @@ -2,85 +2,71 @@ namespace Asana\Resources\Gen; -/** - * A _user_ object represents an account in Asana that can be given access to - * various workspaces, projects, and tasks. - * - * Like other objects in the system, users are referred to by numerical IDs. - * However, the special string identifier `me` can be used anywhere - * a user ID is accepted, to refer to the current authenticated user. -*/ -class UsersBase -{ +class UsersBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Returns the full user record for the currently authenticated user. - * - * @return response - */ - public function me($params = array(), $options = array()) - { - return $this->client->get("/users/me", $params, $options); + public function getAllUsers($params = array(), $options = array()) { + /** Get multiple users + * + * @param $params : + * @return response + */ + $path = "/users"; + return $this->client->get($path, $params, $options); } - /** - * Returns the full user record for the single user with the provided ID. - * - * @param user An identifier for the user. Can be one of an email address, - * the globally unique identifier for the user, or the keyword `me` - * to indicate the current user making the request. - * @return response - */ - public function findById($user, $params = array(), $options = array()) - { - $path = sprintf("/users/%s", $user); + public function getUser($user_gid, $params = array(), $options = array()) { + /** Get a user + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params : + * @return response + */ + $path = "/users/{user_gid}"; + $path = str_replace($path,"{user_gid}", $user_gid); return $this->client->get($path, $params, $options); } - /** - * Returns all of a user's favorites in the given workspace, of the given type. - * Results are given in order (The same order as Asana's sidebar). - * - * @param user An identifier for the user. Can be one of an email address, - * the globally unique identifier for the user, or the keyword `me` - * to indicate the current user making the request. - * @return response - */ - public function getUserFavorites($user, $params = array(), $options = array()) - { - $path = sprintf("/users/%s/favorites", $user); - return $this->client->getCollection($path, $params, $options); + public function getUserFavorites($user_gid, $params = array(), $options = array()) { + /** Get a user's favorites + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params : + * @return response + */ + $path = "/users/{user_gid}/favorites"; + $path = str_replace($path,"{user_gid}", $user_gid); + return $this->client->get($path, $params, $options); } - /** - * Returns the user records for all users in the specified workspace or - * organization. - * - * @param workspace The workspace in which to get users. - * @return response - */ - public function findByWorkspace($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s/users", $workspace); - return $this->client->getCollection($path, $params, $options); + public function getUsersForTeam($team_gid, $params = array(), $options = array()) { + /** Get users in a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params : + * @return response + */ + $path = "/teams/{team_gid}/users"; + $path = str_replace($path,"{team_gid}", $team_gid); + return $this->client->get($path, $params, $options); } - /** - * Returns the user records for all users in all workspaces and organizations - * accessible to the authenticated user. Accepts an optional workspace ID - * parameter. - * - * @return response - */ - public function findAll($params = array(), $options = array()) - { - return $this->client->getCollection("/users", $params, $options); + public function getUsersInWorkspace($workspace_gid, $params = array(), $options = array()) { + /** Get users in a workspace or organization + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}/users"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->get($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/WebhooksBase.php b/src/Asana/Resources/Gen/WebhooksBase.php index fa9e9c7..6a0c2f4 100644 --- a/src/Asana/Resources/Gen/WebhooksBase.php +++ b/src/Asana/Resources/Gen/WebhooksBase.php @@ -2,122 +2,57 @@ namespace Asana\Resources\Gen; -/** - * Webhooks allow an application to be notified of changes. This is in addition - * to the ability to fetch those changes directly as - * [Events](/developers/api-reference/events) - in fact, Webhooks are just a way - * to receive Events via HTTP POST at the time they occur instead of polling for - * them. For services accessible via HTTP this is often vastly more convenient, - * and if events are not too frequent can be significantly more efficient. - * - * In both cases, however, changes are represented as Event objects - refer to - * the [Events documentation](/developers/api-reference/events) for more - * information on what data these events contain. - * - * **NOTE:** While Webhooks send arrays of Event objects to their target, the - * Event objects themselves contain *only IDs*, rather than the actual resource - * they are referencing. So while a normal event you receive via GET /events - * would look like this: - * - * {\ - * "resource": {\ - * "id": 1337,\ - * "resource_type": "task",\ - * "name": "My Task"\ - * },\ - * "parent": null,\ - * "created_at": "2013-08-21T18:20:37.972Z",\ - * "user": {\ - * "id": 1123,\ - * "resource_type": "user",\ - * "name": "Tom Bizarro"\ - * },\ - * "action": "changed",\ - * "type": "task"\ - * } - * - * In a Webhook payload you would instead receive this: - * - * {\ - * "resource": 1337,\ - * "parent": null,\ - * "created_at": "2013-08-21T18:20:37.972Z",\ - * "user": 1123,\ - * "action": "changed",\ - * "type": "task"\ - * } - * - * Webhooks themselves contain only the information necessary to deliver the - * events to the desired target as they are generated. -*/ -class WebhooksBase -{ +class WebhooksBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Establishing a webhook is a two-part process. First, a simple HTTP POST - * similar to any other resource creation. Since you could have multiple - * webhooks we recommend specifying a unique local id for each target. - * - * Next comes the confirmation handshake. When a webhook is created, we will - * send a test POST to the `target` with an `X-Hook-Secret` header as - * described in the - * [Resthooks Security documentation](http://resthooks.org/docs/security/). - * The target must respond with a `200 OK` and a matching `X-Hook-Secret` - * header to confirm that this webhook subscription is indeed expected. - * - * If you do not acknowledge the webhook's confirmation handshake it will - * fail to setup, and you will receive an error in response to your attempt - * to create it. This means you need to be able to receive and complete the - * webhook *while* the POST request is in-flight. - * - * @return response - */ - public function create($params = array(), $options = array()) - { - return $this->client->post("/webhooks", $params, $options); + public function createWebhook($params = array(), $options = array()) { + /** Establish a webhook + * + * @param $params : + * @return response + */ + $path = "/webhooks"; + return $this->client->post($path, $params, $options); } - /** - * Returns the compact representation of all webhooks your app has - * registered for the authenticated user in the given workspace. - * - * @return response - */ - public function getAll($params = array(), $options = array()) - { - return $this->client->getCollection("/webhooks", $params, $options); + public function deleteWebhook($webhook_gid, $params = array(), $options = array()) { + /** Delete a webhook + * + * @param $webhook_gid string: (required) Globally unique identifier for the webhook. + * @param $params : + * @return response + */ + $path = "/webhooks/{webhook_gid}"; + $path = str_replace($path,"{webhook_gid}", $webhook_gid); + return $this->client->delete($path, $params, $options); } - /** - * Returns the full record for the given webhook. - * - * @param webhook The webhook to get. - * @return response - */ - public function getById($webhook, $params = array(), $options = array()) - { - $path = sprintf("/webhooks/%s", $webhook); + public function getWebhook($webhook_gid, $params = array(), $options = array()) { + /** Get a webhook + * + * @param $webhook_gid string: (required) Globally unique identifier for the webhook. + * @param $params : + * @return response + */ + $path = "/webhooks/{webhook_gid}"; + $path = str_replace($path,"{webhook_gid}", $webhook_gid); return $this->client->get($path, $params, $options); } - /** - * This method permanently removes a webhook. Note that it may be possible - * to receive a request that was already in flight after deleting the - * webhook, but no further requests will be issued. - * - * @param webhook The webhook to delete. - * @return response - */ - public function deleteById($webhook, $params = array(), $options = array()) - { - $path = sprintf("/webhooks/%s", $webhook); - return $this->client->delete($path, $params, $options); + public function getWebhooks($params = array(), $options = array()) { + /** Get multiple webhooks + * + * @param $params : + * @return response + */ + $path = "/webhooks"; + return $this->client->get($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php new file mode 100644 index 0000000..763e2db --- /dev/null +++ b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php @@ -0,0 +1,50 @@ +client = $client; + } + + public function getWorkspaceMembership($workspace_membership_path_gid, $params = array(), $options = array()) { + /** Get a workspace membership + * + * @param $workspace_membership_path_gid string: (required) + * @param $params : + * @return response + */ + $path = "/workspace_memberships/{workspace_membership_gid}"; + $path = str_replace($path,"{workspace_membership_path_gid}", $workspace_membership_path_gid); + return $this->client->get($path, $params, $options); + } + + public function getWorkspaceMembershipsForUser($user_gid, $params = array(), $options = array()) { + /** Get workspace memberships for a user + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params : + * @return response + */ + $path = "/users/{user_gid}/workspace_memberships"; + $path = str_replace($path,"{user_gid}", $user_gid); + return $this->client->get($path, $params, $options); + } + + public function getWorkspaceMembershipsForWorkspace($workspace_gid, $params = array(), $options = array()) { + /** Get the workspace memberships for a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}/workspace_memberships"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->get($path, $params, $options); + } +} diff --git a/src/Asana/Resources/Gen/WorkspacesBase.php b/src/Asana/Resources/Gen/WorkspacesBase.php index bbd9628..ee640d4 100644 --- a/src/Asana/Resources/Gen/WorkspacesBase.php +++ b/src/Asana/Resources/Gen/WorkspacesBase.php @@ -2,111 +2,71 @@ namespace Asana\Resources\Gen; -/** - * A _workspace_ is the highest-level organizational unit in Asana. All projects - * and tasks have an associated workspace. - * - * An _organization_ is a special kind of workspace that represents a company. - * In an organization, you can group your projects into teams. You can read - * more about how organizations work on the Asana Guide. - * To tell if your workspace is an organization or not, check its - * `is_organization` property. - * - * Over time, we intend to migrate most workspaces into organizations and to - * release more organization-specific functionality. We may eventually deprecate - * using workspace-based APIs for organizations. Currently, and until after - * some reasonable grace period following any further announcements, you can - * still reference organizations in any `workspace` parameter. -*/ -class WorkspacesBase -{ +class WorkspacesBase { + /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - /** - * Returns the full workspace record for a single workspace. - * - * @param workspace Globally unique identifier for the workspace or organization. - * @return response - */ - public function findById($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s", $workspace); - return $this->client->get($path, $params, $options); - } - - /** - * Returns the compact records for all workspaces visible to the authorized user. - * - * @return response - */ - public function findAll($params = array(), $options = array()) - { - return $this->client->getCollection("/workspaces", $params, $options); + public function addUserToWorkspace($workspace_gid, $params = array(), $options = array()) { + /** Add a user to a workspace or organization + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}/addUser"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->post($path, $params, $options); } - /** - * A specific, existing workspace can be updated by making a PUT request on - * the URL for that workspace. Only the fields provided in the data block - * will be updated; any unspecified fields will remain unchanged. - * - * Currently the only field that can be modified for a workspace is its `name`. - * - * Returns the complete, updated workspace record. - * - * @param workspace The workspace to update. - * @return response - */ - public function update($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s", $workspace); - return $this->client->put($path, $params, $options); + public function getAllWorkspaces($params = array(), $options = array()) { + /** Get multiple workspaces + * + * @param $params : + * @return response + */ + $path = "/workspaces"; + return $this->client->get($path, $params, $options); } - /** - * Retrieves objects in the workspace based on an auto-completion/typeahead - * search algorithm. This feature is meant to provide results quickly, so do - * not rely on this API to provide extremely accurate search results. The - * result set is limited to a single page of results with a maximum size, - * so you won't be able to fetch large numbers of results. - * - * @param workspace The workspace to fetch objects from. - * @return response - */ - public function typeahead($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s/typeahead", $workspace); - return $this->client->getCollection($path, $params, $options); + public function getWorkspace($workspace_gid, $params = array(), $options = array()) { + /** Get a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->get($path, $params, $options); } - /** - * The user can be referenced by their globally unique user ID or their email address. - * Returns the full user record for the invited user. - * - * @param workspace The workspace or organization to invite the user to. - * @return response - */ - public function addUser($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s/addUser", $workspace); + public function removeUserToWorkspace($workspace_gid, $params = array(), $options = array()) { + /** Remove a user from a workspace or organization + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}/removeUser"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); return $this->client->post($path, $params, $options); } - /** - * The user making this call must be an admin in the workspace. - * Returns an empty data record. - * - * @param workspace The workspace or organization to invite the user to. - * @return response - */ - public function removeUser($workspace, $params = array(), $options = array()) - { - $path = sprintf("/workspaces/%s/removeUser", $workspace); - return $this->client->post($path, $params, $options); + public function updateWorkspace($workspace_gid, $params = array(), $options = array()) { + /** Update a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params : + * @return response + */ + $path = "/workspaces/{workspace_gid}"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Jobs.php b/src/Asana/Resources/Jobs.php index 37569b8..b1b7b6e 100644 --- a/src/Asana/Resources/Jobs.php +++ b/src/Asana/Resources/Jobs.php @@ -6,4 +6,15 @@ class Jobs extends JobsBase { + /** + * Returns the complete job record for a single job. + * + * @param job The job to get. + * @return response + */ + public function findById($job, $params = array(), $options = array()) + { + $path = sprintf("/jobs/%s", $job); + return $this->client->get($path, $params, $options); + } } diff --git a/src/Asana/Resources/OrganizationExports.php b/src/Asana/Resources/OrganizationExports.php index 50a9151..939f855 100644 --- a/src/Asana/Resources/OrganizationExports.php +++ b/src/Asana/Resources/OrganizationExports.php @@ -6,4 +6,26 @@ class OrganizationExports extends OrganizationExportsBase { + /** + * Returns details of a previously-requested Organization export. + * + * @param organization_export Globally unique identifier for the Organization export. + * @return response + */ + public function findById($organizationExport, $params = array(), $options = array()) + { + $path = sprintf("/organization_exports/%s", $organizationExport); + return $this->client->get($path, $params, $options); + } + + /** + * This method creates a request to export an Organization. Asana will complete the export at some + * point after you create the request. + * + * @return response + */ + public function create($params = array(), $options = array()) + { + return $this->client->post("/organization_exports", $params, $options); + } } diff --git a/src/Asana/Resources/PortfolioMemberships.php b/src/Asana/Resources/PortfolioMemberships.php index 205ebac..49ca0ef 100644 --- a/src/Asana/Resources/PortfolioMemberships.php +++ b/src/Asana/Resources/PortfolioMemberships.php @@ -6,4 +6,38 @@ class PortfolioMemberships extends PortfolioMembershipsBase { + /** + * Returns the compact portfolio membership records for the portfolio. You must + * specify `portfolio`, `portfolio` and `user`, or `workspace` and `user`. + * + * @return response + */ + public function findAll($params = array(), $options = array()) + { + return $this->client->getCollection("/portfolio_memberships", $params, $options); + } + + /** + * Returns the compact portfolio membership records for the portfolio. + * + * @param portfolio The portfolio for which to fetch memberships. + * @return response + */ + public function findByPortfolio($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s/portfolio_memberships", $portfolio); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the portfolio membership record. + * + * @param portfolio_membership Globally unique identifier for the portfolio membership. + * @return response + */ + public function findById($portfolioMembership, $params = array(), $options = array()) + { + $path = sprintf("/portfolio_memberships/%s", $portfolioMembership); + return $this->client->get($path, $params, $options); + } } diff --git a/src/Asana/Resources/Portfolios.php b/src/Asana/Resources/Portfolios.php index 0029cbd..1ebf02a 100644 --- a/src/Asana/Resources/Portfolios.php +++ b/src/Asana/Resources/Portfolios.php @@ -6,4 +6,175 @@ class Portfolios extends PortfoliosBase { + /** + * Creates a new portfolio in the given workspace with the supplied name. + * + * Note that portfolios created in the Asana UI may have some state + * (like the "Priority" custom field) which is automatically added to the + * portfolio when it is created. Portfolios created via our API will **not** + * be created with the same initial state to allow integrations to create + * their own starting state on a portfolio. + * + * @return response + */ + public function create($params = array(), $options = array()) + { + return $this->client->post("/portfolios", $params, $options); + } + + /** + * Returns the complete record for a single portfolio. + * + * @param portfolio The portfolio to get. + * @return response + */ + public function findById($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s", $portfolio); + return $this->client->get($path, $params, $options); + } + + /** + * An existing portfolio can be updated by making a PUT request on the + * URL for that portfolio. Only the fields provided in the `data` block will be + * updated; any unspecified fields will remain unchanged. + * + * Returns the complete updated portfolio record. + * + * @param portfolio The portfolio to update. + * @return response + */ + public function update($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s", $portfolio); + return $this->client->put($path, $params, $options); + } + + /** + * An existing portfolio can be deleted by making a DELETE request + * on the URL for that portfolio. + * + * Returns an empty data record. + * + * @param portfolio The portfolio to delete. + * @return response + */ + public function delete($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s", $portfolio); + return $this->client->delete($path, $params, $options); + } + + /** + * Returns a list of the portfolios in compact representation that are owned + * by the current API user. + * + * @return response + */ + public function findAll($params = array(), $options = array()) + { + return $this->client->getCollection("/portfolios", $params, $options); + } + + /** + * Get a list of the items in compact form in a portfolio. + * + * @param portfolio The portfolio from which to get the list of items. + * @return response + */ + public function getItems($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s/items", $portfolio); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Add an item to a portfolio. + * + * Returns an empty data block. + * + * @param portfolio The portfolio to which to add an item. + * @return response + */ + public function addItem($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s/addItem", $portfolio); + return $this->client->post($path, $params, $options); + } + + /** + * Remove an item to a portfolio. + * + * Returns an empty data block. + * + * @param portfolio The portfolio from which to remove the item. + * @return response + */ + public function removeItem($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s/removeItem", $portfolio); + return $this->client->post($path, $params, $options); + } + + /** + * Adds the specified list of users as members of the portfolio. Returns the updated portfolio record. + * + * @param portfolio The portfolio to add members to. + * @return response + */ + public function addMembers($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s/addMembers", $portfolio); + return $this->client->post($path, $params, $options); + } + + /** + * Removes the specified list of members from the portfolio. Returns the updated portfolio record. + * + * @param portfolio The portfolio to remove members from. + * @return response + */ + public function removeMembers($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s/removeMembers", $portfolio); + return $this->client->post($path, $params, $options); + } + + /** + * Get the custom field settings on a portfolio. + * + * @param portfolio The portfolio from which to get the custom field settings. + * @return response + */ + public function customFieldSettings($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s/custom_field_settings", $portfolio); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Create a new custom field setting on the portfolio. Returns the full + * record for the new custom field setting. + * + * @param portfolio The portfolio onto which to add the custom field. + * @return response + */ + public function addCustomFieldSetting($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s/addCustomFieldSetting", $portfolio); + return $this->client->post($path, $params, $options); + } + + /** + * Remove a custom field setting on the portfolio. Returns an empty data + * block. + * + * @param portfolio The portfolio from which to remove the custom field. + * @return response + */ + public function removeCustomFieldSetting($portfolio, $params = array(), $options = array()) + { + $path = sprintf("/portfolios/%s/removeCustomFieldSetting", $portfolio); + return $this->client->post($path, $params, $options); + } } diff --git a/src/Asana/Resources/ProjectMemberships.php b/src/Asana/Resources/ProjectMemberships.php index 19d9671..e3ed865 100644 --- a/src/Asana/Resources/ProjectMemberships.php +++ b/src/Asana/Resources/ProjectMemberships.php @@ -6,4 +6,35 @@ class ProjectMemberships extends ProjectMembershipsBase { + /** + * @param Asana/Client client The client instance + */ + public function __construct($client) + { + $this->client = $client; + } + + /** + * Returns the compact project membership records for the project. + * + * @param project The project for which to fetch memberships. + * @return response + */ + public function findByProject($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/project_memberships", $project); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the project membership record. + * + * @param project_membership Globally unique identifier for the project membership. + * @return response + */ + public function findById($projectMembership, $params = array(), $options = array()) + { + $path = sprintf("/project_memberships/%s", $projectMembership); + return $this->client->get($path, $params, $options); + } } diff --git a/src/Asana/Resources/ProjectStatuses.php b/src/Asana/Resources/ProjectStatuses.php index ac51e10..13068f5 100644 --- a/src/Asana/Resources/ProjectStatuses.php +++ b/src/Asana/Resources/ProjectStatuses.php @@ -10,4 +10,64 @@ public function create($project, $params = array(), $options = array()) { return $this->createInProject($project, $params, $options); } + + /** + * @param Asana/Client client The client instance + */ + public function __construct($client) + { + $this->client = $client; + } + + /** + * Creates a new status update on the project. + * + * Returns the full record of the newly created project status update. + * + * @param project The project on which to create a status update. + * @return response + */ + public function createInProject($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/project_statuses", $project); + return $this->client->post($path, $params, $options); + } + + /** + * Returns the compact project status update records for all updates on the project. + * + * @param project The project to find status updates for. + * @return response + */ + public function findByProject($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/project_statuses", $project); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the complete record for a single status update. + * + * @param project-status The project status update to get. + * @return response + */ + public function findById($projectStatus, $params = array(), $options = array()) + { + $path = sprintf("/project_statuses/%s", $projectStatus); + return $this->client->get($path, $params, $options); + } + + /** + * Deletes a specific, existing project status update. + * + * Returns an empty data record. + * + * @param project-status The project status update to delete. + * @return response + */ + public function delete($projectStatus, $params = array(), $options = array()) + { + $path = sprintf("/project_statuses/%s", $projectStatus); + return $this->client->delete($path, $params, $options); + } } diff --git a/src/Asana/Resources/Projects.php b/src/Asana/Resources/Projects.php index 0d7d4dc..3fb3dc2 100644 --- a/src/Asana/Resources/Projects.php +++ b/src/Asana/Resources/Projects.php @@ -6,4 +6,234 @@ class Projects extends ProjectsBase { + /** + * Creates a new project in a workspace or team. + * + * Every project is required to be created in a specific workspace or + * organization, and this cannot be changed once set. Note that you can use + * the `workspace` parameter regardless of whether or not it is an + * organization. + * + * If the workspace for your project _is_ an organization, you must also + * supply a `team` to share the project with. + * + * Returns the full record of the newly created project. + * + * @return response + */ + public function create($params = array(), $options = array()) + { + return $this->client->post("/projects", $params, $options); + } + + /** + * If the workspace for your project _is_ an organization, you must also + * supply a `team` to share the project with. + * + * Returns the full record of the newly created project. + * + * @param workspace The workspace or organization to create the project in. + * @return response + */ + public function createInWorkspace($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s/projects", $workspace); + return $this->client->post($path, $params, $options); + } + + /** + * Creates a project shared with the given team. + * + * Returns the full record of the newly created project. + * + * @param team The team to create the project in. + * @return response + */ + public function createInTeam($team, $params = array(), $options = array()) + { + $path = sprintf("/teams/%s/projects", $team); + return $this->client->post($path, $params, $options); + } + + /** + * Returns the complete project record for a single project. + * + * @param project The project to get. + * @return response + */ + public function findById($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s", $project); + return $this->client->get($path, $params, $options); + } + + /** + * A specific, existing project can be updated by making a PUT request on the + * URL for that project. Only the fields provided in the `data` block will be + * updated; any unspecified fields will remain unchanged. + * + * When using this method, it is best to specify only those fields you wish + * to change, or else you may overwrite changes made by another user since + * you last retrieved the task. + * + * Returns the complete updated project record. + * + * @param project The project to update. + * @return response + */ + public function update($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s", $project); + return $this->client->put($path, $params, $options); + } + + /** + * A specific, existing project can be deleted by making a DELETE request + * on the URL for that project. + * + * Returns an empty data record. + * + * @param project The project to delete. + * @return response + */ + public function delete($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s", $project); + return $this->client->delete($path, $params, $options); + } + + /** + * Creates and returns a job that will asynchronously handle the duplication. + * + * @param project The project to duplicate. + * @return response + */ + public function duplicateProject($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/duplicate", $project); + return $this->client->post($path, $params, $options); + } + + /** + * Returns the compact project records for some filtered set of projects. + * Use one or more of the parameters provided to filter the projects returned. + * + * @return response + */ + public function findAll($params = array(), $options = array()) + { + return $this->client->getCollection("/projects", $params, $options); + } + + /** + * Returns the compact project records for all projects in the workspace. + * + * @param workspace The workspace or organization to find projects in. + * @return response + */ + public function findByWorkspace($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s/projects", $workspace); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the compact project records for all projects in the team. + * + * @param team The team to find projects in. + * @return response + */ + public function findByTeam($team, $params = array(), $options = array()) + { + $path = sprintf("/teams/%s/projects", $team); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the compact task records for all tasks within the given project, + * ordered by their priority within the project. Tasks can exist in more than one project at a time. + * + * @param project The project in which to search for tasks. + * @return response + */ + public function tasks($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/tasks", $project); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if + * the users are not already members of the project they will also become members as a result of this operation. + * Returns the updated project record. + * + * @param project The project to add followers to. + * @return response + */ + public function addFollowers($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/addFollowers", $project); + return $this->client->post($path, $params, $options); + } + + /** + * Removes the specified list of users from following the project, this will not affect project membership status. + * Returns the updated project record. + * + * @param project The project to remove followers from. + * @return response + */ + public function removeFollowers($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/removeFollowers", $project); + return $this->client->post($path, $params, $options); + } + + /** + * Adds the specified list of users as members of the project. Returns the updated project record. + * + * @param project The project to add members to. + * @return response + */ + public function addMembers($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/addMembers", $project); + return $this->client->post($path, $params, $options); + } + + /** + * Removes the specified list of members from the project. Returns the updated project record. + * + * @param project The project to remove members from. + * @return response + */ + public function removeMembers($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/removeMembers", $project); + return $this->client->post($path, $params, $options); + } + + /** + * Create a new custom field setting on the project. + * + * @param project The project to associate the custom field with + * @return response + */ + public function addCustomFieldSetting($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/addCustomFieldSetting", $project); + return $this->client->post($path, $params, $options); + } + + /** + * Remove a custom field setting on the project. + * + * @param project The project to associate the custom field with + * @return response + */ + public function removeCustomFieldSetting($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/removeCustomFieldSetting", $project); + return $this->client->post($path, $params, $options); + } } diff --git a/src/Asana/Resources/Sections.php b/src/Asana/Resources/Sections.php index 269d610..28b2bd0 100644 --- a/src/Asana/Resources/Sections.php +++ b/src/Asana/Resources/Sections.php @@ -6,4 +6,116 @@ class Sections extends SectionsBase { + /** + * Creates a new section in a project. + * + * Returns the full record of the newly created section. + * + * @param project The project to create the section in + * @return response + */ + public function createInProject($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/sections", $project); + return $this->client->post($path, $params, $options); + } + + /** + * Returns the compact records for all sections in the specified project. + * + * @param project The project to get sections from. + * @return response + */ + public function findByProject($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/sections", $project); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the complete record for a single section. + * + * @param section The section to get. + * @return response + */ + public function findById($section, $params = array(), $options = array()) + { + $path = sprintf("/sections/%s", $section); + return $this->client->get($path, $params, $options); + } + + /** + * A specific, existing section can be updated by making a PUT request on + * the URL for that project. Only the fields provided in the `data` block + * will be updated; any unspecified fields will remain unchanged. (note that + * at this time, the only field that can be updated is the `name` field.) + * + * When using this method, it is best to specify only those fields you wish + * to change, or else you may overwrite changes made by another user since + * you last retrieved the task. + * + * Returns the complete updated section record. + * + * @param section The section to update. + * @return response + */ + public function update($section, $params = array(), $options = array()) + { + $path = sprintf("/sections/%s", $section); + return $this->client->put($path, $params, $options); + } + + /** + * A specific, existing section can be deleted by making a DELETE request + * on the URL for that section. + * + * Note that sections must be empty to be deleted. + * + * The last remaining section in a board view cannot be deleted. + * + * Returns an empty data block. + * + * @param section The section to delete. + * @return response + */ + public function delete($section, $params = array(), $options = array()) + { + $path = sprintf("/sections/%s", $section); + return $this->client->delete($path, $params, $options); + } + + /** + * Add a task to a specific, existing section. This will remove the task from other sections of the project. + * + * The task will be inserted at the top of a section unless an `insert_before` or `insert_after` parameter is declared. + * + * This does not work for separators (tasks with the `resource_subtype` of section). + * + * @param task The task to add to this section + * @return response + */ + public function addTask($task, $params = array(), $options = array()) + { + $path = sprintf("/sections/%s/addTask", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Move sections relative to each other in a board view. One of + * `before_section` or `after_section` is required. + * + * Sections cannot be moved between projects. + * + * At this point in time, moving sections is not supported in list views, only board views. + * + * Returns an empty data block. + * + * @param project The project in which to reorder the given section + * @return response + */ + public function insertInProject($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/sections/insert", $project); + return $this->client->post($path, $params, $options); + } } diff --git a/src/Asana/Resources/Stories.php b/src/Asana/Resources/Stories.php index 61bb32b..21eaf50 100644 --- a/src/Asana/Resources/Stories.php +++ b/src/Asana/Resources/Stories.php @@ -6,4 +6,69 @@ class Stories extends StoriesBase { + /** + * Returns the compact records for all stories on the task. + * + * @param task Globally unique identifier for the task. + * @return response + */ + public function findByTask($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/stories", $task); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the full record for a single story. + * + * @param story Globally unique identifier for the story. + * @return response + */ + public function findById($story, $params = array(), $options = array()) + { + $path = sprintf("/stories/%s", $story); + return $this->client->get($path, $params, $options); + } + + /** + * Adds a comment to a task. The comment will be authored by the + * currently authenticated user, and timestamped when the server receives + * the request. + * + * Returns the full record for the new story added to the task. + * + * @param task Globally unique identifier for the task. + * @return response + */ + public function createOnTask($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/stories", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Updates the story and returns the full record for the updated story. + * Only comment stories can have their text updated, and only comment stories and + * attachment stories can be pinned. Only one of `text` and `html_text` can be specified. + * + * @param story Globally unique identifier for the story. + * @return response + */ + public function update($story, $params = array(), $options = array()) + { + $path = sprintf("/stories/%s", $story); + return $this->client->put($path, $params, $options); + } + + /** + * Deletes a story. A user can only delete stories they have created. Returns an empty data record. + * + * @param story Globally unique identifier for the story. + * @return response + */ + public function delete($story, $params = array(), $options = array()) + { + $path = sprintf("/stories/%s", $story); + return $this->client->delete($path, $params, $options); + } } diff --git a/src/Asana/Resources/Tags.php b/src/Asana/Resources/Tags.php index d845f97..df86af4 100644 --- a/src/Asana/Resources/Tags.php +++ b/src/Asana/Resources/Tags.php @@ -18,4 +18,109 @@ public function getTasksWithTag($tag, $params = array(), $options = array()) $path = sprintf("/tags/%s/tasks", $tag); return $this->client->getCollection($path, $params, $options); } + + /** + * Creates a new tag in a workspace or organization. + * + * Every tag is required to be created in a specific workspace or + * organization, and this cannot be changed once set. Note that you can use + * the `workspace` parameter regardless of whether or not it is an + * organization. + * + * Returns the full record of the newly created tag. + * + * @return response + */ + public function create($params = array(), $options = array()) + { + return $this->client->post("/tags", $params, $options); + } + + /** + * Creates a new tag in a workspace or organization. + * + * Every tag is required to be created in a specific workspace or + * organization, and this cannot be changed once set. Note that you can use + * the `workspace` parameter regardless of whether or not it is an + * organization. + * + * Returns the full record of the newly created tag. + * + * @param workspace The workspace or organization to create the tag in. + * @return response + */ + public function createInWorkspace($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s/tags", $workspace); + return $this->client->post($path, $params, $options); + } + + /** + * Returns the complete tag record for a single tag. + * + * @param tag The tag to get. + * @return response + */ + public function findById($tag, $params = array(), $options = array()) + { + $path = sprintf("/tags/%s", $tag); + return $this->client->get($path, $params, $options); + } + + /** + * Updates the properties of a tag. Only the fields provided in the `data` + * block will be updated; any unspecified fields will remain unchanged. + * + * When using this method, it is best to specify only those fields you wish + * to change, or else you may overwrite changes made by another user since + * you last retrieved the task. + * + * Returns the complete updated tag record. + * + * @param tag The tag to update. + * @return response + */ + public function update($tag, $params = array(), $options = array()) + { + $path = sprintf("/tags/%s", $tag); + return $this->client->put($path, $params, $options); + } + + /** + * A specific, existing tag can be deleted by making a DELETE request + * on the URL for that tag. + * + * Returns an empty data record. + * + * @param tag The tag to delete. + * @return response + */ + public function delete($tag, $params = array(), $options = array()) + { + $path = sprintf("/tags/%s", $tag); + return $this->client->delete($path, $params, $options); + } + + /** + * Returns the compact tag records for some filtered set of tags. + * Use one or more of the parameters provided to filter the tags returned. + * + * @return response + */ + public function findAll($params = array(), $options = array()) + { + return $this->client->getCollection("/tags", $params, $options); + } + + /** + * Returns the compact tag records for all tags in the workspace. + * + * @param workspace The workspace or organization to find tags in. + * @return response + */ + public function findByWorkspace($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s/tags", $workspace); + return $this->client->getCollection($path, $params, $options); + } } diff --git a/src/Asana/Resources/Tasks.php b/src/Asana/Resources/Tasks.php index 21d524a..eb219e5 100644 --- a/src/Asana/Resources/Tasks.php +++ b/src/Asana/Resources/Tasks.php @@ -10,4 +10,451 @@ public function search($workspace, $params = array(), $options = array()) { return $this->searchInWorkspace($workspace, $params, $options); } + + /** + * Creating a new task is as easy as POSTing to the `/tasks` endpoint + * with a data block containing the fields you'd like to set on the task. + * Any unspecified fields will take on default values. + * + * Every task is required to be created in a specific workspace, and this + * workspace cannot be changed once set. The workspace need not be set + * explicitly if you specify `projects` or a `parent` task instead. + * + * `projects` can be a comma separated list of projects, or just a single + * project the task should belong to. + * + * @return response + */ + public function create($params = array(), $options = array()) + { + return $this->client->post("/tasks", $params, $options); + } + + /** + * Creating a new task is as easy as POSTing to the `/tasks` endpoint + * with a data block containing the fields you'd like to set on the task. + * Any unspecified fields will take on default values. + * + * Every task is required to be created in a specific workspace, and this + * workspace cannot be changed once set. The workspace need not be set + * explicitly if you specify a `project` or a `parent` task instead. + * + * @param workspace The workspace to create a task in. + * @return response + */ + public function createInWorkspace($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s/tasks", $workspace); + return $this->client->post($path, $params, $options); + } + + /** + * Returns the complete task record for a single task. + * + * @param task The task to get. + * @return response + */ + public function findById($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s", $task); + return $this->client->get($path, $params, $options); + } + + /** + * A specific, existing task can be updated by making a PUT request on the + * URL for that task. Only the fields provided in the `data` block will be + * updated; any unspecified fields will remain unchanged. + * + * When using this method, it is best to specify only those fields you wish + * to change, or else you may overwrite changes made by another user since + * you last retrieved the task. + * + * Returns the complete updated task record. + * + * @param task The task to update. + * @return response + */ + public function update($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s", $task); + return $this->client->put($path, $params, $options); + } + + /** + * A specific, existing task can be deleted by making a DELETE request on the + * URL for that task. Deleted tasks go into the "trash" of the user making + * the delete request. Tasks can be recovered from the trash within a period + * of 30 days; afterward they are completely removed from the system. + * + * Returns an empty data record. + * + * @param task The task to delete. + * @return response + */ + public function delete($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s", $task); + return $this->client->delete($path, $params, $options); + } + + /** + * Creates and returns a job that will asynchronously handle the duplication. + * + * @param task The task to duplicate. + * @return response + */ + public function duplicateTask($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/duplicate", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Returns the compact task records for all tasks within the given project, + * ordered by their priority within the project. + * + * @param project The project in which to search for tasks. + * @return response + */ + public function findByProject($project, $params = array(), $options = array()) + { + $path = sprintf("/projects/%s/tasks", $project); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the compact task records for all tasks with the given tag. + * + * @param tag The tag in which to search for tasks. + * @return response + */ + public function findByTag($tag, $params = array(), $options = array()) + { + $path = sprintf("/tags/%s/tasks", $tag); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Board view only: Returns the compact section records for all tasks within the given section. + * + * @param section The section in which to search for tasks. + * @return response + */ + public function findBySection($section, $params = array(), $options = array()) + { + $path = sprintf("/sections/%s/tasks", $section); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the compact list of tasks in a user's My Tasks list. The returned + * tasks will be in order within each assignee status group of `Inbox`, + * `Today`, and `Upcoming`. + * + * **Note:** tasks in `Later` have a different ordering in the Asana web app + * than the other assignee status groups; this endpoint will still return + * them in list order in `Later` (differently than they show up in Asana, + * but the same order as in Asana's mobile apps). + * + * **Note:** Access control is enforced for this endpoint as with all Asana + * API endpoints, meaning a user's private tasks will be filtered out if the + * API-authenticated user does not have access to them. + * + * **Note:** Both complete and incomplete tasks are returned by default + * unless they are filtered out (for example, setting `completed_since=now` + * will return only incomplete tasks, which is the default view for "My + * Tasks" in Asana.) + * + * @param user_task_list The user task list in which to search for tasks. + * @return response + */ + public function findByUserTaskList($userTaskList, $params = array(), $options = array()) + { + $path = sprintf("/user_task_lists/%s/tasks", $userTaskList); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the compact task records for some filtered set of tasks. Use one + * or more of the parameters provided to filter the tasks returned. You must + * specify a `project`, `section`, `tag`, or `user_task_list` if you do not + * specify `assignee` and `workspace`. + * + * @return response + */ + public function findAll($params = array(), $options = array()) + { + return $this->client->getCollection("/tasks", $params, $options); + } + + /** + * The search endpoint allows you to build complex queries to find and fetch exactly the data you need from Asana. For a more comprehensive description of all the query parameters and limitations of this endpoint, see our [long-form documentation](/developers/documentation/getting-started/search-api) for this feature. + * + * @param workspace The workspace or organization in which to search for tasks. + * @return response + */ + public function searchInWorkspace($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s/tasks/search", $workspace); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the compact representations of all of the dependencies of a task. + * + * @param task The task to get dependencies on. + * @return response + */ + public function dependencies($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/dependencies", $task); + return $this->client->get($path, $params, $options); + } + + /** + * Returns the compact representations of all of the dependents of a task. + * + * @param task The task to get dependents on. + * @return response + */ + public function dependents($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/dependents", $task); + return $this->client->get($path, $params, $options); + } + + /** + * Marks a set of tasks as dependencies of this task, if they are not + * already dependencies. *A task can have at most 15 dependencies.* + * + * @param task The task to add dependencies to. + * @return response + */ + public function addDependencies($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/addDependencies", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Marks a set of tasks as dependents of this task, if they are not already + * dependents. *A task can have at most 30 dependents.* + * + * @param task The task to add dependents to. + * @return response + */ + public function addDependents($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/addDependents", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Unlinks a set of dependencies from this task. + * + * @param task The task to remove dependencies from. + * @return response + */ + public function removeDependencies($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/removeDependencies", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Unlinks a set of dependents from this task. + * + * @param task The task to remove dependents from. + * @return response + */ + public function removeDependents($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/removeDependents", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Adds each of the specified followers to the task, if they are not already + * following. Returns the complete, updated record for the affected task. + * + * @param task The task to add followers to. + * @return response + */ + public function addFollowers($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/addFollowers", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Removes each of the specified followers from the task if they are + * following. Returns the complete, updated record for the affected task. + * + * @param task The task to remove followers from. + * @return response + */ + public function removeFollowers($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/removeFollowers", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Returns a compact representation of all of the projects the task is in. + * + * @param task The task to get projects on. + * @return response + */ + public function projects($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/projects", $task); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Adds the task to the specified project, in the optional location + * specified. If no location arguments are given, the task will be added to + * the end of the project. + * + * `addProject` can also be used to reorder a task within a project or section that + * already contains it. + * + * At most one of `insert_before`, `insert_after`, or `section` should be + * specified. Inserting into a section in an non-order-dependent way can be + * done by specifying `section`, otherwise, to insert within a section in a + * particular place, specify `insert_before` or `insert_after` and a task + * within the section to anchor the position of this task. + * + * Returns an empty data block. + * + * @param task The task to add to a project. + * @return response + */ + public function addProject($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/addProject", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Removes the task from the specified project. The task will still exist + * in the system, but it will not be in the project anymore. + * + * Returns an empty data block. + * + * @param task The task to remove from a project. + * @return response + */ + public function removeProject($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/removeProject", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Returns a compact representation of all of the tags the task has. + * + * @param task The task to get tags on. + * @return response + */ + public function tags($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/tags", $task); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Adds a tag to a task. Returns an empty data block. + * + * @param task The task to add a tag to. + * @return response + */ + public function addTag($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/addTag", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Removes a tag from the task. Returns an empty data block. + * + * @param task The task to remove a tag from. + * @return response + */ + public function removeTag($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/removeTag", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Returns a compact representation of all of the subtasks of a task. + * + * @param task The task to get the subtasks of. + * @return response + */ + public function subtasks($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/subtasks", $task); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Creates a new subtask and adds it to the parent task. Returns the full record + * for the newly created subtask. + * + * @param task The task to add a subtask to. + * @return response + */ + public function addSubtask($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/subtasks", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Returns a compact representation of all of the stories on the task. + * + * @param task The task containing the stories to get. + * @return response + */ + public function stories($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/stories", $task); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Adds a comment to a task. The comment will be authored by the + * currently authenticated user, and timestamped when the server receives + * the request. + * + * Returns the full record for the new story added to the task. + * + * @param task Globally unique identifier for the task. + * @return response + */ + public function addComment($task, $params = array(), $options = array()) + { + $path = sprintf("/tasks/%s/stories", $task); + return $this->client->post($path, $params, $options); + } + + /** + * Insert or reorder tasks in a user's My Tasks list. If the task was not + * assigned to the owner of the user task list it will be reassigned when + * this endpoint is called. If neither `insert_before` nor `insert_after` + * are provided the task will be inserted at the top of the assignee's + * inbox. + * + * Returns an empty data block. + * + * @param user_task_list Globally unique identifier for the user task list. + * @return response + */ + public function insertInUserTaskList($userTaskList, $params = array(), $options = array()) + { + $path = sprintf("/user_task_lists/%s/tasks/insert", $userTaskList); + return $this->client->post($path, $params, $options); + } } diff --git a/src/Asana/Resources/Teams.php b/src/Asana/Resources/Teams.php index 68a4d2c..084a606 100644 --- a/src/Asana/Resources/Teams.php +++ b/src/Asana/Resources/Teams.php @@ -6,4 +6,82 @@ class Teams extends TeamsBase { + /** + * Returns the full record for a single team. + * + * @param team Globally unique identifier for the team. + * @return response + */ + public function findById($team, $params = array(), $options = array()) + { + $path = sprintf("/teams/%s", $team); + return $this->client->get($path, $params, $options); + } + + /** + * Returns the compact records for all teams in the organization visible to + * the authorized user. + * + * @param organization Globally unique identifier for the workspace or organization. + * @return response + */ + public function findByOrganization($organization, $params = array(), $options = array()) + { + $path = sprintf("/organizations/%s/teams", $organization); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the compact records for all teams to which user is assigned. + * + * @param user An identifier for the user. Can be one of an email address, + * the globally unique identifier for the user, or the keyword `me` + * to indicate the current user making the request. + * @return response + */ + public function findByUser($user, $params = array(), $options = array()) + { + $path = sprintf("/users/%s/teams", $user); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the compact records for all users that are members of the team. + * + * @param team Globally unique identifier for the team. + * @return response + */ + public function users($team, $params = array(), $options = array()) + { + $path = sprintf("/teams/%s/users", $team); + return $this->client->getCollection($path, $params, $options); + } + + /** + * The user making this call must be a member of the team in order to add others. + * The user to add must exist in the same organization as the team in order to be added. + * The user to add can be referenced by their globally unique user ID or their email address. + * Returns the full user record for the added user. + * + * @param team Globally unique identifier for the team. + * @return response + */ + public function addUser($team, $params = array(), $options = array()) + { + $path = sprintf("/teams/%s/addUser", $team); + return $this->client->post($path, $params, $options); + } + + /** + * The user to remove can be referenced by their globally unique user ID or their email address. + * Removes the user from the specified team. Returns an empty data record. + * + * @param team Globally unique identifier for the team. + * @return response + */ + public function removeUser($team, $params = array(), $options = array()) + { + $path = sprintf("/teams/%s/removeUser", $team); + return $this->client->post($path, $params, $options); + } } diff --git a/src/Asana/Resources/UserTaskLists.php b/src/Asana/Resources/UserTaskLists.php index 8c1cdb1..9b62003 100644 --- a/src/Asana/Resources/UserTaskLists.php +++ b/src/Asana/Resources/UserTaskLists.php @@ -6,4 +6,57 @@ class UserTaskLists extends UserTaskListsBase { + /** + * Returns the full record for the user task list for the given user + * + * @param user An identifier for the user. Can be one of an email address, + * the globally unique identifier for the user, or the keyword `me` + * to indicate the current user making the request. + * @return response + */ + public function findByUser($user, $params = array(), $options = array()) + { + $path = sprintf("/users/%s/user_task_list", $user); + return $this->client->get($path, $params, $options); + } + + /** + * Returns the full record for a user task list. + * + * @param user_task_list Globally unique identifier for the user task list. + * @return response + */ + public function findById($userTaskList, $params = array(), $options = array()) + { + $path = sprintf("/user_task_lists/%s", $userTaskList); + return $this->client->get($path, $params, $options); + } + + /** + * Returns the compact list of tasks in a user's My Tasks list. The returned + * tasks will be in order within each assignee status group of `Inbox`, + * `Today`, and `Upcoming`. + * + * **Note:** tasks in `Later` have a different ordering in the Asana web app + * than the other assignee status groups; this endpoint will still return + * them in list order in `Later` (differently than they show up in Asana, + * but the same order as in Asana's mobile apps). + * + * **Note:** Access control is enforced for this endpoint as with all Asana + * API endpoints, meaning a user's private tasks will be filtered out if the + * API-authenticated user does not have access to them. + * + * **Note:** Both complete and incomplete tasks are returned by default + * unless they are filtered out (for example, setting `completed_since=now` + * will return only incomplete tasks, which is the default view for "My + * Tasks" in Asana.) + * + * @param user_task_list The user task list in which to search for tasks. + * @return response + */ + public function tasks($userTaskList, $params = array(), $options = array()) + { + $path = sprintf("/user_task_lists/%s/tasks", $userTaskList); + return $this->client->getCollection($path, $params, $options); + } } diff --git a/src/Asana/Resources/Users.php b/src/Asana/Resources/Users.php index 539f35f..a53dc5c 100644 --- a/src/Asana/Resources/Users.php +++ b/src/Asana/Resources/Users.php @@ -6,4 +6,67 @@ class Users extends UsersBase { + /** + * Returns the full user record for the currently authenticated user. + * + * @return response + */ + public function me($params = array(), $options = array()) + { + return $this->client->get("/users/me", $params, $options); + } + + /** + * Returns the full user record for the single user with the provided ID. + * + * @param user An identifier for the user. Can be one of an email address, + * the globally unique identifier for the user, or the keyword `me` + * to indicate the current user making the request. + * @return response + */ + public function findById($user, $params = array(), $options = array()) + { + $path = sprintf("/users/%s", $user); + return $this->client->get($path, $params, $options); + } + + /** + * Returns all of a user's favorites in the given workspace, of the given type. + * Results are given in order (The same order as Asana's sidebar). + * + * @param user An identifier for the user. Can be one of an email address, + * the globally unique identifier for the user, or the keyword `me` + * to indicate the current user making the request. + * @return response + */ + public function getUserFavorites($user, $params = array(), $options = array()) + { + $path = sprintf("/users/%s/favorites", $user); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the user records for all users in the specified workspace or + * organization. + * + * @param workspace The workspace in which to get users. + * @return response + */ + public function findByWorkspace($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s/users", $workspace); + return $this->client->getCollection($path, $params, $options); + } + + /** + * Returns the user records for all users in all workspaces and organizations + * accessible to the authenticated user. Accepts an optional workspace ID + * parameter. + * + * @return response + */ + public function findAll($params = array(), $options = array()) + { + return $this->client->getCollection("/users", $params, $options); + } } diff --git a/src/Asana/Resources/Webhooks.php b/src/Asana/Resources/Webhooks.php index b94c4b0..49a06c1 100644 --- a/src/Asana/Resources/Webhooks.php +++ b/src/Asana/Resources/Webhooks.php @@ -6,4 +6,64 @@ class Webhooks extends WebhooksBase { + /** + * Establishing a webhook is a two-part process. First, a simple HTTP POST + * similar to any other resource creation. Since you could have multiple + * webhooks we recommend specifying a unique local id for each target. + * + * Next comes the confirmation handshake. When a webhook is created, we will + * send a test POST to the `target` with an `X-Hook-Secret` header as + * described in the + * [Resthooks Security documentation](http://resthooks.org/docs/security/). + * The target must respond with a `200 OK` and a matching `X-Hook-Secret` + * header to confirm that this webhook subscription is indeed expected. + * + * If you do not acknowledge the webhook's confirmation handshake it will + * fail to setup, and you will receive an error in response to your attempt + * to create it. This means you need to be able to receive and complete the + * webhook *while* the POST request is in-flight. + * + * @return response + */ + public function create($params = array(), $options = array()) + { + return $this->client->post("/webhooks", $params, $options); + } + + /** + * Returns the compact representation of all webhooks your app has + * registered for the authenticated user in the given workspace. + * + * @return response + */ + public function getAll($params = array(), $options = array()) + { + return $this->client->getCollection("/webhooks", $params, $options); + } + + /** + * Returns the full record for the given webhook. + * + * @param webhook The webhook to get. + * @return response + */ + public function getById($webhook, $params = array(), $options = array()) + { + $path = sprintf("/webhooks/%s", $webhook); + return $this->client->get($path, $params, $options); + } + + /** + * This method permanently removes a webhook. Note that it may be possible + * to receive a request that was already in flight after deleting the + * webhook, but no further requests will be issued. + * + * @param webhook The webhook to delete. + * @return response + */ + public function deleteById($webhook, $params = array(), $options = array()) + { + $path = sprintf("/webhooks/%s", $webhook); + return $this->client->delete($path, $params, $options); + } } diff --git a/src/Asana/Resources/Workspaces.php b/src/Asana/Resources/Workspaces.php index 4dcd963..f0bf51c 100644 --- a/src/Asana/Resources/Workspaces.php +++ b/src/Asana/Resources/Workspaces.php @@ -6,4 +6,85 @@ class Workspaces extends WorkspacesBase { + /** + * Returns the full workspace record for a single workspace. + * + * @param workspace Globally unique identifier for the workspace or organization. + * @return response + */ + public function findById($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s", $workspace); + return $this->client->get($path, $params, $options); + } + + /** + * Returns the compact records for all workspaces visible to the authorized user. + * + * @return response + */ + public function findAll($params = array(), $options = array()) + { + return $this->client->getCollection("/workspaces", $params, $options); + } + + /** + * A specific, existing workspace can be updated by making a PUT request on + * the URL for that workspace. Only the fields provided in the data block + * will be updated; any unspecified fields will remain unchanged. + * + * Currently the only field that can be modified for a workspace is its `name`. + * + * Returns the complete, updated workspace record. + * + * @param workspace The workspace to update. + * @return response + */ + public function update($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s", $workspace); + return $this->client->put($path, $params, $options); + } + + /** + * Retrieves objects in the workspace based on an auto-completion/typeahead + * search algorithm. This feature is meant to provide results quickly, so do + * not rely on this API to provide extremely accurate search results. The + * result set is limited to a single page of results with a maximum size, + * so you won't be able to fetch large numbers of results. + * + * @param workspace The workspace to fetch objects from. + * @return response + */ + public function typeahead($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s/typeahead", $workspace); + return $this->client->getCollection($path, $params, $options); + } + + /** + * The user can be referenced by their globally unique user ID or their email address. + * Returns the full user record for the invited user. + * + * @param workspace The workspace or organization to invite the user to. + * @return response + */ + public function addUser($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s/addUser", $workspace); + return $this->client->post($path, $params, $options); + } + + /** + * The user making this call must be an admin in the workspace. + * Returns an empty data record. + * + * @param workspace The workspace or organization to invite the user to. + * @return response + */ + public function removeUser($workspace, $params = array(), $options = array()) + { + $path = sprintf("/workspaces/%s/removeUser", $workspace); + return $this->client->post($path, $params, $options); + } } diff --git a/swagger_templates/api.mustache b/swagger_templates/api.mustache new file mode 100644 index 0000000..4122cda --- /dev/null +++ b/swagger_templates/api.mustache @@ -0,0 +1,36 @@ +client = $client; + } +{{#operation}} +{{#contents}} + + public function {{operationId}}({{#pathParams}}${{paramName}}, {{/pathParams}}$params = array(), $options = array()) { + /** {{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} + * + {{#pathParams}} + * @param ${{paramName}} {{dataType}}: {{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}{{#description}} {{{description}}}{{/description}} + {{/pathParams}} + * @param $params {{dataType}}: {{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}{{#description}} {{{description}}}{{/description}} + * @return response + */ + $path = "{{path}}"; + {{#pathParams}} + $path = str_replace($path,"{ {{~baseName~}} }", ${{paramName}}); + {{/pathParams}} + return $this->client->{{#neq "GET" httpMethod}}{{toLowerCase httpMethod}}{{/neq}}{{#eq "GET" httpMethod}}{{returnContainer}}{{/eq}}($path, $params, $options); + } +{{/contents}} +{{/operation}} +{{/operations}} +} diff --git a/swagger_templates/php-config.json b/swagger_templates/php-config.json new file mode 100644 index 0000000..30dbe2c --- /dev/null +++ b/swagger_templates/php-config.json @@ -0,0 +1,9 @@ +{ + "packageName" : "asana", + "templateDir": "swagger_templates", + "packagePath": "Asana", + "srcBasePath": "Resources", + "hideGenerationTimestamp": true, + "apiTests": false, + "apiDocs": false +} From 80795c89ef5ab02b8354769d8b47156fe0fdef49 Mon Sep 17 00:00:00 2001 From: Ross Grambo Date: Thu, 23 Jan 2020 16:44:41 -0800 Subject: [PATCH 02/11] Converted to used the openapi spec. --- src/Asana/Resources/Attachments.php | 4 + src/Asana/Resources/BatchAPI.php | 9 + src/Asana/Resources/CustomFieldSettings.php | 4 + src/Asana/Resources/CustomFields.php | 30 +- src/Asana/Resources/Events.php | 3 + src/Asana/Resources/Gen/AttachmentsBase.php | 66 +-- src/Asana/Resources/Gen/BatchAPIBase.php | 16 +- .../Resources/Gen/CustomFieldSettingsBase.php | 56 +-- src/Asana/Resources/Gen/CustomFieldsBase.php | 114 ++--- src/Asana/Resources/Gen/EventsBase.php | 16 +- src/Asana/Resources/Gen/ItemsBase.php | 50 -- src/Asana/Resources/Gen/JobsBase.php | 16 +- .../Resources/Gen/OrganizationExportsBase.php | 26 +- .../Gen/PortfolioMembershipsBase.php | 42 +- src/Asana/Resources/Gen/PortfoliosBase.php | 166 ++++--- .../Resources/Gen/ProjectMembershipsBase.php | 30 +- .../Resources/Gen/ProjectStatusesBase.php | 62 +-- src/Asana/Resources/Gen/ProjectsBase.php | 264 ++++++----- src/Asana/Resources/Gen/SectionsBase.php | 98 ++-- src/Asana/Resources/Gen/StoriesBase.php | 78 ++-- src/Asana/Resources/Gen/TagsBase.php | 104 ++--- src/Asana/Resources/Gen/TasksBase.php | 426 +++++++++--------- .../Resources/Gen/TeamMembershipsBase.php | 56 +-- src/Asana/Resources/Gen/TeamsBase.php | 82 ++-- src/Asana/Resources/Gen/TypeaheadBase.php | 20 +- src/Asana/Resources/Gen/UserTaskListsBase.php | 44 +- src/Asana/Resources/Gen/UsersBase.php | 82 ++-- src/Asana/Resources/Gen/WebhooksBase.php | 50 +- .../Gen/WorkspaceMembershipsBase.php | 44 +- src/Asana/Resources/Gen/WorkspacesBase.php | 76 ++-- src/Asana/Resources/Jobs.php | 2 + src/Asana/Resources/OrganizationExports.php | 4 + src/Asana/Resources/PortfolioMemberships.php | 6 + src/Asana/Resources/Portfolios.php | 26 ++ src/Asana/Resources/ProjectMemberships.php | 4 + src/Asana/Resources/ProjectStatuses.php | 8 + src/Asana/Resources/Projects.php | 44 +- src/Asana/Resources/Sections.php | 14 + src/Asana/Resources/Stories.php | 10 + src/Asana/Resources/Tags.php | 16 + src/Asana/Resources/Tasks.php | 70 ++- src/Asana/Resources/TeamMemberships.php | 9 + src/Asana/Resources/Teams.php | 12 + src/Asana/Resources/Typeahead.php | 9 + src/Asana/Resources/UserTaskLists.php | 6 + src/Asana/Resources/Users.php | 8 + src/Asana/Resources/Webhooks.php | 8 + src/Asana/Resources/WorkspaceMemberships.php | 9 + src/Asana/Resources/Workspaces.php | 12 + swagger_templates/api.mustache | 20 +- 50 files changed, 1338 insertions(+), 1093 deletions(-) create mode 100644 src/Asana/Resources/BatchAPI.php delete mode 100644 src/Asana/Resources/Gen/ItemsBase.php create mode 100644 src/Asana/Resources/TeamMemberships.php create mode 100644 src/Asana/Resources/Typeahead.php create mode 100644 src/Asana/Resources/WorkspaceMemberships.php diff --git a/src/Asana/Resources/Attachments.php b/src/Asana/Resources/Attachments.php index 50d6b95..4241db9 100644 --- a/src/Asana/Resources/Attachments.php +++ b/src/Asana/Resources/Attachments.php @@ -16,6 +16,8 @@ public function createOnTask($task, $content, $filename, $contentType, $options /** * Returns the full record for a single attachment. * + * @deprecated replace with getAttachment + * * @param attachment Globally unique identifier for the attachment. * @return response */ @@ -28,6 +30,8 @@ public function findById($attachment, $params = array(), $options = array()) /** * Returns the compact records for all attachments on the task. * + * @deprecated replace with getAttachmentsForTask + * * @param task Globally unique identifier for the task. * @return response */ diff --git a/src/Asana/Resources/BatchAPI.php b/src/Asana/Resources/BatchAPI.php new file mode 100644 index 0000000..2e02cb0 --- /dev/null +++ b/src/Asana/Resources/BatchAPI.php @@ -0,0 +1,9 @@ +client->post($path, $params, $options); } - /** - * Updates an existing enum option. Enum custom fields require at least one enabled enum option. - * - * Locked custom fields can only be updated by the user who locked the field. - * - * Returns the full record of the updated enum option. - * - * @param enum_option Globally unique identifier for the enum option. - * @return response - */ - public function updateEnumOption($enumOption, $params = array(), $options = array()) - { - $path = sprintf("/enum_options/%s", $enumOption); - return $this->client->put($path, $params, $options); - } - /** * Moves a particular enum option to be either before or after another specified enum option in the custom field. * * Locked custom fields can only be reordered by the user who locked the field. * + * @deprecated replace with insertEnumOptionForCustomField + * * @param custom_field Globally unique identifier for the custom field. * @return response */ diff --git a/src/Asana/Resources/Events.php b/src/Asana/Resources/Events.php index 2aa27ff..ad310c5 100644 --- a/src/Asana/Resources/Events.php +++ b/src/Asana/Resources/Events.php @@ -7,6 +7,9 @@ class Events extends EventsBase { + /** + * @deprecated replace with getEvents and include {"full_payload" = true} as an option + */ public function get($query = array(), $options = array()) { $options['full_payload'] = true; diff --git a/src/Asana/Resources/Gen/AttachmentsBase.php b/src/Asana/Resources/Gen/AttachmentsBase.php index 79a5966..59e2707 100644 --- a/src/Asana/Resources/Gen/AttachmentsBase.php +++ b/src/Asana/Resources/Gen/AttachmentsBase.php @@ -5,58 +5,58 @@ class AttachmentsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Upload an attachment + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function createAttachmentForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/attachments"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->post($path, $params, $options); + } + + /** Delete an attachment + * + * @param $attachment_gid string: (required) Globally unique identifier for the attachment. + * @param $params object + * @return response + */ public function deleteAttachment($attachment_gid, $params = array(), $options = array()) { - /** Delete an attachment - * - * @param $attachment_gid string: (required) Globally unique identifier for the attachment. - * @param $params : - * @return response - */ $path = "/attachments/{attachment_gid}"; $path = str_replace($path,"{attachment_gid}", $attachment_gid); return $this->client->delete($path, $params, $options); } + /** Get an attachment + * + * @param $attachment_gid string: (required) Globally unique identifier for the attachment. + * @param $params object + * @return response + */ public function getAttachment($attachment_gid, $params = array(), $options = array()) { - /** Get an attachment - * - * @param $attachment_gid string: (required) Globally unique identifier for the attachment. - * @param $params : - * @return response - */ $path = "/attachments/{attachment_gid}"; $path = str_replace($path,"{attachment_gid}", $attachment_gid); return $this->client->get($path, $params, $options); } + /** Get attachments for a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ public function getAttachmentsForTask($task_gid, $params = array(), $options = array()) { - /** Get attachments for a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ $path = "/tasks/{task_gid}/attachments"; $path = str_replace($path,"{task_gid}", $task_gid); - return $this->client->get($path, $params, $options); - } - - public function uploadAttachmentToTask($task_gid, $params = array(), $options = array()) { - /** Upload an attachment - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/attachments"; - $path = str_replace($path,"{task_gid}", $task_gid); - return $this->client->post($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/BatchAPIBase.php b/src/Asana/Resources/Gen/BatchAPIBase.php index f31a463..c6f78d4 100644 --- a/src/Asana/Resources/Gen/BatchAPIBase.php +++ b/src/Asana/Resources/Gen/BatchAPIBase.php @@ -5,19 +5,19 @@ class BatchAPIBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function batchRequest($params = array(), $options = array()) { - /** Submit parallel requests - * - * @param $params : - * @return response - */ + /** Submit parallel requests + * + * @param $params object + * @return response + */ + public function createBatchRequestAction($params = array(), $options = array()) { $path = "/batch"; return $this->client->post($path, $params, $options); } diff --git a/src/Asana/Resources/Gen/CustomFieldSettingsBase.php b/src/Asana/Resources/Gen/CustomFieldSettingsBase.php index 6902117..66bc99d 100644 --- a/src/Asana/Resources/Gen/CustomFieldSettingsBase.php +++ b/src/Asana/Resources/Gen/CustomFieldSettingsBase.php @@ -5,58 +5,34 @@ class CustomFieldSettingsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Get a portfolio's custom fields + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ public function getCustomFieldSettingsForPortfolio($portfolio_gid, $params = array(), $options = array()) { - /** Get a portfolio's custom fields - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ $path = "/portfolios/{portfolio_gid}/custom_field_settings"; $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } + /** Get a project's custom fields + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ public function getCustomFieldSettingsForProject($project_gid, $params = array(), $options = array()) { - /** Get a project's custom fields - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ $path = "/projects/{project_gid}/custom_field_settings"; $path = str_replace($path,"{project_gid}", $project_gid); - return $this->client->get($path, $params, $options); - } - - public function portfolioAddCustomFieldSetting($portfolio_gid, $params = array(), $options = array()) { - /** Add a custom field to a portfolio - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ - $path = "/portfolios/{portfolio_gid}/addCustomFieldSetting"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); - return $this->client->post($path, $params, $options); - } - - public function portfolioRemoveCustomFieldSetting($portfolio_gid, $params = array(), $options = array()) { - /** Remove a custom field from a portfolio - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ - $path = "/portfolios/{portfolio_gid}/removeCustomFieldSetting"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); - return $this->client->post($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/CustomFieldsBase.php b/src/Asana/Resources/Gen/CustomFieldsBase.php index c29fc83..db2b14e 100644 --- a/src/Asana/Resources/Gen/CustomFieldsBase.php +++ b/src/Asana/Resources/Gen/CustomFieldsBase.php @@ -5,102 +5,102 @@ class CustomFieldsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function addEnumOption($custom_field_gid, $params = array(), $options = array()) { - /** Create an enum option - * - * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. - * @param $params : - * @return response - */ - $path = "/custom_fields/{custom_field_gid}/enum_options"; - $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); + /** Create a custom field + * + * @param $params object + * @return response + */ + public function createCustomField($params = array(), $options = array()) { + $path = "/custom_fields"; return $this->client->post($path, $params, $options); } - public function createCustomField($params = array(), $options = array()) { - /** Create a custom field - * - * @param $params : - * @return response - */ - $path = "/custom_fields"; + /** Create an enum option + * + * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. + * @param $params object + * @return response + */ + public function createEnumOptionForCustomField($custom_field_gid, $params = array(), $options = array()) { + $path = "/custom_fields/{custom_field_gid}/enum_options"; + $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); return $this->client->post($path, $params, $options); } + /** Delete a custom field + * + * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. + * @param $params object + * @return response + */ public function deleteCustomField($custom_field_gid, $params = array(), $options = array()) { - /** Delete a custom field - * - * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. - * @param $params : - * @return response - */ $path = "/custom_fields/{custom_field_gid}"; $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); return $this->client->delete($path, $params, $options); } + /** Get a custom field + * + * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. + * @param $params object + * @return response + */ public function getCustomField($custom_field_gid, $params = array(), $options = array()) { - /** Get a custom field - * - * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. - * @param $params : - * @return response - */ $path = "/custom_fields/{custom_field_gid}"; $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); return $this->client->get($path, $params, $options); } - public function getCustomFieldsInWorkspace($workspace_gid, $params = array(), $options = array()) { - /** Get a workspace's custom fields - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ + /** Get a workspace's custom fields + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ + public function getCustomFieldsForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/custom_fields"; $path = str_replace($path,"{workspace_gid}", $workspace_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } - public function reorderEnumOption($custom_field_gid, $params = array(), $options = array()) { - /** Reorder a custom field's enum - * - * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. - * @param $params : - * @return response - */ + /** Reorder a custom field's enum + * + * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. + * @param $params object + * @return response + */ + public function insertEnumOptionForCustomField($custom_field_gid, $params = array(), $options = array()) { $path = "/custom_fields/{custom_field_gid}/enum_options/insert"; $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); return $this->client->post($path, $params, $options); } + /** Update a custom field + * + * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. + * @param $params object + * @return response + */ public function updateCustomField($custom_field_gid, $params = array(), $options = array()) { - /** Update a custom field - * - * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. - * @param $params : - * @return response - */ $path = "/custom_fields/{custom_field_gid}"; $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); return $this->client->put($path, $params, $options); } + /** Update an enum option + * + * @param $enum_option_gid string: (required) Globally unique identifier for the enum option. + * @param $params object + * @return response + */ public function updateEnumOption($enum_option_gid, $params = array(), $options = array()) { - /** Update an enum option - * - * @param $enum_option_gid string: (required) Globally unique identifier for the enum option. - * @param $params : - * @return response - */ $path = "/enum_options/{enum_option_gid}"; $path = str_replace($path,"{enum_option_gid}", $enum_option_gid); return $this->client->put($path, $params, $options); diff --git a/src/Asana/Resources/Gen/EventsBase.php b/src/Asana/Resources/Gen/EventsBase.php index a10f9ab..dcaee04 100644 --- a/src/Asana/Resources/Gen/EventsBase.php +++ b/src/Asana/Resources/Gen/EventsBase.php @@ -5,20 +5,20 @@ class EventsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Get events on a resource + * + * @param $params object + * @return response + */ public function getEvents($params = array(), $options = array()) { - /** Get events on a resource - * - * @param $params : - * @return response - */ $path = "/events"; - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/ItemsBase.php b/src/Asana/Resources/Gen/ItemsBase.php deleted file mode 100644 index d3acedf..0000000 --- a/src/Asana/Resources/Gen/ItemsBase.php +++ /dev/null @@ -1,50 +0,0 @@ -client = $client; - } - - public function addPortfolioItem($portfolio_gid, $params = array(), $options = array()) { - /** Add a portfolio item - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ - $path = "/portfolios/{portfolio_gid}/addItem"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); - return $this->client->post($path, $params, $options); - } - - public function getPortfolioItems($portfolio_gid, $params = array(), $options = array()) { - /** Get portfolio items - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ - $path = "/portfolios/{portfolio_gid}/items"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); - return $this->client->get($path, $params, $options); - } - - public function removePortfolioItem($portfolio_gid, $params = array(), $options = array()) { - /** Remove a portfolio item - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ - $path = "/portfolios/{portfolio_gid}/removeItem"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); - return $this->client->post($path, $params, $options); - } -} diff --git a/src/Asana/Resources/Gen/JobsBase.php b/src/Asana/Resources/Gen/JobsBase.php index 9469ea7..083cb61 100644 --- a/src/Asana/Resources/Gen/JobsBase.php +++ b/src/Asana/Resources/Gen/JobsBase.php @@ -5,20 +5,20 @@ class JobsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Get a job by id + * + * @param $job_gid string: (required) Globally unique identifier for the job. + * @param $params object + * @return response + */ public function getJob($job_gid, $params = array(), $options = array()) { - /** Get a job by id - * - * @param $job_gid string: (required) Globally unique identifier for the job. - * @param $params : - * @return response - */ $path = "/jobs/{job_gid}"; $path = str_replace($path,"{job_gid}", $job_gid); return $this->client->get($path, $params, $options); diff --git a/src/Asana/Resources/Gen/OrganizationExportsBase.php b/src/Asana/Resources/Gen/OrganizationExportsBase.php index 34e8074..9b50117 100644 --- a/src/Asana/Resources/Gen/OrganizationExportsBase.php +++ b/src/Asana/Resources/Gen/OrganizationExportsBase.php @@ -5,30 +5,30 @@ class OrganizationExportsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Create an organization export request + * + * @param $params object + * @return response + */ public function createOrganizationExport($params = array(), $options = array()) { - /** Create an organization export request - * - * @param $params : - * @return response - */ $path = "/organization_exports"; return $this->client->post($path, $params, $options); } + /** Get details on an org export request + * + * @param $organization_export_gid string: (required) Globally unique identifier for the organization export. + * @param $params object + * @return response + */ public function getOrganizationExport($organization_export_gid, $params = array(), $options = array()) { - /** Get details on an org export request - * - * @param $organization_export_gid string: (required) Globally unique identifier for the organization export. - * @param $params : - * @return response - */ $path = "/organization_exports/{organization_export_gid}"; $path = str_replace($path,"{organization_export_gid}", $organization_export_gid); return $this->client->get($path, $params, $options); diff --git a/src/Asana/Resources/Gen/PortfolioMembershipsBase.php b/src/Asana/Resources/Gen/PortfolioMembershipsBase.php index b06f122..c0b54dd 100644 --- a/src/Asana/Resources/Gen/PortfolioMembershipsBase.php +++ b/src/Asana/Resources/Gen/PortfolioMembershipsBase.php @@ -5,44 +5,44 @@ class PortfolioMembershipsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Get a portfolio membership + * + * @param $portfolio_membership_path_gid string: (required) + * @param $params object + * @return response + */ public function getPortfolioMembership($portfolio_membership_path_gid, $params = array(), $options = array()) { - /** Get a portfolio membership - * - * @param $portfolio_membership_path_gid string: (required) - * @param $params : - * @return response - */ $path = "/portfolio_memberships/{portfolio_membership_gid}"; $path = str_replace($path,"{portfolio_membership_path_gid}", $portfolio_membership_path_gid); return $this->client->get($path, $params, $options); } + /** Get multiple portfolio memberships + * + * @param $params object + * @return response + */ public function getPortfolioMemberships($params = array(), $options = array()) { - /** Get multiple portfolio memberships - * - * @param $params : - * @return response - */ $path = "/portfolio_memberships"; - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } + /** Get memberships from a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ public function getPortfolioMembershipsForPortfolio($portfolio_gid, $params = array(), $options = array()) { - /** Get memberships from a portfolio - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ $path = "/portfolios/{portfolio_gid}/portfolio_memberships"; $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/PortfoliosBase.php b/src/Asana/Resources/Gen/PortfoliosBase.php index 43f21e3..70095e4 100644 --- a/src/Asana/Resources/Gen/PortfoliosBase.php +++ b/src/Asana/Resources/Gen/PortfoliosBase.php @@ -5,124 +5,148 @@ class PortfoliosBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function addPortfolioItem($portfolio_gid, $params = array(), $options = array()) { - /** Add a portfolio item - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ + /** Add a custom field to a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ + public function addCustomFieldSettingForPortfolio($portfolio_gid, $params = array(), $options = array()) { + $path = "/portfolios/{portfolio_gid}/addCustomFieldSetting"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->post($path, $params, $options); + } + + /** Add a portfolio item + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ + public function addItemForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/addItem"; $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); return $this->client->post($path, $params, $options); } - public function addPortfolioMembers($portfolio_gid, $params = array(), $options = array()) { - /** Add users to a portfolio - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ + /** Add users to a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ + public function addMembersForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/addMembers"; $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); return $this->client->post($path, $params, $options); } + /** Create a portfolio + * + * @param $params object + * @return response + */ public function createPortfolio($params = array(), $options = array()) { - /** Create a portfolio - * - * @param $params : - * @return response - */ $path = "/portfolios"; return $this->client->post($path, $params, $options); } + /** Delete a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ public function deletePortfolio($portfolio_gid, $params = array(), $options = array()) { - /** Delete a portfolio - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ $path = "/portfolios/{portfolio_gid}"; $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); return $this->client->delete($path, $params, $options); } - public function getPortfolio($portfolio_gid, $params = array(), $options = array()) { - /** Get a portfolio - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ - $path = "/portfolios/{portfolio_gid}"; + /** Get portfolio items + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ + public function getItemsForPortfolio($portfolio_gid, $params = array(), $options = array()) { + $path = "/portfolios/{portfolio_gid}/items"; $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } - public function getPortfolioItems($portfolio_gid, $params = array(), $options = array()) { - /** Get portfolio items - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ - $path = "/portfolios/{portfolio_gid}/items"; + /** Get a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ + public function getPortfolio($portfolio_gid, $params = array(), $options = array()) { + $path = "/portfolios/{portfolio_gid}"; $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); return $this->client->get($path, $params, $options); } + /** Get multiple portfolios + * + * @param $params object + * @return response + */ public function getPortfolios($params = array(), $options = array()) { - /** Get multiple portfolios - * - * @param $params : - * @return response - */ $path = "/portfolios"; - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); + } + + /** Remove a custom field from a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ + public function removeCustomFieldSettingForPortfolio($portfolio_gid, $params = array(), $options = array()) { + $path = "/portfolios/{portfolio_gid}/removeCustomFieldSetting"; + $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + return $this->client->post($path, $params, $options); } - public function removePortfolioItem($portfolio_gid, $params = array(), $options = array()) { - /** Remove a portfolio item - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ + /** Remove a portfolio item + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ + public function removeItemForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/removeItem"; $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); return $this->client->post($path, $params, $options); } - public function removePortfolioMembers($portfolio_gid, $params = array(), $options = array()) { - /** Remove users from a portfolio - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ + /** Remove users from a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ + public function removeMembersForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/removeMembers"; $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); return $this->client->post($path, $params, $options); } - public function updateportfolio($portfolio_gid, $params = array(), $options = array()) { - /** Update a portfolio - * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params : - * @return response - */ + /** Update a portfolio + * + * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. + * @param $params object + * @return response + */ + public function updatePortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}"; $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); return $this->client->put($path, $params, $options); diff --git a/src/Asana/Resources/Gen/ProjectMembershipsBase.php b/src/Asana/Resources/Gen/ProjectMembershipsBase.php index ab02add..86b7a7c 100644 --- a/src/Asana/Resources/Gen/ProjectMembershipsBase.php +++ b/src/Asana/Resources/Gen/ProjectMembershipsBase.php @@ -5,34 +5,34 @@ class ProjectMembershipsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Get a project membership + * + * @param $project_membership_path_gid string: (required) + * @param $params object + * @return response + */ public function getProjectMembership($project_membership_path_gid, $params = array(), $options = array()) { - /** Get a project membership - * - * @param $project_membership_path_gid string: (required) - * @param $params : - * @return response - */ $path = "/project_memberships/{project_membership_gid}"; $path = str_replace($path,"{project_membership_path_gid}", $project_membership_path_gid); return $this->client->get($path, $params, $options); } + /** Get memberships from a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ public function getProjectMembershipsForProject($project_gid, $params = array(), $options = array()) { - /** Get memberships from a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ $path = "/projects/{project_gid}/project_memberships"; $path = str_replace($path,"{project_gid}", $project_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/ProjectStatusesBase.php b/src/Asana/Resources/Gen/ProjectStatusesBase.php index a80145c..078bc5a 100644 --- a/src/Asana/Resources/Gen/ProjectStatusesBase.php +++ b/src/Asana/Resources/Gen/ProjectStatusesBase.php @@ -5,58 +5,58 @@ class ProjectStatusesBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function createProjectStatus($project_gid, $params = array(), $options = array()) { - /** Create a project status - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ + /** Create a project status + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function createProjectStatusForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/project_statuses"; $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } - public function deleteProductStatus($project_status_path_gid, $params = array(), $options = array()) { - /** Delete a project status - * - * @param $project_status_path_gid string: (required) The project status update to get. - * @param $params : - * @return response - */ + /** Delete a project status + * + * @param $project_status_path_gid string: (required) The project status update to get. + * @param $params object + * @return response + */ + public function deleteProjectStatus($project_status_path_gid, $params = array(), $options = array()) { $path = "/project_statuses/{project_status_gid}"; $path = str_replace($path,"{project_status_path_gid}", $project_status_path_gid); return $this->client->delete($path, $params, $options); } - public function getProductStatus($project_status_path_gid, $params = array(), $options = array()) { - /** Get a project status - * - * @param $project_status_path_gid string: (required) The project status update to get. - * @param $params : - * @return response - */ + /** Get a project status + * + * @param $project_status_path_gid string: (required) The project status update to get. + * @param $params object + * @return response + */ + public function getProjectStatus($project_status_path_gid, $params = array(), $options = array()) { $path = "/project_statuses/{project_status_gid}"; $path = str_replace($path,"{project_status_path_gid}", $project_status_path_gid); return $this->client->get($path, $params, $options); } - public function getProductStatuses($project_gid, $params = array(), $options = array()) { - /** Get statuses from a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ + /** Get statuses from a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function getProjectStatusesForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/project_statuses"; $path = str_replace($path,"{project_gid}", $project_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/ProjectsBase.php b/src/Asana/Resources/Gen/ProjectsBase.php index b3ea07a..c3f7f0e 100644 --- a/src/Asana/Resources/Gen/ProjectsBase.php +++ b/src/Asana/Resources/Gen/ProjectsBase.php @@ -5,172 +5,220 @@ class ProjectsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function createProject($params = array(), $options = array()) { - /** Create a project - * - * @param $params : - * @return response - */ - $path = "/projects"; + /** Add a custom field to a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function addCustomFieldSettingForProject($project_gid, $params = array(), $options = array()) { + $path = "/projects/{project_gid}/addCustomFieldSetting"; + $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } - public function createProjectsInWorkspace($workspace_gid, $params = array(), $options = array()) { - /** Create a project in a workspace - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ - $path = "/workspaces/{workspace_gid}/projects"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + /** Add users to a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function addFollowersForProject($project_gid, $params = array(), $options = array()) { + $path = "/projects/{project_gid}/addFollowers"; + $path = str_replace($path,"{project_gid}", $project_gid); + return $this->client->post($path, $params, $options); + } + + /** Add users to a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function addMembersForProject($project_gid, $params = array(), $options = array()) { + $path = "/projects/{project_gid}/addMembers"; + $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } - public function createProjectsWithTeam($team_gid, $params = array(), $options = array()) { - /** Create a project in a team - * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params : - * @return response - */ + /** Create a project + * + * @param $params object + * @return response + */ + public function createProject($params = array(), $options = array()) { + $path = "/projects"; + return $this->client->post($path, $params, $options); + } + + /** Create a project in a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params object + * @return response + */ + public function createProjectForTeam($team_gid, $params = array(), $options = array()) { $path = "/teams/{team_gid}/projects"; $path = str_replace($path,"{team_gid}", $team_gid); return $this->client->post($path, $params, $options); } + /** Create a project in a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ + public function createProjectForWorkspace($workspace_gid, $params = array(), $options = array()) { + $path = "/workspaces/{workspace_gid}/projects"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->post($path, $params, $options); + } + + /** Delete a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ public function deleteProject($project_gid, $params = array(), $options = array()) { - /** Delete a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ $path = "/projects/{project_gid}"; $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->delete($path, $params, $options); } + /** Duplicate a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ public function duplicateProject($project_gid, $params = array(), $options = array()) { - /** Duplicate a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ $path = "/projects/{project_gid}/duplicate"; $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } + /** Get a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ public function getProject($project_gid, $params = array(), $options = array()) { - /** Get a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ $path = "/projects/{project_gid}"; $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->get($path, $params, $options); } - public function getProjectTaskCounts($project_gid, $params = array(), $options = array()) { - /** Get task count of a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ - $path = "/projects/{project_gid}/task_counts"; - $path = str_replace($path,"{project_gid}", $project_gid); - return $this->client->get($path, $params, $options); - } - + /** Get multiple projects + * + * @param $params object + * @return response + */ public function getProjects($params = array(), $options = array()) { - /** Get multiple projects - * - * @param $params : - * @return response - */ $path = "/projects"; - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } - public function getProjectsInTeam($team_gid, $params = array(), $options = array()) { - /** Get a team's projects - * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params : - * @return response - */ + /** Get projects a task is in + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function getProjectsForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/projects"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->getCollection($path, $params, $options); + } + + /** Get a team's projects + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params object + * @return response + */ + public function getProjectsForTeam($team_gid, $params = array(), $options = array()) { $path = "/teams/{team_gid}/projects"; $path = str_replace($path,"{team_gid}", $team_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } - public function getProjectsInWorkspace($workspace_gid, $params = array(), $options = array()) { - /** Get all projects in a workspace - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ + /** Get all projects in a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ + public function getProjectsForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/projects"; $path = str_replace($path,"{workspace_gid}", $workspace_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } - public function getTaskProjects($task_gid, $params = array(), $options = array()) { - /** Get projects a task is in - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/projects"; - $path = str_replace($path,"{task_gid}", $task_gid); + /** Get task count of a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function getTaskCountsForProject($project_gid, $params = array(), $options = array()) { + $path = "/projects/{project_gid}/task_counts"; + $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->get($path, $params, $options); } - public function projectAddCustomFieldSetting($project_gid, $params = array(), $options = array()) { - /** Add a custom field to a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ - $path = "/projects/{project_gid}/addCustomFieldSetting"; + /** Remove a custom field from a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function removeCustomFieldSettingForProject($project_gid, $params = array(), $options = array()) { + $path = "/projects/{project_gid}/removeCustomFieldSetting"; $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } - public function projectRemoveCustomFieldSetting($project_gid, $params = array(), $options = array()) { - /** Remove a custom field from a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ - $path = "/projects/{project_gid}/removeCustomFieldSetting"; + /** Remove followers from a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function removeFollowersForProject($project_gid, $params = array(), $options = array()) { + $path = "/projects/{project_gid}/removeFollowers"; + $path = str_replace($path,"{project_gid}", $project_gid); + return $this->client->post($path, $params, $options); + } + + /** Remove users from a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function removeMembersForProject($project_gid, $params = array(), $options = array()) { + $path = "/projects/{project_gid}/removeMembers"; $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } + /** Update a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ public function updateProject($project_gid, $params = array(), $options = array()) { - /** Update a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ $path = "/projects/{project_gid}"; $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->put($path, $params, $options); diff --git a/src/Asana/Resources/Gen/SectionsBase.php b/src/Asana/Resources/Gen/SectionsBase.php index 3d826aa..b1dc4f7 100644 --- a/src/Asana/Resources/Gen/SectionsBase.php +++ b/src/Asana/Resources/Gen/SectionsBase.php @@ -5,92 +5,92 @@ class SectionsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function addTaskToSection($section_gid, $params = array(), $options = array()) { - /** Add task to section - * - * @param $section_gid string: (required) The globally unique identifier for the section. - * @param $params : - * @return response - */ + /** Add task to section + * + * @param $section_gid string: (required) The globally unique identifier for the section. + * @param $params object + * @return response + */ + public function addTaskForSection($section_gid, $params = array(), $options = array()) { $path = "/sections/{section_gid}/addTask"; $path = str_replace($path,"{section_gid}", $section_gid); return $this->client->post($path, $params, $options); } - public function createSectionInProject($project_gid, $params = array(), $options = array()) { - /** Create a section in a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ + /** Create a section in a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function createSectionForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/sections"; $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } + /** Delete a section + * + * @param $section_gid string: (required) The globally unique identifier for the section. + * @param $params object + * @return response + */ public function deleteSection($section_gid, $params = array(), $options = array()) { - /** Delete a section - * - * @param $section_gid string: (required) The globally unique identifier for the section. - * @param $params : - * @return response - */ $path = "/sections/{section_gid}"; $path = str_replace($path,"{section_gid}", $section_gid); return $this->client->delete($path, $params, $options); } + /** Get a section + * + * @param $section_gid string: (required) The globally unique identifier for the section. + * @param $params object + * @return response + */ public function getSection($section_gid, $params = array(), $options = array()) { - /** Get a section - * - * @param $section_gid string: (required) The globally unique identifier for the section. - * @param $params : - * @return response - */ $path = "/sections/{section_gid}"; $path = str_replace($path,"{section_gid}", $section_gid); return $this->client->get($path, $params, $options); } - public function getSectionsInProject($project_gid, $params = array(), $options = array()) { - /** Get sections in a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ + /** Get sections in a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function getSectionsForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/sections"; $path = str_replace($path,"{project_gid}", $project_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } - public function moveSection($project_gid, $params = array(), $options = array()) { - /** Move sections - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ + /** Move or Insert sections + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function insertSectionForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/sections/insert"; $path = str_replace($path,"{project_gid}", $project_gid); return $this->client->post($path, $params, $options); } + /** Update a section + * + * @param $section_gid string: (required) The globally unique identifier for the section. + * @param $params object + * @return response + */ public function updateSection($section_gid, $params = array(), $options = array()) { - /** Update a section - * - * @param $section_gid string: (required) The globally unique identifier for the section. - * @param $params : - * @return response - */ $path = "/sections/{section_gid}"; $path = str_replace($path,"{section_gid}", $section_gid); return $this->client->put($path, $params, $options); diff --git a/src/Asana/Resources/Gen/StoriesBase.php b/src/Asana/Resources/Gen/StoriesBase.php index fc4040d..7985088 100644 --- a/src/Asana/Resources/Gen/StoriesBase.php +++ b/src/Asana/Resources/Gen/StoriesBase.php @@ -5,68 +5,68 @@ class StoriesBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function createCommentStory($task_gid, $params = array(), $options = array()) { - /** Create a comment on a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ + /** Create a story on a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function createStoryForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/stories"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } + /** Delete a story + * + * @param $story_gid string: (required) Globally unique identifier for the story. + * @param $params object + * @return response + */ public function deleteStory($story_gid, $params = array(), $options = array()) { - /** Delete a story - * - * @param $story_gid string: (required) Globally unique identifier for the story. - * @param $params : - * @return response - */ $path = "/stories/{story_gid}"; $path = str_replace($path,"{story_gid}", $story_gid); return $this->client->delete($path, $params, $options); } + /** Get stories from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function getStoriesForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/stories"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->getCollection($path, $params, $options); + } + + /** Get a story + * + * @param $story_gid string: (required) Globally unique identifier for the story. + * @param $params object + * @return response + */ public function getStory($story_gid, $params = array(), $options = array()) { - /** Get a story - * - * @param $story_gid string: (required) Globally unique identifier for the story. - * @param $params : - * @return response - */ $path = "/stories/{story_gid}"; $path = str_replace($path,"{story_gid}", $story_gid); return $this->client->get($path, $params, $options); } - public function getTaskStories($task_gid, $params = array(), $options = array()) { - /** Get stories from a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/stories"; - $path = str_replace($path,"{task_gid}", $task_gid); - return $this->client->get($path, $params, $options); - } - + /** Update a story + * + * @param $story_gid string: (required) Globally unique identifier for the story. + * @param $params object + * @return response + */ public function updateStory($story_gid, $params = array(), $options = array()) { - /** Update a story - * - * @param $story_gid string: (required) Globally unique identifier for the story. - * @param $params : - * @return response - */ $path = "/stories/{story_gid}"; $path = str_replace($path,"{story_gid}", $story_gid); return $this->client->put($path, $params, $options); diff --git a/src/Asana/Resources/Gen/TagsBase.php b/src/Asana/Resources/Gen/TagsBase.php index 5ac9fa6..6c47aa4 100644 --- a/src/Asana/Resources/Gen/TagsBase.php +++ b/src/Asana/Resources/Gen/TagsBase.php @@ -5,88 +5,88 @@ class TagsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Create a tag + * + * @param $params object + * @return response + */ public function createTag($params = array(), $options = array()) { - /** Create a tag - * - * @param $params : - * @return response - */ $path = "/tags"; return $this->client->post($path, $params, $options); } - public function createTagInWorkspace($workspace_gid, $params = array(), $options = array()) { - /** Create a tag in a workspace - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ + /** Create a tag in a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ + public function createTagForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/tags"; $path = str_replace($path,"{workspace_gid}", $workspace_gid); return $this->client->post($path, $params, $options); } + /** Get a tag + * + * @param $tag_gid string: (required) Globally unique identifier for the tag. + * @param $params object + * @return response + */ public function getTag($tag_gid, $params = array(), $options = array()) { - /** Get a tag - * - * @param $tag_gid string: (required) Globally unique identifier for the tag. - * @param $params : - * @return response - */ $path = "/tags/{tag_gid}"; $path = str_replace($path,"{tag_gid}", $tag_gid); return $this->client->get($path, $params, $options); } - public function getTaskTags($task_gid, $params = array(), $options = array()) { - /** Get a task's tags - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ + /** Get multiple tags + * + * @param $params object + * @return response + */ + public function getTags($params = array(), $options = array()) { + $path = "/tags"; + return $this->client->getCollection($path, $params, $options); + } + + /** Get a task's tags + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function getTagsForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/tags"; $path = str_replace($path,"{task_gid}", $task_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } - public function queryAllTagsInWorkspace($workspace_gid, $params = array(), $options = array()) { - /** Get tags in a workspace - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ + /** Get tags in a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ + public function getTagsForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/tags"; $path = str_replace($path,"{workspace_gid}", $workspace_gid); - return $this->client->get($path, $params, $options); - } - - public function queryTags($params = array(), $options = array()) { - /** Get multiple tags - * - * @param $params : - * @return response - */ - $path = "/tags"; - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } + /** Update a tag + * + * @param $tag_gid string: (required) Globally unique identifier for the tag. + * @param $params object + * @return response + */ public function updateTag($tag_gid, $params = array(), $options = array()) { - /** Update a tag - * - * @param $tag_gid string: (required) Globally unique identifier for the tag. - * @param $params : - * @return response - */ $path = "/tags/{tag_gid}"; $path = str_replace($path,"{tag_gid}", $tag_gid); return $this->client->put($path, $params, $options); diff --git a/src/Asana/Resources/Gen/TasksBase.php b/src/Asana/Resources/Gen/TasksBase.php index 0c41616..5385e21 100644 --- a/src/Asana/Resources/Gen/TasksBase.php +++ b/src/Asana/Resources/Gen/TasksBase.php @@ -5,304 +5,316 @@ class TasksBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function addFollowerToTask($task_gid, $params = array(), $options = array()) { - /** Add followers to a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/addFollowers"; - $path = str_replace($path,"{task_gid}", $task_gid); - return $this->client->post($path, $params, $options); - } - - public function addProjectToTask($task_gid, $params = array(), $options = array()) { - /** Add a project to a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/addProject"; + /** Set dependencies for a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function addDependenciesForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/addDependencies"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - public function addTagToTask($task_gid, $params = array(), $options = array()) { - /** Add a tag to a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/addTag"; + /** Set dependents for a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function addDependentsForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/addDependents"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - public function addTaskDependencies($task_gid, $params = array(), $options = array()) { - /** Set dependencies for a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/addDependencies"; + /** Add followers to a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function addFollowersForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/addFollowers"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - public function addTaskDependents($task_gid, $params = array(), $options = array()) { - /** Set dependents for a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/addDependents"; + /** Add a project to a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function addProjectForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/addProject"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - public function changeSubtaskParent($task_gid, $params = array(), $options = array()) { - /** Change the parent of a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/setParent"; + /** Add a tag to a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function addTagForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/addTag"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - public function createSubtask($task_gid, $params = array(), $options = array()) { - /** Create a subtask - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ + /** Create a subtask + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function createSubtaskForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/subtasks"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } + /** Create a task + * + * @param $params object + * @return response + */ public function createTask($params = array(), $options = array()) { - /** Create a task - * - * @param $params : - * @return response - */ $path = "/tasks"; return $this->client->post($path, $params, $options); } + /** Delete a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ public function deleteTask($task_gid, $params = array(), $options = array()) { - /** Delete a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ $path = "/tasks/{task_gid}"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->delete($path, $params, $options); } + /** Duplicate a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ public function duplicateTask($task_gid, $params = array(), $options = array()) { - /** Duplicate a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ $path = "/tasks/{task_gid}/duplicate"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - public function getProjectTasks($project_gid, $params = array(), $options = array()) { - /** Get tasks from a project - * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params : - * @return response - */ - $path = "/projects/{project_gid}/tasks"; - $path = str_replace($path,"{project_gid}", $project_gid); - return $this->client->get($path, $params, $options); + /** Get dependencies from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function getDependenciesForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/dependencies"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->getCollection($path, $params, $options); } - public function getSectionTasks($section_gid, $params = array(), $options = array()) { - /** Get tasks from a section - * - * @param $section_gid string: (required) The globally unique identifier for the section. - * @param $params : - * @return response - */ - $path = "/sections/{section_gid}/tasks"; - $path = str_replace($path,"{section_gid}", $section_gid); - return $this->client->get($path, $params, $options); + /** Get dependents from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function getDependentsForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/dependents"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->getCollection($path, $params, $options); } - public function getSubTasks($task_gid, $params = array(), $options = array()) { - /** Get subtasks from a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ + /** Get subtasks from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function getSubtasksForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/subtasks"; $path = str_replace($path,"{task_gid}", $task_gid); - return $this->client->get($path, $params, $options); - } - - public function getTagTasks($tag_gid, $params = array(), $options = array()) { - /** Get tasks from a tag - * - * @param $tag_gid string: (required) Globally unique identifier for the tag. - * @param $params : - * @return response - */ - $path = "/tags/{tag_gid}/tasks"; - $path = str_replace($path,"{tag_gid}", $tag_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } + /** Get a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ public function getTask($task_gid, $params = array(), $options = array()) { - /** Get a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ $path = "/tasks/{task_gid}"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->get($path, $params, $options); } - public function getTaskDependencies($task_gid, $params = array(), $options = array()) { - /** Get dependencies from a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/dependencies"; - $path = str_replace($path,"{task_gid}", $task_gid); - return $this->client->get($path, $params, $options); + /** Get multiple tasks + * + * @param $params object + * @return response + */ + public function getTasks($params = array(), $options = array()) { + $path = "/tasks"; + return $this->client->getCollection($path, $params, $options); } - public function getTaskDependents($task_gid, $params = array(), $options = array()) { - /** Get dependents from a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/dependents"; - $path = str_replace($path,"{task_gid}", $task_gid); - return $this->client->get($path, $params, $options); + /** Get tasks from a project + * + * @param $project_gid string: (required) Globally unique identifier for the project. + * @param $params object + * @return response + */ + public function getTasksForProject($project_gid, $params = array(), $options = array()) { + $path = "/projects/{project_gid}/tasks"; + $path = str_replace($path,"{project_gid}", $project_gid); + return $this->client->getCollection($path, $params, $options); } - public function getWorkspaceTasksSearch($workspace_gid, $params = array(), $options = array()) { - /** Search tasks in a workspace - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ - $path = "/workspaces/{workspace_gid}/tasks/search"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); - return $this->client->get($path, $params, $options); + /** Get tasks from a section + * + * @param $section_gid string: (required) The globally unique identifier for the section. + * @param $params object + * @return response + */ + public function getTasksForSection($section_gid, $params = array(), $options = array()) { + $path = "/sections/{section_gid}/tasks"; + $path = str_replace($path,"{section_gid}", $section_gid); + return $this->client->getCollection($path, $params, $options); } - public function queryTasks($params = array(), $options = array()) { - /** Get multiple tasks - * - * @param $params : - * @return response - */ - $path = "/tasks"; - return $this->client->get($path, $params, $options); + /** Get tasks from a tag + * + * @param $tag_gid string: (required) Globally unique identifier for the tag. + * @param $params object + * @return response + */ + public function getTasksForTag($tag_gid, $params = array(), $options = array()) { + $path = "/tags/{tag_gid}/tasks"; + $path = str_replace($path,"{tag_gid}", $tag_gid); + return $this->client->getCollection($path, $params, $options); + } + + /** Get tasks from a user task list + * + * @param $user_task_list_gid string: (required) Globally unique identifier for the user task list. + * @param $params object + * @return response + */ + public function getTasksForUserTaskList($user_task_list_gid, $params = array(), $options = array()) { + $path = "/user_task_lists/{user_task_list_gid}/tasks"; + $path = str_replace($path,"{user_task_list_gid}", $user_task_list_gid); + return $this->client->getCollection($path, $params, $options); } - public function removeFollowerToTask($task_gid, $params = array(), $options = array()) { - /** Remove followers from a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ + /** Unlink dependencies from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function removeDependenciesForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/removeDependencies"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->post($path, $params, $options); + } + + /** Unlink dependents from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function removeDependentsForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/removeDependents"; + $path = str_replace($path,"{task_gid}", $task_gid); + return $this->client->post($path, $params, $options); + } + + /** Remove followers from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function removeFollowerForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/removeFollowers"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - public function removeProjectFromTask($task_gid, $params = array(), $options = array()) { - /** Remove a project from a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ + /** Remove a project from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function removeProjectForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/removeProject"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - public function removeTagFromTask($task_gid, $params = array(), $options = array()) { - /** Remove a tag from a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ + /** Remove a tag from a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function removeTagForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/removeTag"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } - public function removeTaskDependencies($task_gid, $params = array(), $options = array()) { - /** Unlink dependencies from a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/removeDependencies"; - $path = str_replace($path,"{task_gid}", $task_gid); - return $this->client->post($path, $params, $options); + /** Search tasks in a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ + public function searchTasksForWorkspace($workspace_gid, $params = array(), $options = array()) { + $path = "/workspaces/{workspace_gid}/tasks/search"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->getCollection($path, $params, $options); } - public function removeTaskDependents($task_gid, $params = array(), $options = array()) { - /** Unlink dependents from a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ - $path = "/tasks/{task_gid}/removeDependents"; + /** Set the parent of a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ + public function setParentForTask($task_gid, $params = array(), $options = array()) { + $path = "/tasks/{task_gid}/setParent"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->post($path, $params, $options); } + /** Update a task + * + * @param $task_gid string: (required) The task to operate on. + * @param $params object + * @return response + */ public function updateTask($task_gid, $params = array(), $options = array()) { - /** Update a task - * - * @param $task_gid string: (required) The task to operate on. - * @param $params : - * @return response - */ $path = "/tasks/{task_gid}"; $path = str_replace($path,"{task_gid}", $task_gid); return $this->client->put($path, $params, $options); diff --git a/src/Asana/Resources/Gen/TeamMembershipsBase.php b/src/Asana/Resources/Gen/TeamMembershipsBase.php index c38ce02..2de7375 100644 --- a/src/Asana/Resources/Gen/TeamMembershipsBase.php +++ b/src/Asana/Resources/Gen/TeamMembershipsBase.php @@ -5,56 +5,56 @@ class TeamMembershipsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Get a team membership + * + * @param $team_membership_path_gid string: (required) + * @param $params object + * @return response + */ public function getTeamMembership($team_membership_path_gid, $params = array(), $options = array()) { - /** Get a team membership - * - * @param $team_membership_path_gid string: (required) - * @param $params : - * @return response - */ $path = "/team_memberships/{team_membership_gid}"; $path = str_replace($path,"{team_membership_path_gid}", $team_membership_path_gid); return $this->client->get($path, $params, $options); } + /** Get team memberships + * + * @param $params object + * @return response + */ public function getTeamMemberships($params = array(), $options = array()) { - /** Get team memberships - * - * @param $params : - * @return response - */ $path = "/team_memberships"; - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } + /** Get memberships from a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params object + * @return response + */ public function getTeamMembershipsForTeam($team_gid, $params = array(), $options = array()) { - /** Get memberships from a team - * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params : - * @return response - */ $path = "/teams/{team_gid}/team_memberships"; $path = str_replace($path,"{team_gid}", $team_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } + /** Get memberships from a user + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params object + * @return response + */ public function getTeamMembershipsForUser($user_gid, $params = array(), $options = array()) { - /** Get memberships from a user - * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params : - * @return response - */ $path = "/users/{user_gid}/team_memberships"; $path = str_replace($path,"{user_gid}", $user_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/TeamsBase.php b/src/Asana/Resources/Gen/TeamsBase.php index 15e44c0..633acd4 100644 --- a/src/Asana/Resources/Gen/TeamsBase.php +++ b/src/Asana/Resources/Gen/TeamsBase.php @@ -5,68 +5,68 @@ class TeamsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function addUserToTeam($team_gid, $params = array(), $options = array()) { - /** Add a user to a team - * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params : - * @return response - */ + /** Add a user to a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params object + * @return response + */ + public function addUserForTeam($team_gid, $params = array(), $options = array()) { $path = "/teams/{team_gid}/addUser"; $path = str_replace($path,"{team_gid}", $team_gid); return $this->client->post($path, $params, $options); } - public function getAllTeams($workspace_gid, $params = array(), $options = array()) { - /** Get teams in an organization - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ - $path = "/organizations/{workspace_gid}/teams"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); - return $this->client->get($path, $params, $options); - } - + /** Get a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params object + * @return response + */ public function getTeam($team_gid, $params = array(), $options = array()) { - /** Get a team - * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params : - * @return response - */ $path = "/teams/{team_gid}"; $path = str_replace($path,"{team_gid}", $team_gid); return $this->client->get($path, $params, $options); } + /** Get teams in an organization + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ + public function getTeamsForOrganization($workspace_gid, $params = array(), $options = array()) { + $path = "/organizations/{workspace_gid}/teams"; + $path = str_replace($path,"{workspace_gid}", $workspace_gid); + return $this->client->getCollection($path, $params, $options); + } + + /** Get teams for a user + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params object + * @return response + */ public function getTeamsForUser($user_gid, $params = array(), $options = array()) { - /** Get teams for a user - * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params : - * @return response - */ $path = "/users/{user_gid}/teams"; $path = str_replace($path,"{user_gid}", $user_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } - public function removeUserFromTeam($team_gid, $params = array(), $options = array()) { - /** Remove a user from a team - * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params : - * @return response - */ + /** Remove a user from a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params object + * @return response + */ + public function removeUserForTeam($team_gid, $params = array(), $options = array()) { $path = "/teams/{team_gid}/removeUser"; $path = str_replace($path,"{team_gid}", $team_gid); return $this->client->post($path, $params, $options); diff --git a/src/Asana/Resources/Gen/TypeaheadBase.php b/src/Asana/Resources/Gen/TypeaheadBase.php index cd01dba..ed9560e 100644 --- a/src/Asana/Resources/Gen/TypeaheadBase.php +++ b/src/Asana/Resources/Gen/TypeaheadBase.php @@ -5,22 +5,22 @@ class TypeaheadBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function getTypeahead($workspace_gid, $params = array(), $options = array()) { - /** Get objects via typeahead - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ + /** Get objects via typeahead + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ + public function typeaheadForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/typeahead"; $path = str_replace($path,"{workspace_gid}", $workspace_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/UserTaskListsBase.php b/src/Asana/Resources/Gen/UserTaskListsBase.php index 8f7e58c..d1b25a2 100644 --- a/src/Asana/Resources/Gen/UserTaskListsBase.php +++ b/src/Asana/Resources/Gen/UserTaskListsBase.php @@ -5,44 +5,32 @@ class UserTaskListsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Get a user task list + * + * @param $user_task_list_gid string: (required) Globally unique identifier for the user task list. + * @param $params object + * @return response + */ public function getUserTaskList($user_task_list_gid, $params = array(), $options = array()) { - /** Get a user task list - * - * @param $user_task_list_gid string: (required) Globally unique identifier for the user task list. - * @param $params : - * @return response - */ - $path = "/user_task_list/{user_task_list_gid}"; + $path = "/user_task_lists/{user_task_list_gid}"; $path = str_replace($path,"{user_task_list_gid}", $user_task_list_gid); return $this->client->get($path, $params, $options); } - public function getUserTaskListTasks($user_task_list_gid, $params = array(), $options = array()) { - /** Get tasks from a user task list - * - * @param $user_task_list_gid string: (required) Globally unique identifier for the user task list. - * @param $params : - * @return response - */ - $path = "/user_task_lists/{user_task_list_gid}/tasks"; - $path = str_replace($path,"{user_task_list_gid}", $user_task_list_gid); - return $this->client->get($path, $params, $options); - } - - public function getUsersTaskList($user_gid, $params = array(), $options = array()) { - /** Get a user's task list - * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params : - * @return response - */ + /** Get a user's task list + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params object + * @return response + */ + public function getUserTaskListForUser($user_gid, $params = array(), $options = array()) { $path = "/users/{user_gid}/user_task_list"; $path = str_replace($path,"{user_gid}", $user_gid); return $this->client->get($path, $params, $options); diff --git a/src/Asana/Resources/Gen/UsersBase.php b/src/Asana/Resources/Gen/UsersBase.php index 45363e9..5b786c6 100644 --- a/src/Asana/Resources/Gen/UsersBase.php +++ b/src/Asana/Resources/Gen/UsersBase.php @@ -5,68 +5,68 @@ class UsersBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function getAllUsers($params = array(), $options = array()) { - /** Get multiple users - * - * @param $params : - * @return response - */ - $path = "/users"; - return $this->client->get($path, $params, $options); + /** Get a user's favorites + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params object + * @return response + */ + public function getFavoritesForUser($user_gid, $params = array(), $options = array()) { + $path = "/users/{user_gid}/favorites"; + $path = str_replace($path,"{user_gid}", $user_gid); + return $this->client->getCollection($path, $params, $options); } + /** Get a user + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params object + * @return response + */ public function getUser($user_gid, $params = array(), $options = array()) { - /** Get a user - * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params : - * @return response - */ $path = "/users/{user_gid}"; $path = str_replace($path,"{user_gid}", $user_gid); return $this->client->get($path, $params, $options); } - public function getUserFavorites($user_gid, $params = array(), $options = array()) { - /** Get a user's favorites - * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params : - * @return response - */ - $path = "/users/{user_gid}/favorites"; - $path = str_replace($path,"{user_gid}", $user_gid); - return $this->client->get($path, $params, $options); + /** Get multiple users + * + * @param $params object + * @return response + */ + public function getUsers($params = array(), $options = array()) { + $path = "/users"; + return $this->client->getCollection($path, $params, $options); } + /** Get users in a team + * + * @param $team_gid string: (required) Globally unique identifier for the team. + * @param $params object + * @return response + */ public function getUsersForTeam($team_gid, $params = array(), $options = array()) { - /** Get users in a team - * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params : - * @return response - */ $path = "/teams/{team_gid}/users"; $path = str_replace($path,"{team_gid}", $team_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } - public function getUsersInWorkspace($workspace_gid, $params = array(), $options = array()) { - /** Get users in a workspace or organization - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ + /** Get users in a workspace or organization + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ + public function getUsersForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/users"; $path = str_replace($path,"{workspace_gid}", $workspace_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/WebhooksBase.php b/src/Asana/Resources/Gen/WebhooksBase.php index 6a0c2f4..292b179 100644 --- a/src/Asana/Resources/Gen/WebhooksBase.php +++ b/src/Asana/Resources/Gen/WebhooksBase.php @@ -5,54 +5,54 @@ class WebhooksBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Establish a webhook + * + * @param $params object + * @return response + */ public function createWebhook($params = array(), $options = array()) { - /** Establish a webhook - * - * @param $params : - * @return response - */ $path = "/webhooks"; return $this->client->post($path, $params, $options); } + /** Delete a webhook + * + * @param $webhook_gid string: (required) Globally unique identifier for the webhook. + * @param $params object + * @return response + */ public function deleteWebhook($webhook_gid, $params = array(), $options = array()) { - /** Delete a webhook - * - * @param $webhook_gid string: (required) Globally unique identifier for the webhook. - * @param $params : - * @return response - */ $path = "/webhooks/{webhook_gid}"; $path = str_replace($path,"{webhook_gid}", $webhook_gid); return $this->client->delete($path, $params, $options); } + /** Get a webhook + * + * @param $webhook_gid string: (required) Globally unique identifier for the webhook. + * @param $params object + * @return response + */ public function getWebhook($webhook_gid, $params = array(), $options = array()) { - /** Get a webhook - * - * @param $webhook_gid string: (required) Globally unique identifier for the webhook. - * @param $params : - * @return response - */ $path = "/webhooks/{webhook_gid}"; $path = str_replace($path,"{webhook_gid}", $webhook_gid); return $this->client->get($path, $params, $options); } + /** Get multiple webhooks + * + * @param $params object + * @return response + */ public function getWebhooks($params = array(), $options = array()) { - /** Get multiple webhooks - * - * @param $params : - * @return response - */ $path = "/webhooks"; - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php index 763e2db..9c59d36 100644 --- a/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php +++ b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php @@ -5,46 +5,46 @@ class WorkspaceMembershipsBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } + /** Get a workspace membership + * + * @param $workspace_membership_path_gid string: (required) + * @param $params object + * @return response + */ public function getWorkspaceMembership($workspace_membership_path_gid, $params = array(), $options = array()) { - /** Get a workspace membership - * - * @param $workspace_membership_path_gid string: (required) - * @param $params : - * @return response - */ $path = "/workspace_memberships/{workspace_membership_gid}"; $path = str_replace($path,"{workspace_membership_path_gid}", $workspace_membership_path_gid); return $this->client->get($path, $params, $options); } + /** Get workspace memberships for a user + * + * @param $user_gid string: (required) Globally unique identifier for the user. + * @param $params object + * @return response + */ public function getWorkspaceMembershipsForUser($user_gid, $params = array(), $options = array()) { - /** Get workspace memberships for a user - * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params : - * @return response - */ $path = "/users/{user_gid}/workspace_memberships"; $path = str_replace($path,"{user_gid}", $user_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } + /** Get the workspace memberships for a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ public function getWorkspaceMembershipsForWorkspace($workspace_gid, $params = array(), $options = array()) { - /** Get the workspace memberships for a workspace - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ $path = "/workspaces/{workspace_gid}/workspace_memberships"; $path = str_replace($path,"{workspace_gid}", $workspace_gid); - return $this->client->get($path, $params, $options); + return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/WorkspacesBase.php b/src/Asana/Resources/Gen/WorkspacesBase.php index ee640d4..3b1bf84 100644 --- a/src/Asana/Resources/Gen/WorkspacesBase.php +++ b/src/Asana/Resources/Gen/WorkspacesBase.php @@ -5,66 +5,66 @@ class WorkspacesBase { /** - * @param Asana/Client client The client instance - */ + * @param Asana/Client client The client instance + */ public function __construct($client) { $this->client = $client; } - public function addUserToWorkspace($workspace_gid, $params = array(), $options = array()) { - /** Add a user to a workspace or organization - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ + /** Add a user to a workspace or organization + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ + public function addUserForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/addUser"; $path = str_replace($path,"{workspace_gid}", $workspace_gid); return $this->client->post($path, $params, $options); } - public function getAllWorkspaces($params = array(), $options = array()) { - /** Get multiple workspaces - * - * @param $params : - * @return response - */ - $path = "/workspaces"; - return $this->client->get($path, $params, $options); - } - + /** Get a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ public function getWorkspace($workspace_gid, $params = array(), $options = array()) { - /** Get a workspace - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ $path = "/workspaces/{workspace_gid}"; $path = str_replace($path,"{workspace_gid}", $workspace_gid); return $this->client->get($path, $params, $options); } - public function removeUserToWorkspace($workspace_gid, $params = array(), $options = array()) { - /** Remove a user from a workspace or organization - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ + /** Get multiple workspaces + * + * @param $params object + * @return response + */ + public function getWorkspaces($params = array(), $options = array()) { + $path = "/workspaces"; + return $this->client->getCollection($path, $params, $options); + } + + /** Remove a user from a workspace or organization + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ + public function removeUserForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/removeUser"; $path = str_replace($path,"{workspace_gid}", $workspace_gid); return $this->client->post($path, $params, $options); } + /** Update a workspace + * + * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. + * @param $params object + * @return response + */ public function updateWorkspace($workspace_gid, $params = array(), $options = array()) { - /** Update a workspace - * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params : - * @return response - */ $path = "/workspaces/{workspace_gid}"; $path = str_replace($path,"{workspace_gid}", $workspace_gid); return $this->client->put($path, $params, $options); diff --git a/src/Asana/Resources/Jobs.php b/src/Asana/Resources/Jobs.php index b1b7b6e..16f7b0a 100644 --- a/src/Asana/Resources/Jobs.php +++ b/src/Asana/Resources/Jobs.php @@ -9,6 +9,8 @@ class Jobs extends JobsBase /** * Returns the complete job record for a single job. * + * @deprecated replace with getJob + * * @param job The job to get. * @return response */ diff --git a/src/Asana/Resources/OrganizationExports.php b/src/Asana/Resources/OrganizationExports.php index 939f855..e79ec3e 100644 --- a/src/Asana/Resources/OrganizationExports.php +++ b/src/Asana/Resources/OrganizationExports.php @@ -9,6 +9,8 @@ class OrganizationExports extends OrganizationExportsBase /** * Returns details of a previously-requested Organization export. * + * @deprecated replace with getOrganizationExport + * * @param organization_export Globally unique identifier for the Organization export. * @return response */ @@ -22,6 +24,8 @@ public function findById($organizationExport, $params = array(), $options = arra * This method creates a request to export an Organization. Asana will complete the export at some * point after you create the request. * + * @deprecated replace with createOrganizationExport + * * @return response */ public function create($params = array(), $options = array()) diff --git a/src/Asana/Resources/PortfolioMemberships.php b/src/Asana/Resources/PortfolioMemberships.php index 49ca0ef..3c1bc89 100644 --- a/src/Asana/Resources/PortfolioMemberships.php +++ b/src/Asana/Resources/PortfolioMemberships.php @@ -10,6 +10,8 @@ class PortfolioMemberships extends PortfolioMembershipsBase * Returns the compact portfolio membership records for the portfolio. You must * specify `portfolio`, `portfolio` and `user`, or `workspace` and `user`. * + * @deprecated replace with getPortfolioMemberships + * * @return response */ public function findAll($params = array(), $options = array()) @@ -20,6 +22,8 @@ public function findAll($params = array(), $options = array()) /** * Returns the compact portfolio membership records for the portfolio. * + * @deprecated replace with getPortfolioMembershipsForPortfolio + * * @param portfolio The portfolio for which to fetch memberships. * @return response */ @@ -32,6 +36,8 @@ public function findByPortfolio($portfolio, $params = array(), $options = array( /** * Returns the portfolio membership record. * + * @deprecated replace with getPortfolioMembership + * * @param portfolio_membership Globally unique identifier for the portfolio membership. * @return response */ diff --git a/src/Asana/Resources/Portfolios.php b/src/Asana/Resources/Portfolios.php index 1ebf02a..9b0a2ce 100644 --- a/src/Asana/Resources/Portfolios.php +++ b/src/Asana/Resources/Portfolios.php @@ -15,6 +15,8 @@ class Portfolios extends PortfoliosBase * be created with the same initial state to allow integrations to create * their own starting state on a portfolio. * + * @deprecated replace with createPortfolio + * * @return response */ public function create($params = array(), $options = array()) @@ -25,6 +27,8 @@ public function create($params = array(), $options = array()) /** * Returns the complete record for a single portfolio. * + * @deprecated replace with getPortfolio + * * @param portfolio The portfolio to get. * @return response */ @@ -41,6 +45,8 @@ public function findById($portfolio, $params = array(), $options = array()) * * Returns the complete updated portfolio record. * + * @deprecated replace with updatePortfolio + * * @param portfolio The portfolio to update. * @return response */ @@ -56,6 +62,8 @@ public function update($portfolio, $params = array(), $options = array()) * * Returns an empty data record. * + * @deprecated replace with deletePortfolio + * * @param portfolio The portfolio to delete. * @return response */ @@ -69,6 +77,8 @@ public function delete($portfolio, $params = array(), $options = array()) * Returns a list of the portfolios in compact representation that are owned * by the current API user. * + * @deprecated replace with getPortfolios + * * @return response */ public function findAll($params = array(), $options = array()) @@ -79,6 +89,8 @@ public function findAll($params = array(), $options = array()) /** * Get a list of the items in compact form in a portfolio. * + * @deprecated replace with getItemsForPortfolio + * * @param portfolio The portfolio from which to get the list of items. * @return response */ @@ -93,6 +105,8 @@ public function getItems($portfolio, $params = array(), $options = array()) * * Returns an empty data block. * + * @deprecated replace with addItemForPortfolio + * * @param portfolio The portfolio to which to add an item. * @return response */ @@ -107,6 +121,8 @@ public function addItem($portfolio, $params = array(), $options = array()) * * Returns an empty data block. * + * @deprecated replace with removeItemForPortfolio + * * @param portfolio The portfolio from which to remove the item. * @return response */ @@ -119,6 +135,8 @@ public function removeItem($portfolio, $params = array(), $options = array()) /** * Adds the specified list of users as members of the portfolio. Returns the updated portfolio record. * + * @deprecated replace with addMembersForPortfolio + * * @param portfolio The portfolio to add members to. * @return response */ @@ -131,6 +149,8 @@ public function addMembers($portfolio, $params = array(), $options = array()) /** * Removes the specified list of members from the portfolio. Returns the updated portfolio record. * + * @deprecated replace with removeMembersForPortfolio + * * @param portfolio The portfolio to remove members from. * @return response */ @@ -143,6 +163,8 @@ public function removeMembers($portfolio, $params = array(), $options = array()) /** * Get the custom field settings on a portfolio. * + * @deprecated replace with CustomFields.getCustomFieldSettingsForPortfolio + * * @param portfolio The portfolio from which to get the custom field settings. * @return response */ @@ -156,6 +178,8 @@ public function customFieldSettings($portfolio, $params = array(), $options = ar * Create a new custom field setting on the portfolio. Returns the full * record for the new custom field setting. * + * @deprecated replace with addCustomFieldSettingForPortfolio + * * @param portfolio The portfolio onto which to add the custom field. * @return response */ @@ -169,6 +193,8 @@ public function addCustomFieldSetting($portfolio, $params = array(), $options = * Remove a custom field setting on the portfolio. Returns an empty data * block. * + * @deprecated replace with removeCustomFieldSettingForPortfolio + * * @param portfolio The portfolio from which to remove the custom field. * @return response */ diff --git a/src/Asana/Resources/ProjectMemberships.php b/src/Asana/Resources/ProjectMemberships.php index e3ed865..0c69c8b 100644 --- a/src/Asana/Resources/ProjectMemberships.php +++ b/src/Asana/Resources/ProjectMemberships.php @@ -17,6 +17,8 @@ public function __construct($client) /** * Returns the compact project membership records for the project. * + * @deprecated replace with getProjectMembershipsForProject + * * @param project The project for which to fetch memberships. * @return response */ @@ -29,6 +31,8 @@ public function findByProject($project, $params = array(), $options = array()) /** * Returns the project membership record. * + * @deprecated replace with getProjectMembership + * * @param project_membership Globally unique identifier for the project membership. * @return response */ diff --git a/src/Asana/Resources/ProjectStatuses.php b/src/Asana/Resources/ProjectStatuses.php index 13068f5..92a55ff 100644 --- a/src/Asana/Resources/ProjectStatuses.php +++ b/src/Asana/Resources/ProjectStatuses.php @@ -24,6 +24,8 @@ public function __construct($client) * * Returns the full record of the newly created project status update. * + * @deprecated replace with createProjectStatusForProject + * * @param project The project on which to create a status update. * @return response */ @@ -36,6 +38,8 @@ public function createInProject($project, $params = array(), $options = array()) /** * Returns the compact project status update records for all updates on the project. * + * @deprecated replace with getProjectStatusesForProject + * * @param project The project to find status updates for. * @return response */ @@ -48,6 +52,8 @@ public function findByProject($project, $params = array(), $options = array()) /** * Returns the complete record for a single status update. * + * @deprecated replace with getProjectStatus + * * @param project-status The project status update to get. * @return response */ @@ -62,6 +68,8 @@ public function findById($projectStatus, $params = array(), $options = array()) * * Returns an empty data record. * + * @deprecated replace with deleteProjectStatus + * * @param project-status The project status update to delete. * @return response */ diff --git a/src/Asana/Resources/Projects.php b/src/Asana/Resources/Projects.php index 3fb3dc2..0a7bb36 100644 --- a/src/Asana/Resources/Projects.php +++ b/src/Asana/Resources/Projects.php @@ -19,6 +19,8 @@ class Projects extends ProjectsBase * * Returns the full record of the newly created project. * + * @deprecated replace with createProject + * * @return response */ public function create($params = array(), $options = array()) @@ -32,6 +34,8 @@ public function create($params = array(), $options = array()) * * Returns the full record of the newly created project. * + * @deprecated replace with createProjectForWorkspace + * * @param workspace The workspace or organization to create the project in. * @return response */ @@ -46,6 +50,8 @@ public function createInWorkspace($workspace, $params = array(), $options = arra * * Returns the full record of the newly created project. * + * @deprecated replace with createProjectForTeam + * * @param team The team to create the project in. * @return response */ @@ -58,6 +64,8 @@ public function createInTeam($team, $params = array(), $options = array()) /** * Returns the complete project record for a single project. * + * @deprecated replace with getProject + * * @param project The project to get. * @return response */ @@ -78,6 +86,8 @@ public function findById($project, $params = array(), $options = array()) * * Returns the complete updated project record. * + * @deprecated replace with updateProject + * * @param project The project to update. * @return response */ @@ -93,6 +103,8 @@ public function update($project, $params = array(), $options = array()) * * Returns an empty data record. * + * @deprecated replace with deleteProject + * * @param project The project to delete. * @return response */ @@ -102,22 +114,12 @@ public function delete($project, $params = array(), $options = array()) return $this->client->delete($path, $params, $options); } - /** - * Creates and returns a job that will asynchronously handle the duplication. - * - * @param project The project to duplicate. - * @return response - */ - public function duplicateProject($project, $params = array(), $options = array()) - { - $path = sprintf("/projects/%s/duplicate", $project); - return $this->client->post($path, $params, $options); - } - /** * Returns the compact project records for some filtered set of projects. * Use one or more of the parameters provided to filter the projects returned. * + * @deprecated replace with getProjects + * * @return response */ public function findAll($params = array(), $options = array()) @@ -128,6 +130,8 @@ public function findAll($params = array(), $options = array()) /** * Returns the compact project records for all projects in the workspace. * + * @deprecated replace with getProjectsForWorkspace + * * @param workspace The workspace or organization to find projects in. * @return response */ @@ -140,6 +144,8 @@ public function findByWorkspace($workspace, $params = array(), $options = array( /** * Returns the compact project records for all projects in the team. * + * @deprecated replace with getProjectsForTeam + * * @param team The team to find projects in. * @return response */ @@ -153,6 +159,8 @@ public function findByTeam($team, $params = array(), $options = array()) * Returns the compact task records for all tasks within the given project, * ordered by their priority within the project. Tasks can exist in more than one project at a time. * + * @deprecated replace with Tasks.getTasksForProject + * * @param project The project in which to search for tasks. * @return response */ @@ -167,6 +175,8 @@ public function tasks($project, $params = array(), $options = array()) * the users are not already members of the project they will also become members as a result of this operation. * Returns the updated project record. * + * @deprecated replace with addFollowersForProject + * * @param project The project to add followers to. * @return response */ @@ -180,6 +190,8 @@ public function addFollowers($project, $params = array(), $options = array()) * Removes the specified list of users from following the project, this will not affect project membership status. * Returns the updated project record. * + * @deprecated replace with removeFollowersForProject + * * @param project The project to remove followers from. * @return response */ @@ -192,6 +204,8 @@ public function removeFollowers($project, $params = array(), $options = array()) /** * Adds the specified list of users as members of the project. Returns the updated project record. * + * @deprecated replace with addMembersForProject + * * @param project The project to add members to. * @return response */ @@ -204,6 +218,8 @@ public function addMembers($project, $params = array(), $options = array()) /** * Removes the specified list of members from the project. Returns the updated project record. * + * @deprecated replace with removeMembersForProject + * * @param project The project to remove members from. * @return response */ @@ -216,6 +232,8 @@ public function removeMembers($project, $params = array(), $options = array()) /** * Create a new custom field setting on the project. * + * @deprecated replace with addCustomFieldSettingForProject + * * @param project The project to associate the custom field with * @return response */ @@ -228,6 +246,8 @@ public function addCustomFieldSetting($project, $params = array(), $options = ar /** * Remove a custom field setting on the project. * + * @deprecated replace with removeCustomFieldSettingForProject + * * @param project The project to associate the custom field with * @return response */ diff --git a/src/Asana/Resources/Sections.php b/src/Asana/Resources/Sections.php index 28b2bd0..a7d03bb 100644 --- a/src/Asana/Resources/Sections.php +++ b/src/Asana/Resources/Sections.php @@ -11,6 +11,8 @@ class Sections extends SectionsBase * * Returns the full record of the newly created section. * + * @deprecated replace with createSectionForProject + * * @param project The project to create the section in * @return response */ @@ -23,6 +25,8 @@ public function createInProject($project, $params = array(), $options = array()) /** * Returns the compact records for all sections in the specified project. * + * @deprecated replace with getSectionsForProject + * * @param project The project to get sections from. * @return response */ @@ -35,6 +39,8 @@ public function findByProject($project, $params = array(), $options = array()) /** * Returns the complete record for a single section. * + * @deprecated replace with getSection + * * @param section The section to get. * @return response */ @@ -56,6 +62,8 @@ public function findById($section, $params = array(), $options = array()) * * Returns the complete updated section record. * + * @deprecated replace with updateSection + * * @param section The section to update. * @return response */ @@ -75,6 +83,8 @@ public function update($section, $params = array(), $options = array()) * * Returns an empty data block. * + * @deprecated replace with deleteSection + * * @param section The section to delete. * @return response */ @@ -91,6 +101,8 @@ public function delete($section, $params = array(), $options = array()) * * This does not work for separators (tasks with the `resource_subtype` of section). * + * @deprecated replace with addTaskForSection + * * @param task The task to add to this section * @return response */ @@ -110,6 +122,8 @@ public function addTask($task, $params = array(), $options = array()) * * Returns an empty data block. * + * @deprecated replace with insertSectionForProject + * * @param project The project in which to reorder the given section * @return response */ diff --git a/src/Asana/Resources/Stories.php b/src/Asana/Resources/Stories.php index 21eaf50..b542bb3 100644 --- a/src/Asana/Resources/Stories.php +++ b/src/Asana/Resources/Stories.php @@ -9,6 +9,8 @@ class Stories extends StoriesBase /** * Returns the compact records for all stories on the task. * + * @deprecated replace with getStoriesForTask + * * @param task Globally unique identifier for the task. * @return response */ @@ -21,6 +23,8 @@ public function findByTask($task, $params = array(), $options = array()) /** * Returns the full record for a single story. * + * @deprecated replace with getStory + * * @param story Globally unique identifier for the story. * @return response */ @@ -37,6 +41,8 @@ public function findById($story, $params = array(), $options = array()) * * Returns the full record for the new story added to the task. * + * @deprecated replace with createStoryForTask + * * @param task Globally unique identifier for the task. * @return response */ @@ -51,6 +57,8 @@ public function createOnTask($task, $params = array(), $options = array()) * Only comment stories can have their text updated, and only comment stories and * attachment stories can be pinned. Only one of `text` and `html_text` can be specified. * + * @deprecated replace with updateStory + * * @param story Globally unique identifier for the story. * @return response */ @@ -63,6 +71,8 @@ public function update($story, $params = array(), $options = array()) /** * Deletes a story. A user can only delete stories they have created. Returns an empty data record. * + * @deprecated replace with deleteStory + * * @param story Globally unique identifier for the story. * @return response */ diff --git a/src/Asana/Resources/Tags.php b/src/Asana/Resources/Tags.php index df86af4..9f15b57 100644 --- a/src/Asana/Resources/Tags.php +++ b/src/Asana/Resources/Tags.php @@ -10,6 +10,8 @@ class Tags extends TagsBase * Returns the compact task records for all tasks with the given tag. * Tasks can have more than one tag at a time. * + * @deprecated replace with Tasks.getTasksForTag + * * @param tag The tag to fetch tasks from. * @return response */ @@ -29,6 +31,8 @@ public function getTasksWithTag($tag, $params = array(), $options = array()) * * Returns the full record of the newly created tag. * + * @deprecated replace with createTag + * * @return response */ public function create($params = array(), $options = array()) @@ -46,6 +50,8 @@ public function create($params = array(), $options = array()) * * Returns the full record of the newly created tag. * + * @deprecated replace with createTagForWorkspace + * * @param workspace The workspace or organization to create the tag in. * @return response */ @@ -58,6 +64,8 @@ public function createInWorkspace($workspace, $params = array(), $options = arra /** * Returns the complete tag record for a single tag. * + * @deprecated replace with getTag + * * @param tag The tag to get. * @return response */ @@ -77,6 +85,8 @@ public function findById($tag, $params = array(), $options = array()) * * Returns the complete updated tag record. * + * @deprecated replace with updateTag + * * @param tag The tag to update. * @return response */ @@ -92,6 +102,8 @@ public function update($tag, $params = array(), $options = array()) * * Returns an empty data record. * + * @deprecated replace with deleteTag + * * @param tag The tag to delete. * @return response */ @@ -105,6 +117,8 @@ public function delete($tag, $params = array(), $options = array()) * Returns the compact tag records for some filtered set of tags. * Use one or more of the parameters provided to filter the tags returned. * + * @deprecated replace with getTags + * * @return response */ public function findAll($params = array(), $options = array()) @@ -115,6 +129,8 @@ public function findAll($params = array(), $options = array()) /** * Returns the compact tag records for all tags in the workspace. * + * @deprecated replace with getTagsForWorkspace + * * @param workspace The workspace or organization to find tags in. * @return response */ diff --git a/src/Asana/Resources/Tasks.php b/src/Asana/Resources/Tasks.php index eb219e5..6bc5b89 100644 --- a/src/Asana/Resources/Tasks.php +++ b/src/Asana/Resources/Tasks.php @@ -23,6 +23,8 @@ public function search($workspace, $params = array(), $options = array()) * `projects` can be a comma separated list of projects, or just a single * project the task should belong to. * + * @deprecated replace with createTask + * * @return response */ public function create($params = array(), $options = array()) @@ -39,6 +41,8 @@ public function create($params = array(), $options = array()) * workspace cannot be changed once set. The workspace need not be set * explicitly if you specify a `project` or a `parent` task instead. * + * @deprecated replace with createTaskForWorkspace + * * @param workspace The workspace to create a task in. * @return response */ @@ -51,6 +55,8 @@ public function createInWorkspace($workspace, $params = array(), $options = arra /** * Returns the complete task record for a single task. * + * @deprecated replace with getTask + * * @param task The task to get. * @return response */ @@ -71,6 +77,8 @@ public function findById($task, $params = array(), $options = array()) * * Returns the complete updated task record. * + * @deprecated replace with updateTask + * * @param task The task to update. * @return response */ @@ -88,6 +96,8 @@ public function update($task, $params = array(), $options = array()) * * Returns an empty data record. * + * @deprecated replace with deleteTask + * * @param task The task to delete. * @return response */ @@ -97,22 +107,12 @@ public function delete($task, $params = array(), $options = array()) return $this->client->delete($path, $params, $options); } - /** - * Creates and returns a job that will asynchronously handle the duplication. - * - * @param task The task to duplicate. - * @return response - */ - public function duplicateTask($task, $params = array(), $options = array()) - { - $path = sprintf("/tasks/%s/duplicate", $task); - return $this->client->post($path, $params, $options); - } - /** * Returns the compact task records for all tasks within the given project, * ordered by their priority within the project. * + * @deprecated replace with getTasksForProject + * * @param project The project in which to search for tasks. * @return response */ @@ -125,6 +125,8 @@ public function findByProject($project, $params = array(), $options = array()) /** * Returns the compact task records for all tasks with the given tag. * + * @deprecated replace with getTasksForTag + * * @param tag The tag in which to search for tasks. * @return response */ @@ -137,6 +139,8 @@ public function findByTag($tag, $params = array(), $options = array()) /** * Board view only: Returns the compact section records for all tasks within the given section. * + * @deprecated replace with getTasksForSection + * * @param section The section in which to search for tasks. * @return response */ @@ -165,6 +169,8 @@ public function findBySection($section, $params = array(), $options = array()) * will return only incomplete tasks, which is the default view for "My * Tasks" in Asana.) * + * @deprecated replace with getTasksForUserTaskList + * * @param user_task_list The user task list in which to search for tasks. * @return response */ @@ -180,6 +186,8 @@ public function findByUserTaskList($userTaskList, $params = array(), $options = * specify a `project`, `section`, `tag`, or `user_task_list` if you do not * specify `assignee` and `workspace`. * + * @deprecated replace with getTasks + * * @return response */ public function findAll($params = array(), $options = array()) @@ -190,6 +198,8 @@ public function findAll($params = array(), $options = array()) /** * The search endpoint allows you to build complex queries to find and fetch exactly the data you need from Asana. For a more comprehensive description of all the query parameters and limitations of this endpoint, see our [long-form documentation](/developers/documentation/getting-started/search-api) for this feature. * + * @deprecated replace with searchTasksForWorkspace + * * @param workspace The workspace or organization in which to search for tasks. * @return response */ @@ -202,6 +212,8 @@ public function searchInWorkspace($workspace, $params = array(), $options = arra /** * Returns the compact representations of all of the dependencies of a task. * + * @deprecated replace with getDependenciesForTask + * * @param task The task to get dependencies on. * @return response */ @@ -214,6 +226,8 @@ public function dependencies($task, $params = array(), $options = array()) /** * Returns the compact representations of all of the dependents of a task. * + * @deprecated replace with getDependentsForTask + * * @param task The task to get dependents on. * @return response */ @@ -227,6 +241,8 @@ public function dependents($task, $params = array(), $options = array()) * Marks a set of tasks as dependencies of this task, if they are not * already dependencies. *A task can have at most 15 dependencies.* * + * @deprecated replace with addDependenciesForTask + * * @param task The task to add dependencies to. * @return response */ @@ -240,6 +256,8 @@ public function addDependencies($task, $params = array(), $options = array()) * Marks a set of tasks as dependents of this task, if they are not already * dependents. *A task can have at most 30 dependents.* * + * @deprecated replace with addDependentsForTask + * * @param task The task to add dependents to. * @return response */ @@ -252,6 +270,8 @@ public function addDependents($task, $params = array(), $options = array()) /** * Unlinks a set of dependencies from this task. * + * @deprecated replace with removeDependenciesForTask + * * @param task The task to remove dependencies from. * @return response */ @@ -264,6 +284,8 @@ public function removeDependencies($task, $params = array(), $options = array()) /** * Unlinks a set of dependents from this task. * + * @deprecated replace with removeDependentsForTask + * * @param task The task to remove dependents from. * @return response */ @@ -277,6 +299,8 @@ public function removeDependents($task, $params = array(), $options = array()) * Adds each of the specified followers to the task, if they are not already * following. Returns the complete, updated record for the affected task. * + * @deprecated replace with addFollowersForTask + * * @param task The task to add followers to. * @return response */ @@ -290,6 +314,8 @@ public function addFollowers($task, $params = array(), $options = array()) * Removes each of the specified followers from the task if they are * following. Returns the complete, updated record for the affected task. * + * @deprecated replace with removeFollowersForTask + * * @param task The task to remove followers from. * @return response */ @@ -302,6 +328,8 @@ public function removeFollowers($task, $params = array(), $options = array()) /** * Returns a compact representation of all of the projects the task is in. * + * @deprecated replace with Tasks.getProjectsForTask + * * @param task The task to get projects on. * @return response */ @@ -327,6 +355,8 @@ public function projects($task, $params = array(), $options = array()) * * Returns an empty data block. * + * @deprecated replace with addProjectForTask + * * @param task The task to add to a project. * @return response */ @@ -342,6 +372,8 @@ public function addProject($task, $params = array(), $options = array()) * * Returns an empty data block. * + * @deprecated replace with removeProjectForTask + * * @param task The task to remove from a project. * @return response */ @@ -354,6 +386,8 @@ public function removeProject($task, $params = array(), $options = array()) /** * Returns a compact representation of all of the tags the task has. * + * @deprecated replace with Tags.getTagsForTask + * * @param task The task to get tags on. * @return response */ @@ -366,6 +400,8 @@ public function tags($task, $params = array(), $options = array()) /** * Adds a tag to a task. Returns an empty data block. * + * @deprecated replace with addTagForTask + * * @param task The task to add a tag to. * @return response */ @@ -378,6 +414,8 @@ public function addTag($task, $params = array(), $options = array()) /** * Removes a tag from the task. Returns an empty data block. * + * @deprecated replace with removeTagForTask + * * @param task The task to remove a tag from. * @return response */ @@ -390,6 +428,8 @@ public function removeTag($task, $params = array(), $options = array()) /** * Returns a compact representation of all of the subtasks of a task. * + * @deprecated replace with getSubtasksForTask + * * @param task The task to get the subtasks of. * @return response */ @@ -403,6 +443,8 @@ public function subtasks($task, $params = array(), $options = array()) * Creates a new subtask and adds it to the parent task. Returns the full record * for the newly created subtask. * + * @deprecated replace with createSubtaskForTask + * * @param task The task to add a subtask to. * @return response */ @@ -415,6 +457,8 @@ public function addSubtask($task, $params = array(), $options = array()) /** * Returns a compact representation of all of the stories on the task. * + * @deprecated replace with Stories.createStoryForTask + * * @param task The task containing the stories to get. * @return response */ @@ -431,6 +475,8 @@ public function stories($task, $params = array(), $options = array()) * * Returns the full record for the new story added to the task. * + * @deprecated replace with Stories.createStoryForTask + * * @param task Globally unique identifier for the task. * @return response */ diff --git a/src/Asana/Resources/TeamMemberships.php b/src/Asana/Resources/TeamMemberships.php new file mode 100644 index 0000000..35ddbaa --- /dev/null +++ b/src/Asana/Resources/TeamMemberships.php @@ -0,0 +1,9 @@ +client = $client; @@ -15,15 +15,15 @@ class {{classname}}Base { {{#operation}} {{#contents}} + /** {{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} + * + {{#pathParams}} + * @param ${{paramName}} {{dataType}}: {{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}{{#description}} {{{description}}}{{/description}} + {{/pathParams}} + * @param $params object + * @return response + */ public function {{operationId}}({{#pathParams}}${{paramName}}, {{/pathParams}}$params = array(), $options = array()) { - /** {{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} - * - {{#pathParams}} - * @param ${{paramName}} {{dataType}}: {{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}{{#description}} {{{description}}}{{/description}} - {{/pathParams}} - * @param $params {{dataType}}: {{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}{{#description}} {{{description}}}{{/description}} - * @return response - */ $path = "{{path}}"; {{#pathParams}} $path = str_replace($path,"{ {{~baseName~}} }", ${{paramName}}); From 99514f8f985e1c5fe4e3e7dac570127537ccc507 Mon Sep 17 00:00:00 2001 From: Ross Grambo Date: Fri, 24 Jan 2020 15:13:07 -0800 Subject: [PATCH 03/11] Changed annotated type from object to array --- src/Asana/Resources/Gen/AttachmentsBase.php | 20 +-- src/Asana/Resources/Gen/BatchAPIBase.php | 3 +- .../Resources/Gen/CustomFieldSettingsBase.php | 10 +- src/Asana/Resources/Gen/CustomFieldsBase.php | 38 +++--- src/Asana/Resources/Gen/EventsBase.php | 3 +- src/Asana/Resources/Gen/JobsBase.php | 5 +- .../Resources/Gen/OrganizationExportsBase.php | 8 +- .../Gen/PortfolioMembershipsBase.php | 13 +- src/Asana/Resources/Gen/PortfoliosBase.php | 56 +++++--- .../Resources/Gen/ProjectMembershipsBase.php | 10 +- .../Resources/Gen/ProjectStatusesBase.php | 20 +-- src/Asana/Resources/Gen/ProjectsBase.php | 86 +++++++----- src/Asana/Resources/Gen/SectionsBase.php | 35 +++-- src/Asana/Resources/Gen/StoriesBase.php | 25 ++-- src/Asana/Resources/Gen/TagsBase.php | 31 +++-- src/Asana/Resources/Gen/TasksBase.php | 126 +++++++++++------- .../Resources/Gen/TeamMembershipsBase.php | 18 ++- src/Asana/Resources/Gen/TeamsBase.php | 25 ++-- src/Asana/Resources/Gen/TypeaheadBase.php | 5 +- src/Asana/Resources/Gen/UserTaskListsBase.php | 10 +- src/Asana/Resources/Gen/UsersBase.php | 23 ++-- src/Asana/Resources/Gen/WebhooksBase.php | 16 ++- .../Gen/WorkspaceMembershipsBase.php | 15 ++- src/Asana/Resources/Gen/WorkspacesBase.php | 23 ++-- swagger_templates/api.mustache | 5 +- 25 files changed, 381 insertions(+), 248 deletions(-) diff --git a/src/Asana/Resources/Gen/AttachmentsBase.php b/src/Asana/Resources/Gen/AttachmentsBase.php index 59e2707..0df850d 100644 --- a/src/Asana/Resources/Gen/AttachmentsBase.php +++ b/src/Asana/Resources/Gen/AttachmentsBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Upload an attachment * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function createAttachmentForTask($task_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function createAttachmentForTask($task_gid, $params = array(), $options = /** Delete an attachment * - * @param $attachment_gid string: (required) Globally unique identifier for the attachment. - * @param $params object + * @param string $attachment_gid (required) Globally unique identifier for the attachment. + * @param array $params + * @param array $options * @return response */ public function deleteAttachment($attachment_gid, $params = array(), $options = array()) { @@ -38,8 +40,9 @@ public function deleteAttachment($attachment_gid, $params = array(), $options = /** Get an attachment * - * @param $attachment_gid string: (required) Globally unique identifier for the attachment. - * @param $params object + * @param string $attachment_gid (required) Globally unique identifier for the attachment. + * @param array $params + * @param array $options * @return response */ public function getAttachment($attachment_gid, $params = array(), $options = array()) { @@ -50,8 +53,9 @@ public function getAttachment($attachment_gid, $params = array(), $options = arr /** Get attachments for a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function getAttachmentsForTask($task_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/BatchAPIBase.php b/src/Asana/Resources/Gen/BatchAPIBase.php index c6f78d4..81c6d2d 100644 --- a/src/Asana/Resources/Gen/BatchAPIBase.php +++ b/src/Asana/Resources/Gen/BatchAPIBase.php @@ -14,7 +14,8 @@ public function __construct($client) /** Submit parallel requests * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function createBatchRequestAction($params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/CustomFieldSettingsBase.php b/src/Asana/Resources/Gen/CustomFieldSettingsBase.php index 66bc99d..345f81e 100644 --- a/src/Asana/Resources/Gen/CustomFieldSettingsBase.php +++ b/src/Asana/Resources/Gen/CustomFieldSettingsBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Get a portfolio's custom fields * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function getCustomFieldSettingsForPortfolio($portfolio_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function getCustomFieldSettingsForPortfolio($portfolio_gid, $params = arr /** Get a project's custom fields * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function getCustomFieldSettingsForProject($project_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/CustomFieldsBase.php b/src/Asana/Resources/Gen/CustomFieldsBase.php index db2b14e..1184c2e 100644 --- a/src/Asana/Resources/Gen/CustomFieldsBase.php +++ b/src/Asana/Resources/Gen/CustomFieldsBase.php @@ -14,7 +14,8 @@ public function __construct($client) /** Create a custom field * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function createCustomField($params = array(), $options = array()) { @@ -24,8 +25,9 @@ public function createCustomField($params = array(), $options = array()) { /** Create an enum option * - * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. - * @param $params object + * @param string $custom_field_gid (required) Globally unique identifier for the custom field. + * @param array $params + * @param array $options * @return response */ public function createEnumOptionForCustomField($custom_field_gid, $params = array(), $options = array()) { @@ -36,8 +38,9 @@ public function createEnumOptionForCustomField($custom_field_gid, $params = arra /** Delete a custom field * - * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. - * @param $params object + * @param string $custom_field_gid (required) Globally unique identifier for the custom field. + * @param array $params + * @param array $options * @return response */ public function deleteCustomField($custom_field_gid, $params = array(), $options = array()) { @@ -48,8 +51,9 @@ public function deleteCustomField($custom_field_gid, $params = array(), $options /** Get a custom field * - * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. - * @param $params object + * @param string $custom_field_gid (required) Globally unique identifier for the custom field. + * @param array $params + * @param array $options * @return response */ public function getCustomField($custom_field_gid, $params = array(), $options = array()) { @@ -60,8 +64,9 @@ public function getCustomField($custom_field_gid, $params = array(), $options = /** Get a workspace's custom fields * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function getCustomFieldsForWorkspace($workspace_gid, $params = array(), $options = array()) { @@ -72,8 +77,9 @@ public function getCustomFieldsForWorkspace($workspace_gid, $params = array(), $ /** Reorder a custom field's enum * - * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. - * @param $params object + * @param string $custom_field_gid (required) Globally unique identifier for the custom field. + * @param array $params + * @param array $options * @return response */ public function insertEnumOptionForCustomField($custom_field_gid, $params = array(), $options = array()) { @@ -84,8 +90,9 @@ public function insertEnumOptionForCustomField($custom_field_gid, $params = arra /** Update a custom field * - * @param $custom_field_gid string: (required) Globally unique identifier for the custom field. - * @param $params object + * @param string $custom_field_gid (required) Globally unique identifier for the custom field. + * @param array $params + * @param array $options * @return response */ public function updateCustomField($custom_field_gid, $params = array(), $options = array()) { @@ -96,8 +103,9 @@ public function updateCustomField($custom_field_gid, $params = array(), $options /** Update an enum option * - * @param $enum_option_gid string: (required) Globally unique identifier for the enum option. - * @param $params object + * @param string $enum_option_gid (required) Globally unique identifier for the enum option. + * @param array $params + * @param array $options * @return response */ public function updateEnumOption($enum_option_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/EventsBase.php b/src/Asana/Resources/Gen/EventsBase.php index dcaee04..935e719 100644 --- a/src/Asana/Resources/Gen/EventsBase.php +++ b/src/Asana/Resources/Gen/EventsBase.php @@ -14,7 +14,8 @@ public function __construct($client) /** Get events on a resource * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function getEvents($params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/JobsBase.php b/src/Asana/Resources/Gen/JobsBase.php index 083cb61..bec90bb 100644 --- a/src/Asana/Resources/Gen/JobsBase.php +++ b/src/Asana/Resources/Gen/JobsBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Get a job by id * - * @param $job_gid string: (required) Globally unique identifier for the job. - * @param $params object + * @param string $job_gid (required) Globally unique identifier for the job. + * @param array $params + * @param array $options * @return response */ public function getJob($job_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/OrganizationExportsBase.php b/src/Asana/Resources/Gen/OrganizationExportsBase.php index 9b50117..f528707 100644 --- a/src/Asana/Resources/Gen/OrganizationExportsBase.php +++ b/src/Asana/Resources/Gen/OrganizationExportsBase.php @@ -14,7 +14,8 @@ public function __construct($client) /** Create an organization export request * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function createOrganizationExport($params = array(), $options = array()) { @@ -24,8 +25,9 @@ public function createOrganizationExport($params = array(), $options = array()) /** Get details on an org export request * - * @param $organization_export_gid string: (required) Globally unique identifier for the organization export. - * @param $params object + * @param string $organization_export_gid (required) Globally unique identifier for the organization export. + * @param array $params + * @param array $options * @return response */ public function getOrganizationExport($organization_export_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/PortfolioMembershipsBase.php b/src/Asana/Resources/Gen/PortfolioMembershipsBase.php index c0b54dd..ff0b38a 100644 --- a/src/Asana/Resources/Gen/PortfolioMembershipsBase.php +++ b/src/Asana/Resources/Gen/PortfolioMembershipsBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Get a portfolio membership * - * @param $portfolio_membership_path_gid string: (required) - * @param $params object + * @param string $portfolio_membership_path_gid (required) + * @param array $params + * @param array $options * @return response */ public function getPortfolioMembership($portfolio_membership_path_gid, $params = array(), $options = array()) { @@ -26,7 +27,8 @@ public function getPortfolioMembership($portfolio_membership_path_gid, $params = /** Get multiple portfolio memberships * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function getPortfolioMemberships($params = array(), $options = array()) { @@ -36,8 +38,9 @@ public function getPortfolioMemberships($params = array(), $options = array()) { /** Get memberships from a portfolio * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function getPortfolioMembershipsForPortfolio($portfolio_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/PortfoliosBase.php b/src/Asana/Resources/Gen/PortfoliosBase.php index 70095e4..0b27993 100644 --- a/src/Asana/Resources/Gen/PortfoliosBase.php +++ b/src/Asana/Resources/Gen/PortfoliosBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Add a custom field to a portfolio * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function addCustomFieldSettingForPortfolio($portfolio_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function addCustomFieldSettingForPortfolio($portfolio_gid, $params = arra /** Add a portfolio item * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function addItemForPortfolio($portfolio_gid, $params = array(), $options = array()) { @@ -38,8 +40,9 @@ public function addItemForPortfolio($portfolio_gid, $params = array(), $options /** Add users to a portfolio * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function addMembersForPortfolio($portfolio_gid, $params = array(), $options = array()) { @@ -50,7 +53,8 @@ public function addMembersForPortfolio($portfolio_gid, $params = array(), $optio /** Create a portfolio * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function createPortfolio($params = array(), $options = array()) { @@ -60,8 +64,9 @@ public function createPortfolio($params = array(), $options = array()) { /** Delete a portfolio * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function deletePortfolio($portfolio_gid, $params = array(), $options = array()) { @@ -72,8 +77,9 @@ public function deletePortfolio($portfolio_gid, $params = array(), $options = ar /** Get portfolio items * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function getItemsForPortfolio($portfolio_gid, $params = array(), $options = array()) { @@ -84,8 +90,9 @@ public function getItemsForPortfolio($portfolio_gid, $params = array(), $options /** Get a portfolio * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function getPortfolio($portfolio_gid, $params = array(), $options = array()) { @@ -96,7 +103,8 @@ public function getPortfolio($portfolio_gid, $params = array(), $options = array /** Get multiple portfolios * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function getPortfolios($params = array(), $options = array()) { @@ -106,8 +114,9 @@ public function getPortfolios($params = array(), $options = array()) { /** Remove a custom field from a portfolio * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function removeCustomFieldSettingForPortfolio($portfolio_gid, $params = array(), $options = array()) { @@ -118,8 +127,9 @@ public function removeCustomFieldSettingForPortfolio($portfolio_gid, $params = a /** Remove a portfolio item * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function removeItemForPortfolio($portfolio_gid, $params = array(), $options = array()) { @@ -130,8 +140,9 @@ public function removeItemForPortfolio($portfolio_gid, $params = array(), $optio /** Remove users from a portfolio * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function removeMembersForPortfolio($portfolio_gid, $params = array(), $options = array()) { @@ -142,8 +153,9 @@ public function removeMembersForPortfolio($portfolio_gid, $params = array(), $op /** Update a portfolio * - * @param $portfolio_gid string: (required) Globally unique identifier for the portfolio. - * @param $params object + * @param string $portfolio_gid (required) Globally unique identifier for the portfolio. + * @param array $params + * @param array $options * @return response */ public function updatePortfolio($portfolio_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/ProjectMembershipsBase.php b/src/Asana/Resources/Gen/ProjectMembershipsBase.php index 86b7a7c..3c59a88 100644 --- a/src/Asana/Resources/Gen/ProjectMembershipsBase.php +++ b/src/Asana/Resources/Gen/ProjectMembershipsBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Get a project membership * - * @param $project_membership_path_gid string: (required) - * @param $params object + * @param string $project_membership_path_gid (required) + * @param array $params + * @param array $options * @return response */ public function getProjectMembership($project_membership_path_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function getProjectMembership($project_membership_path_gid, $params = arr /** Get memberships from a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function getProjectMembershipsForProject($project_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/ProjectStatusesBase.php b/src/Asana/Resources/Gen/ProjectStatusesBase.php index 078bc5a..2ce4694 100644 --- a/src/Asana/Resources/Gen/ProjectStatusesBase.php +++ b/src/Asana/Resources/Gen/ProjectStatusesBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Create a project status * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function createProjectStatusForProject($project_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function createProjectStatusForProject($project_gid, $params = array(), $ /** Delete a project status * - * @param $project_status_path_gid string: (required) The project status update to get. - * @param $params object + * @param string $project_status_path_gid (required) The project status update to get. + * @param array $params + * @param array $options * @return response */ public function deleteProjectStatus($project_status_path_gid, $params = array(), $options = array()) { @@ -38,8 +40,9 @@ public function deleteProjectStatus($project_status_path_gid, $params = array(), /** Get a project status * - * @param $project_status_path_gid string: (required) The project status update to get. - * @param $params object + * @param string $project_status_path_gid (required) The project status update to get. + * @param array $params + * @param array $options * @return response */ public function getProjectStatus($project_status_path_gid, $params = array(), $options = array()) { @@ -50,8 +53,9 @@ public function getProjectStatus($project_status_path_gid, $params = array(), $o /** Get statuses from a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function getProjectStatusesForProject($project_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/ProjectsBase.php b/src/Asana/Resources/Gen/ProjectsBase.php index c3f7f0e..6300b65 100644 --- a/src/Asana/Resources/Gen/ProjectsBase.php +++ b/src/Asana/Resources/Gen/ProjectsBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Add a custom field to a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function addCustomFieldSettingForProject($project_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function addCustomFieldSettingForProject($project_gid, $params = array(), /** Add users to a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function addFollowersForProject($project_gid, $params = array(), $options = array()) { @@ -38,8 +40,9 @@ public function addFollowersForProject($project_gid, $params = array(), $options /** Add users to a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function addMembersForProject($project_gid, $params = array(), $options = array()) { @@ -50,7 +53,8 @@ public function addMembersForProject($project_gid, $params = array(), $options = /** Create a project * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function createProject($params = array(), $options = array()) { @@ -60,8 +64,9 @@ public function createProject($params = array(), $options = array()) { /** Create a project in a team * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params object + * @param string $team_gid (required) Globally unique identifier for the team. + * @param array $params + * @param array $options * @return response */ public function createProjectForTeam($team_gid, $params = array(), $options = array()) { @@ -72,8 +77,9 @@ public function createProjectForTeam($team_gid, $params = array(), $options = ar /** Create a project in a workspace * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function createProjectForWorkspace($workspace_gid, $params = array(), $options = array()) { @@ -84,8 +90,9 @@ public function createProjectForWorkspace($workspace_gid, $params = array(), $op /** Delete a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function deleteProject($project_gid, $params = array(), $options = array()) { @@ -96,8 +103,9 @@ public function deleteProject($project_gid, $params = array(), $options = array( /** Duplicate a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function duplicateProject($project_gid, $params = array(), $options = array()) { @@ -108,8 +116,9 @@ public function duplicateProject($project_gid, $params = array(), $options = arr /** Get a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function getProject($project_gid, $params = array(), $options = array()) { @@ -120,7 +129,8 @@ public function getProject($project_gid, $params = array(), $options = array()) /** Get multiple projects * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function getProjects($params = array(), $options = array()) { @@ -130,8 +140,9 @@ public function getProjects($params = array(), $options = array()) { /** Get projects a task is in * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function getProjectsForTask($task_gid, $params = array(), $options = array()) { @@ -142,8 +153,9 @@ public function getProjectsForTask($task_gid, $params = array(), $options = arra /** Get a team's projects * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params object + * @param string $team_gid (required) Globally unique identifier for the team. + * @param array $params + * @param array $options * @return response */ public function getProjectsForTeam($team_gid, $params = array(), $options = array()) { @@ -154,8 +166,9 @@ public function getProjectsForTeam($team_gid, $params = array(), $options = arra /** Get all projects in a workspace * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function getProjectsForWorkspace($workspace_gid, $params = array(), $options = array()) { @@ -166,8 +179,9 @@ public function getProjectsForWorkspace($workspace_gid, $params = array(), $opti /** Get task count of a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function getTaskCountsForProject($project_gid, $params = array(), $options = array()) { @@ -178,8 +192,9 @@ public function getTaskCountsForProject($project_gid, $params = array(), $option /** Remove a custom field from a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function removeCustomFieldSettingForProject($project_gid, $params = array(), $options = array()) { @@ -190,8 +205,9 @@ public function removeCustomFieldSettingForProject($project_gid, $params = array /** Remove followers from a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function removeFollowersForProject($project_gid, $params = array(), $options = array()) { @@ -202,8 +218,9 @@ public function removeFollowersForProject($project_gid, $params = array(), $opti /** Remove users from a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function removeMembersForProject($project_gid, $params = array(), $options = array()) { @@ -214,8 +231,9 @@ public function removeMembersForProject($project_gid, $params = array(), $option /** Update a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function updateProject($project_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/SectionsBase.php b/src/Asana/Resources/Gen/SectionsBase.php index b1dc4f7..c47af35 100644 --- a/src/Asana/Resources/Gen/SectionsBase.php +++ b/src/Asana/Resources/Gen/SectionsBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Add task to section * - * @param $section_gid string: (required) The globally unique identifier for the section. - * @param $params object + * @param string $section_gid (required) The globally unique identifier for the section. + * @param array $params + * @param array $options * @return response */ public function addTaskForSection($section_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function addTaskForSection($section_gid, $params = array(), $options = ar /** Create a section in a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function createSectionForProject($project_gid, $params = array(), $options = array()) { @@ -38,8 +40,9 @@ public function createSectionForProject($project_gid, $params = array(), $option /** Delete a section * - * @param $section_gid string: (required) The globally unique identifier for the section. - * @param $params object + * @param string $section_gid (required) The globally unique identifier for the section. + * @param array $params + * @param array $options * @return response */ public function deleteSection($section_gid, $params = array(), $options = array()) { @@ -50,8 +53,9 @@ public function deleteSection($section_gid, $params = array(), $options = array( /** Get a section * - * @param $section_gid string: (required) The globally unique identifier for the section. - * @param $params object + * @param string $section_gid (required) The globally unique identifier for the section. + * @param array $params + * @param array $options * @return response */ public function getSection($section_gid, $params = array(), $options = array()) { @@ -62,8 +66,9 @@ public function getSection($section_gid, $params = array(), $options = array()) /** Get sections in a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function getSectionsForProject($project_gid, $params = array(), $options = array()) { @@ -74,8 +79,9 @@ public function getSectionsForProject($project_gid, $params = array(), $options /** Move or Insert sections * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function insertSectionForProject($project_gid, $params = array(), $options = array()) { @@ -86,8 +92,9 @@ public function insertSectionForProject($project_gid, $params = array(), $option /** Update a section * - * @param $section_gid string: (required) The globally unique identifier for the section. - * @param $params object + * @param string $section_gid (required) The globally unique identifier for the section. + * @param array $params + * @param array $options * @return response */ public function updateSection($section_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/StoriesBase.php b/src/Asana/Resources/Gen/StoriesBase.php index 7985088..0e0816e 100644 --- a/src/Asana/Resources/Gen/StoriesBase.php +++ b/src/Asana/Resources/Gen/StoriesBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Create a story on a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function createStoryForTask($task_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function createStoryForTask($task_gid, $params = array(), $options = arra /** Delete a story * - * @param $story_gid string: (required) Globally unique identifier for the story. - * @param $params object + * @param string $story_gid (required) Globally unique identifier for the story. + * @param array $params + * @param array $options * @return response */ public function deleteStory($story_gid, $params = array(), $options = array()) { @@ -38,8 +40,9 @@ public function deleteStory($story_gid, $params = array(), $options = array()) { /** Get stories from a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function getStoriesForTask($task_gid, $params = array(), $options = array()) { @@ -50,8 +53,9 @@ public function getStoriesForTask($task_gid, $params = array(), $options = array /** Get a story * - * @param $story_gid string: (required) Globally unique identifier for the story. - * @param $params object + * @param string $story_gid (required) Globally unique identifier for the story. + * @param array $params + * @param array $options * @return response */ public function getStory($story_gid, $params = array(), $options = array()) { @@ -62,8 +66,9 @@ public function getStory($story_gid, $params = array(), $options = array()) { /** Update a story * - * @param $story_gid string: (required) Globally unique identifier for the story. - * @param $params object + * @param string $story_gid (required) Globally unique identifier for the story. + * @param array $params + * @param array $options * @return response */ public function updateStory($story_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/TagsBase.php b/src/Asana/Resources/Gen/TagsBase.php index 6c47aa4..2ef96ac 100644 --- a/src/Asana/Resources/Gen/TagsBase.php +++ b/src/Asana/Resources/Gen/TagsBase.php @@ -14,7 +14,8 @@ public function __construct($client) /** Create a tag * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function createTag($params = array(), $options = array()) { @@ -24,8 +25,9 @@ public function createTag($params = array(), $options = array()) { /** Create a tag in a workspace * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function createTagForWorkspace($workspace_gid, $params = array(), $options = array()) { @@ -36,8 +38,9 @@ public function createTagForWorkspace($workspace_gid, $params = array(), $option /** Get a tag * - * @param $tag_gid string: (required) Globally unique identifier for the tag. - * @param $params object + * @param string $tag_gid (required) Globally unique identifier for the tag. + * @param array $params + * @param array $options * @return response */ public function getTag($tag_gid, $params = array(), $options = array()) { @@ -48,7 +51,8 @@ public function getTag($tag_gid, $params = array(), $options = array()) { /** Get multiple tags * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function getTags($params = array(), $options = array()) { @@ -58,8 +62,9 @@ public function getTags($params = array(), $options = array()) { /** Get a task's tags * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function getTagsForTask($task_gid, $params = array(), $options = array()) { @@ -70,8 +75,9 @@ public function getTagsForTask($task_gid, $params = array(), $options = array()) /** Get tags in a workspace * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function getTagsForWorkspace($workspace_gid, $params = array(), $options = array()) { @@ -82,8 +88,9 @@ public function getTagsForWorkspace($workspace_gid, $params = array(), $options /** Update a tag * - * @param $tag_gid string: (required) Globally unique identifier for the tag. - * @param $params object + * @param string $tag_gid (required) Globally unique identifier for the tag. + * @param array $params + * @param array $options * @return response */ public function updateTag($tag_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/TasksBase.php b/src/Asana/Resources/Gen/TasksBase.php index 5385e21..8e6581c 100644 --- a/src/Asana/Resources/Gen/TasksBase.php +++ b/src/Asana/Resources/Gen/TasksBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Set dependencies for a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function addDependenciesForTask($task_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function addDependenciesForTask($task_gid, $params = array(), $options = /** Set dependents for a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function addDependentsForTask($task_gid, $params = array(), $options = array()) { @@ -38,8 +40,9 @@ public function addDependentsForTask($task_gid, $params = array(), $options = ar /** Add followers to a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function addFollowersForTask($task_gid, $params = array(), $options = array()) { @@ -50,8 +53,9 @@ public function addFollowersForTask($task_gid, $params = array(), $options = arr /** Add a project to a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function addProjectForTask($task_gid, $params = array(), $options = array()) { @@ -62,8 +66,9 @@ public function addProjectForTask($task_gid, $params = array(), $options = array /** Add a tag to a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function addTagForTask($task_gid, $params = array(), $options = array()) { @@ -74,8 +79,9 @@ public function addTagForTask($task_gid, $params = array(), $options = array()) /** Create a subtask * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function createSubtaskForTask($task_gid, $params = array(), $options = array()) { @@ -86,7 +92,8 @@ public function createSubtaskForTask($task_gid, $params = array(), $options = ar /** Create a task * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function createTask($params = array(), $options = array()) { @@ -96,8 +103,9 @@ public function createTask($params = array(), $options = array()) { /** Delete a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function deleteTask($task_gid, $params = array(), $options = array()) { @@ -108,8 +116,9 @@ public function deleteTask($task_gid, $params = array(), $options = array()) { /** Duplicate a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function duplicateTask($task_gid, $params = array(), $options = array()) { @@ -120,8 +129,9 @@ public function duplicateTask($task_gid, $params = array(), $options = array()) /** Get dependencies from a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function getDependenciesForTask($task_gid, $params = array(), $options = array()) { @@ -132,8 +142,9 @@ public function getDependenciesForTask($task_gid, $params = array(), $options = /** Get dependents from a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function getDependentsForTask($task_gid, $params = array(), $options = array()) { @@ -144,8 +155,9 @@ public function getDependentsForTask($task_gid, $params = array(), $options = ar /** Get subtasks from a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function getSubtasksForTask($task_gid, $params = array(), $options = array()) { @@ -156,8 +168,9 @@ public function getSubtasksForTask($task_gid, $params = array(), $options = arra /** Get a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function getTask($task_gid, $params = array(), $options = array()) { @@ -168,7 +181,8 @@ public function getTask($task_gid, $params = array(), $options = array()) { /** Get multiple tasks * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function getTasks($params = array(), $options = array()) { @@ -178,8 +192,9 @@ public function getTasks($params = array(), $options = array()) { /** Get tasks from a project * - * @param $project_gid string: (required) Globally unique identifier for the project. - * @param $params object + * @param string $project_gid (required) Globally unique identifier for the project. + * @param array $params + * @param array $options * @return response */ public function getTasksForProject($project_gid, $params = array(), $options = array()) { @@ -190,8 +205,9 @@ public function getTasksForProject($project_gid, $params = array(), $options = a /** Get tasks from a section * - * @param $section_gid string: (required) The globally unique identifier for the section. - * @param $params object + * @param string $section_gid (required) The globally unique identifier for the section. + * @param array $params + * @param array $options * @return response */ public function getTasksForSection($section_gid, $params = array(), $options = array()) { @@ -202,8 +218,9 @@ public function getTasksForSection($section_gid, $params = array(), $options = a /** Get tasks from a tag * - * @param $tag_gid string: (required) Globally unique identifier for the tag. - * @param $params object + * @param string $tag_gid (required) Globally unique identifier for the tag. + * @param array $params + * @param array $options * @return response */ public function getTasksForTag($tag_gid, $params = array(), $options = array()) { @@ -214,8 +231,9 @@ public function getTasksForTag($tag_gid, $params = array(), $options = array()) /** Get tasks from a user task list * - * @param $user_task_list_gid string: (required) Globally unique identifier for the user task list. - * @param $params object + * @param string $user_task_list_gid (required) Globally unique identifier for the user task list. + * @param array $params + * @param array $options * @return response */ public function getTasksForUserTaskList($user_task_list_gid, $params = array(), $options = array()) { @@ -226,8 +244,9 @@ public function getTasksForUserTaskList($user_task_list_gid, $params = array(), /** Unlink dependencies from a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function removeDependenciesForTask($task_gid, $params = array(), $options = array()) { @@ -238,8 +257,9 @@ public function removeDependenciesForTask($task_gid, $params = array(), $options /** Unlink dependents from a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function removeDependentsForTask($task_gid, $params = array(), $options = array()) { @@ -250,8 +270,9 @@ public function removeDependentsForTask($task_gid, $params = array(), $options = /** Remove followers from a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function removeFollowerForTask($task_gid, $params = array(), $options = array()) { @@ -262,8 +283,9 @@ public function removeFollowerForTask($task_gid, $params = array(), $options = a /** Remove a project from a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function removeProjectForTask($task_gid, $params = array(), $options = array()) { @@ -274,8 +296,9 @@ public function removeProjectForTask($task_gid, $params = array(), $options = ar /** Remove a tag from a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function removeTagForTask($task_gid, $params = array(), $options = array()) { @@ -286,8 +309,9 @@ public function removeTagForTask($task_gid, $params = array(), $options = array( /** Search tasks in a workspace * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function searchTasksForWorkspace($workspace_gid, $params = array(), $options = array()) { @@ -298,8 +322,9 @@ public function searchTasksForWorkspace($workspace_gid, $params = array(), $opti /** Set the parent of a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function setParentForTask($task_gid, $params = array(), $options = array()) { @@ -310,8 +335,9 @@ public function setParentForTask($task_gid, $params = array(), $options = array( /** Update a task * - * @param $task_gid string: (required) The task to operate on. - * @param $params object + * @param string $task_gid (required) The task to operate on. + * @param array $params + * @param array $options * @return response */ public function updateTask($task_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/TeamMembershipsBase.php b/src/Asana/Resources/Gen/TeamMembershipsBase.php index 2de7375..490f905 100644 --- a/src/Asana/Resources/Gen/TeamMembershipsBase.php +++ b/src/Asana/Resources/Gen/TeamMembershipsBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Get a team membership * - * @param $team_membership_path_gid string: (required) - * @param $params object + * @param string $team_membership_path_gid (required) + * @param array $params + * @param array $options * @return response */ public function getTeamMembership($team_membership_path_gid, $params = array(), $options = array()) { @@ -26,7 +27,8 @@ public function getTeamMembership($team_membership_path_gid, $params = array(), /** Get team memberships * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function getTeamMemberships($params = array(), $options = array()) { @@ -36,8 +38,9 @@ public function getTeamMemberships($params = array(), $options = array()) { /** Get memberships from a team * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params object + * @param string $team_gid (required) Globally unique identifier for the team. + * @param array $params + * @param array $options * @return response */ public function getTeamMembershipsForTeam($team_gid, $params = array(), $options = array()) { @@ -48,8 +51,9 @@ public function getTeamMembershipsForTeam($team_gid, $params = array(), $options /** Get memberships from a user * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params object + * @param string $user_gid (required) Globally unique identifier for the user. + * @param array $params + * @param array $options * @return response */ public function getTeamMembershipsForUser($user_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/TeamsBase.php b/src/Asana/Resources/Gen/TeamsBase.php index 633acd4..35e5007 100644 --- a/src/Asana/Resources/Gen/TeamsBase.php +++ b/src/Asana/Resources/Gen/TeamsBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Add a user to a team * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params object + * @param string $team_gid (required) Globally unique identifier for the team. + * @param array $params + * @param array $options * @return response */ public function addUserForTeam($team_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function addUserForTeam($team_gid, $params = array(), $options = array()) /** Get a team * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params object + * @param string $team_gid (required) Globally unique identifier for the team. + * @param array $params + * @param array $options * @return response */ public function getTeam($team_gid, $params = array(), $options = array()) { @@ -38,8 +40,9 @@ public function getTeam($team_gid, $params = array(), $options = array()) { /** Get teams in an organization * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function getTeamsForOrganization($workspace_gid, $params = array(), $options = array()) { @@ -50,8 +53,9 @@ public function getTeamsForOrganization($workspace_gid, $params = array(), $opti /** Get teams for a user * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params object + * @param string $user_gid (required) Globally unique identifier for the user. + * @param array $params + * @param array $options * @return response */ public function getTeamsForUser($user_gid, $params = array(), $options = array()) { @@ -62,8 +66,9 @@ public function getTeamsForUser($user_gid, $params = array(), $options = array() /** Remove a user from a team * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params object + * @param string $team_gid (required) Globally unique identifier for the team. + * @param array $params + * @param array $options * @return response */ public function removeUserForTeam($team_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/TypeaheadBase.php b/src/Asana/Resources/Gen/TypeaheadBase.php index ed9560e..6437a1b 100644 --- a/src/Asana/Resources/Gen/TypeaheadBase.php +++ b/src/Asana/Resources/Gen/TypeaheadBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Get objects via typeahead * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function typeaheadForWorkspace($workspace_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/UserTaskListsBase.php b/src/Asana/Resources/Gen/UserTaskListsBase.php index d1b25a2..3abfd8c 100644 --- a/src/Asana/Resources/Gen/UserTaskListsBase.php +++ b/src/Asana/Resources/Gen/UserTaskListsBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Get a user task list * - * @param $user_task_list_gid string: (required) Globally unique identifier for the user task list. - * @param $params object + * @param string $user_task_list_gid (required) Globally unique identifier for the user task list. + * @param array $params + * @param array $options * @return response */ public function getUserTaskList($user_task_list_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function getUserTaskList($user_task_list_gid, $params = array(), $options /** Get a user's task list * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params object + * @param string $user_gid (required) Globally unique identifier for the user. + * @param array $params + * @param array $options * @return response */ public function getUserTaskListForUser($user_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/UsersBase.php b/src/Asana/Resources/Gen/UsersBase.php index 5b786c6..54643fe 100644 --- a/src/Asana/Resources/Gen/UsersBase.php +++ b/src/Asana/Resources/Gen/UsersBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Get a user's favorites * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params object + * @param string $user_gid (required) Globally unique identifier for the user. + * @param array $params + * @param array $options * @return response */ public function getFavoritesForUser($user_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function getFavoritesForUser($user_gid, $params = array(), $options = arr /** Get a user * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params object + * @param string $user_gid (required) Globally unique identifier for the user. + * @param array $params + * @param array $options * @return response */ public function getUser($user_gid, $params = array(), $options = array()) { @@ -38,7 +40,8 @@ public function getUser($user_gid, $params = array(), $options = array()) { /** Get multiple users * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function getUsers($params = array(), $options = array()) { @@ -48,8 +51,9 @@ public function getUsers($params = array(), $options = array()) { /** Get users in a team * - * @param $team_gid string: (required) Globally unique identifier for the team. - * @param $params object + * @param string $team_gid (required) Globally unique identifier for the team. + * @param array $params + * @param array $options * @return response */ public function getUsersForTeam($team_gid, $params = array(), $options = array()) { @@ -60,8 +64,9 @@ public function getUsersForTeam($team_gid, $params = array(), $options = array() /** Get users in a workspace or organization * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function getUsersForWorkspace($workspace_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/WebhooksBase.php b/src/Asana/Resources/Gen/WebhooksBase.php index 292b179..9840130 100644 --- a/src/Asana/Resources/Gen/WebhooksBase.php +++ b/src/Asana/Resources/Gen/WebhooksBase.php @@ -14,7 +14,8 @@ public function __construct($client) /** Establish a webhook * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function createWebhook($params = array(), $options = array()) { @@ -24,8 +25,9 @@ public function createWebhook($params = array(), $options = array()) { /** Delete a webhook * - * @param $webhook_gid string: (required) Globally unique identifier for the webhook. - * @param $params object + * @param string $webhook_gid (required) Globally unique identifier for the webhook. + * @param array $params + * @param array $options * @return response */ public function deleteWebhook($webhook_gid, $params = array(), $options = array()) { @@ -36,8 +38,9 @@ public function deleteWebhook($webhook_gid, $params = array(), $options = array( /** Get a webhook * - * @param $webhook_gid string: (required) Globally unique identifier for the webhook. - * @param $params object + * @param string $webhook_gid (required) Globally unique identifier for the webhook. + * @param array $params + * @param array $options * @return response */ public function getWebhook($webhook_gid, $params = array(), $options = array()) { @@ -48,7 +51,8 @@ public function getWebhook($webhook_gid, $params = array(), $options = array()) /** Get multiple webhooks * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function getWebhooks($params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php index 9c59d36..0f54933 100644 --- a/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php +++ b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Get a workspace membership * - * @param $workspace_membership_path_gid string: (required) - * @param $params object + * @param string $workspace_membership_path_gid (required) + * @param array $params + * @param array $options * @return response */ public function getWorkspaceMembership($workspace_membership_path_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function getWorkspaceMembership($workspace_membership_path_gid, $params = /** Get workspace memberships for a user * - * @param $user_gid string: (required) Globally unique identifier for the user. - * @param $params object + * @param string $user_gid (required) Globally unique identifier for the user. + * @param array $params + * @param array $options * @return response */ public function getWorkspaceMembershipsForUser($user_gid, $params = array(), $options = array()) { @@ -38,8 +40,9 @@ public function getWorkspaceMembershipsForUser($user_gid, $params = array(), $op /** Get the workspace memberships for a workspace * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function getWorkspaceMembershipsForWorkspace($workspace_gid, $params = array(), $options = array()) { diff --git a/src/Asana/Resources/Gen/WorkspacesBase.php b/src/Asana/Resources/Gen/WorkspacesBase.php index 3b1bf84..bfd3243 100644 --- a/src/Asana/Resources/Gen/WorkspacesBase.php +++ b/src/Asana/Resources/Gen/WorkspacesBase.php @@ -14,8 +14,9 @@ public function __construct($client) /** Add a user to a workspace or organization * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function addUserForWorkspace($workspace_gid, $params = array(), $options = array()) { @@ -26,8 +27,9 @@ public function addUserForWorkspace($workspace_gid, $params = array(), $options /** Get a workspace * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function getWorkspace($workspace_gid, $params = array(), $options = array()) { @@ -38,7 +40,8 @@ public function getWorkspace($workspace_gid, $params = array(), $options = array /** Get multiple workspaces * - * @param $params object + * @param array $params + * @param array $options * @return response */ public function getWorkspaces($params = array(), $options = array()) { @@ -48,8 +51,9 @@ public function getWorkspaces($params = array(), $options = array()) { /** Remove a user from a workspace or organization * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function removeUserForWorkspace($workspace_gid, $params = array(), $options = array()) { @@ -60,8 +64,9 @@ public function removeUserForWorkspace($workspace_gid, $params = array(), $optio /** Update a workspace * - * @param $workspace_gid string: (required) Globally unique identifier for the workspace or organization. - * @param $params object + * @param string $workspace_gid (required) Globally unique identifier for the workspace or organization. + * @param array $params + * @param array $options * @return response */ public function updateWorkspace($workspace_gid, $params = array(), $options = array()) { diff --git a/swagger_templates/api.mustache b/swagger_templates/api.mustache index 3546c22..cbdcd2a 100644 --- a/swagger_templates/api.mustache +++ b/swagger_templates/api.mustache @@ -18,9 +18,10 @@ class {{classname}}Base { /** {{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} * {{#pathParams}} - * @param ${{paramName}} {{dataType}}: {{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}{{#description}} {{{description}}}{{/description}} + * @param {{dataType}} ${{paramName}} {{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}{{#description}} {{{description}}}{{/description}} {{/pathParams}} - * @param $params object + * @param array $params + * @param array $options * @return response */ public function {{operationId}}({{#pathParams}}${{paramName}}, {{/pathParams}}$params = array(), $options = array()) { From a0cf50ecc33da04e13a4a5dcfa6c42db25a2012f Mon Sep 17 00:00:00 2001 From: Ross Grambo Date: Fri, 24 Jan 2020 16:19:30 -0800 Subject: [PATCH 04/11] Fixed replace param ordering --- src/Asana/Resources/Gen/AttachmentsBase.php | 8 ++-- .../Resources/Gen/CustomFieldSettingsBase.php | 4 +- src/Asana/Resources/Gen/CustomFieldsBase.php | 14 +++--- src/Asana/Resources/Gen/JobsBase.php | 2 +- .../Resources/Gen/OrganizationExportsBase.php | 2 +- .../Gen/PortfolioMembershipsBase.php | 4 +- src/Asana/Resources/Gen/PortfoliosBase.php | 20 ++++---- .../Resources/Gen/ProjectMembershipsBase.php | 4 +- .../Resources/Gen/ProjectStatusesBase.php | 8 ++-- src/Asana/Resources/Gen/ProjectsBase.php | 32 ++++++------- src/Asana/Resources/Gen/SectionsBase.php | 14 +++--- src/Asana/Resources/Gen/StoriesBase.php | 10 ++-- src/Asana/Resources/Gen/TagsBase.php | 10 ++-- src/Asana/Resources/Gen/TasksBase.php | 48 +++++++++---------- .../Resources/Gen/TeamMembershipsBase.php | 6 +-- src/Asana/Resources/Gen/TeamsBase.php | 10 ++-- src/Asana/Resources/Gen/TypeaheadBase.php | 2 +- src/Asana/Resources/Gen/UserTaskListsBase.php | 4 +- src/Asana/Resources/Gen/UsersBase.php | 8 ++-- src/Asana/Resources/Gen/WebhooksBase.php | 4 +- .../Gen/WorkspaceMembershipsBase.php | 6 +-- src/Asana/Resources/Gen/WorkspacesBase.php | 8 ++-- swagger_templates/api.mustache | 2 +- 23 files changed, 115 insertions(+), 115 deletions(-) diff --git a/src/Asana/Resources/Gen/AttachmentsBase.php b/src/Asana/Resources/Gen/AttachmentsBase.php index 0df850d..19c206e 100644 --- a/src/Asana/Resources/Gen/AttachmentsBase.php +++ b/src/Asana/Resources/Gen/AttachmentsBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function createAttachmentForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/attachments"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -34,7 +34,7 @@ public function createAttachmentForTask($task_gid, $params = array(), $options = */ public function deleteAttachment($attachment_gid, $params = array(), $options = array()) { $path = "/attachments/{attachment_gid}"; - $path = str_replace($path,"{attachment_gid}", $attachment_gid); + $path = str_replace("{attachment_gid}", $attachment_gid, $path); return $this->client->delete($path, $params, $options); } @@ -47,7 +47,7 @@ public function deleteAttachment($attachment_gid, $params = array(), $options = */ public function getAttachment($attachment_gid, $params = array(), $options = array()) { $path = "/attachments/{attachment_gid}"; - $path = str_replace($path,"{attachment_gid}", $attachment_gid); + $path = str_replace("{attachment_gid}", $attachment_gid, $path); return $this->client->get($path, $params, $options); } @@ -60,7 +60,7 @@ public function getAttachment($attachment_gid, $params = array(), $options = arr */ public function getAttachmentsForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/attachments"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/CustomFieldSettingsBase.php b/src/Asana/Resources/Gen/CustomFieldSettingsBase.php index 345f81e..4c1c415 100644 --- a/src/Asana/Resources/Gen/CustomFieldSettingsBase.php +++ b/src/Asana/Resources/Gen/CustomFieldSettingsBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function getCustomFieldSettingsForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/custom_field_settings"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -34,7 +34,7 @@ public function getCustomFieldSettingsForPortfolio($portfolio_gid, $params = arr */ public function getCustomFieldSettingsForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/custom_field_settings"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/CustomFieldsBase.php b/src/Asana/Resources/Gen/CustomFieldsBase.php index 1184c2e..b079675 100644 --- a/src/Asana/Resources/Gen/CustomFieldsBase.php +++ b/src/Asana/Resources/Gen/CustomFieldsBase.php @@ -32,7 +32,7 @@ public function createCustomField($params = array(), $options = array()) { */ public function createEnumOptionForCustomField($custom_field_gid, $params = array(), $options = array()) { $path = "/custom_fields/{custom_field_gid}/enum_options"; - $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); + $path = str_replace("{custom_field_gid}", $custom_field_gid, $path); return $this->client->post($path, $params, $options); } @@ -45,7 +45,7 @@ public function createEnumOptionForCustomField($custom_field_gid, $params = arra */ public function deleteCustomField($custom_field_gid, $params = array(), $options = array()) { $path = "/custom_fields/{custom_field_gid}"; - $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); + $path = str_replace("{custom_field_gid}", $custom_field_gid, $path); return $this->client->delete($path, $params, $options); } @@ -58,7 +58,7 @@ public function deleteCustomField($custom_field_gid, $params = array(), $options */ public function getCustomField($custom_field_gid, $params = array(), $options = array()) { $path = "/custom_fields/{custom_field_gid}"; - $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); + $path = str_replace("{custom_field_gid}", $custom_field_gid, $path); return $this->client->get($path, $params, $options); } @@ -71,7 +71,7 @@ public function getCustomField($custom_field_gid, $params = array(), $options = */ public function getCustomFieldsForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/custom_fields"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -84,7 +84,7 @@ public function getCustomFieldsForWorkspace($workspace_gid, $params = array(), $ */ public function insertEnumOptionForCustomField($custom_field_gid, $params = array(), $options = array()) { $path = "/custom_fields/{custom_field_gid}/enum_options/insert"; - $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); + $path = str_replace("{custom_field_gid}", $custom_field_gid, $path); return $this->client->post($path, $params, $options); } @@ -97,7 +97,7 @@ public function insertEnumOptionForCustomField($custom_field_gid, $params = arra */ public function updateCustomField($custom_field_gid, $params = array(), $options = array()) { $path = "/custom_fields/{custom_field_gid}"; - $path = str_replace($path,"{custom_field_gid}", $custom_field_gid); + $path = str_replace("{custom_field_gid}", $custom_field_gid, $path); return $this->client->put($path, $params, $options); } @@ -110,7 +110,7 @@ public function updateCustomField($custom_field_gid, $params = array(), $options */ public function updateEnumOption($enum_option_gid, $params = array(), $options = array()) { $path = "/enum_options/{enum_option_gid}"; - $path = str_replace($path,"{enum_option_gid}", $enum_option_gid); + $path = str_replace("{enum_option_gid}", $enum_option_gid, $path); return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/JobsBase.php b/src/Asana/Resources/Gen/JobsBase.php index bec90bb..d628e4f 100644 --- a/src/Asana/Resources/Gen/JobsBase.php +++ b/src/Asana/Resources/Gen/JobsBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function getJob($job_gid, $params = array(), $options = array()) { $path = "/jobs/{job_gid}"; - $path = str_replace($path,"{job_gid}", $job_gid); + $path = str_replace("{job_gid}", $job_gid, $path); return $this->client->get($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/OrganizationExportsBase.php b/src/Asana/Resources/Gen/OrganizationExportsBase.php index f528707..12cf488 100644 --- a/src/Asana/Resources/Gen/OrganizationExportsBase.php +++ b/src/Asana/Resources/Gen/OrganizationExportsBase.php @@ -32,7 +32,7 @@ public function createOrganizationExport($params = array(), $options = array()) */ public function getOrganizationExport($organization_export_gid, $params = array(), $options = array()) { $path = "/organization_exports/{organization_export_gid}"; - $path = str_replace($path,"{organization_export_gid}", $organization_export_gid); + $path = str_replace("{organization_export_gid}", $organization_export_gid, $path); return $this->client->get($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/PortfolioMembershipsBase.php b/src/Asana/Resources/Gen/PortfolioMembershipsBase.php index ff0b38a..d9dee6b 100644 --- a/src/Asana/Resources/Gen/PortfolioMembershipsBase.php +++ b/src/Asana/Resources/Gen/PortfolioMembershipsBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function getPortfolioMembership($portfolio_membership_path_gid, $params = array(), $options = array()) { $path = "/portfolio_memberships/{portfolio_membership_gid}"; - $path = str_replace($path,"{portfolio_membership_path_gid}", $portfolio_membership_path_gid); + $path = str_replace("{portfolio_membership_path_gid}", $portfolio_membership_path_gid, $path); return $this->client->get($path, $params, $options); } @@ -45,7 +45,7 @@ public function getPortfolioMemberships($params = array(), $options = array()) { */ public function getPortfolioMembershipsForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/portfolio_memberships"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/PortfoliosBase.php b/src/Asana/Resources/Gen/PortfoliosBase.php index 0b27993..089c8dd 100644 --- a/src/Asana/Resources/Gen/PortfoliosBase.php +++ b/src/Asana/Resources/Gen/PortfoliosBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function addCustomFieldSettingForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/addCustomFieldSetting"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->post($path, $params, $options); } @@ -34,7 +34,7 @@ public function addCustomFieldSettingForPortfolio($portfolio_gid, $params = arra */ public function addItemForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/addItem"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->post($path, $params, $options); } @@ -47,7 +47,7 @@ public function addItemForPortfolio($portfolio_gid, $params = array(), $options */ public function addMembersForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/addMembers"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->post($path, $params, $options); } @@ -71,7 +71,7 @@ public function createPortfolio($params = array(), $options = array()) { */ public function deletePortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->delete($path, $params, $options); } @@ -84,7 +84,7 @@ public function deletePortfolio($portfolio_gid, $params = array(), $options = ar */ public function getItemsForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/items"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -97,7 +97,7 @@ public function getItemsForPortfolio($portfolio_gid, $params = array(), $options */ public function getPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->get($path, $params, $options); } @@ -121,7 +121,7 @@ public function getPortfolios($params = array(), $options = array()) { */ public function removeCustomFieldSettingForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/removeCustomFieldSetting"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->post($path, $params, $options); } @@ -134,7 +134,7 @@ public function removeCustomFieldSettingForPortfolio($portfolio_gid, $params = a */ public function removeItemForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/removeItem"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->post($path, $params, $options); } @@ -147,7 +147,7 @@ public function removeItemForPortfolio($portfolio_gid, $params = array(), $optio */ public function removeMembersForPortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}/removeMembers"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->post($path, $params, $options); } @@ -160,7 +160,7 @@ public function removeMembersForPortfolio($portfolio_gid, $params = array(), $op */ public function updatePortfolio($portfolio_gid, $params = array(), $options = array()) { $path = "/portfolios/{portfolio_gid}"; - $path = str_replace($path,"{portfolio_gid}", $portfolio_gid); + $path = str_replace("{portfolio_gid}", $portfolio_gid, $path); return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/ProjectMembershipsBase.php b/src/Asana/Resources/Gen/ProjectMembershipsBase.php index 3c59a88..f147f59 100644 --- a/src/Asana/Resources/Gen/ProjectMembershipsBase.php +++ b/src/Asana/Resources/Gen/ProjectMembershipsBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function getProjectMembership($project_membership_path_gid, $params = array(), $options = array()) { $path = "/project_memberships/{project_membership_gid}"; - $path = str_replace($path,"{project_membership_path_gid}", $project_membership_path_gid); + $path = str_replace("{project_membership_path_gid}", $project_membership_path_gid, $path); return $this->client->get($path, $params, $options); } @@ -34,7 +34,7 @@ public function getProjectMembership($project_membership_path_gid, $params = arr */ public function getProjectMembershipsForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/project_memberships"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/ProjectStatusesBase.php b/src/Asana/Resources/Gen/ProjectStatusesBase.php index 2ce4694..c86e2f8 100644 --- a/src/Asana/Resources/Gen/ProjectStatusesBase.php +++ b/src/Asana/Resources/Gen/ProjectStatusesBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function createProjectStatusForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/project_statuses"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->post($path, $params, $options); } @@ -34,7 +34,7 @@ public function createProjectStatusForProject($project_gid, $params = array(), $ */ public function deleteProjectStatus($project_status_path_gid, $params = array(), $options = array()) { $path = "/project_statuses/{project_status_gid}"; - $path = str_replace($path,"{project_status_path_gid}", $project_status_path_gid); + $path = str_replace("{project_status_path_gid}", $project_status_path_gid, $path); return $this->client->delete($path, $params, $options); } @@ -47,7 +47,7 @@ public function deleteProjectStatus($project_status_path_gid, $params = array(), */ public function getProjectStatus($project_status_path_gid, $params = array(), $options = array()) { $path = "/project_statuses/{project_status_gid}"; - $path = str_replace($path,"{project_status_path_gid}", $project_status_path_gid); + $path = str_replace("{project_status_path_gid}", $project_status_path_gid, $path); return $this->client->get($path, $params, $options); } @@ -60,7 +60,7 @@ public function getProjectStatus($project_status_path_gid, $params = array(), $o */ public function getProjectStatusesForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/project_statuses"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/ProjectsBase.php b/src/Asana/Resources/Gen/ProjectsBase.php index 6300b65..8bc22dd 100644 --- a/src/Asana/Resources/Gen/ProjectsBase.php +++ b/src/Asana/Resources/Gen/ProjectsBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function addCustomFieldSettingForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/addCustomFieldSetting"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->post($path, $params, $options); } @@ -34,7 +34,7 @@ public function addCustomFieldSettingForProject($project_gid, $params = array(), */ public function addFollowersForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/addFollowers"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->post($path, $params, $options); } @@ -47,7 +47,7 @@ public function addFollowersForProject($project_gid, $params = array(), $options */ public function addMembersForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/addMembers"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->post($path, $params, $options); } @@ -71,7 +71,7 @@ public function createProject($params = array(), $options = array()) { */ public function createProjectForTeam($team_gid, $params = array(), $options = array()) { $path = "/teams/{team_gid}/projects"; - $path = str_replace($path,"{team_gid}", $team_gid); + $path = str_replace("{team_gid}", $team_gid, $path); return $this->client->post($path, $params, $options); } @@ -84,7 +84,7 @@ public function createProjectForTeam($team_gid, $params = array(), $options = ar */ public function createProjectForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/projects"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->post($path, $params, $options); } @@ -97,7 +97,7 @@ public function createProjectForWorkspace($workspace_gid, $params = array(), $op */ public function deleteProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->delete($path, $params, $options); } @@ -110,7 +110,7 @@ public function deleteProject($project_gid, $params = array(), $options = array( */ public function duplicateProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/duplicate"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->post($path, $params, $options); } @@ -123,7 +123,7 @@ public function duplicateProject($project_gid, $params = array(), $options = arr */ public function getProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->get($path, $params, $options); } @@ -147,7 +147,7 @@ public function getProjects($params = array(), $options = array()) { */ public function getProjectsForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/projects"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -160,7 +160,7 @@ public function getProjectsForTask($task_gid, $params = array(), $options = arra */ public function getProjectsForTeam($team_gid, $params = array(), $options = array()) { $path = "/teams/{team_gid}/projects"; - $path = str_replace($path,"{team_gid}", $team_gid); + $path = str_replace("{team_gid}", $team_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -173,7 +173,7 @@ public function getProjectsForTeam($team_gid, $params = array(), $options = arra */ public function getProjectsForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/projects"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -186,7 +186,7 @@ public function getProjectsForWorkspace($workspace_gid, $params = array(), $opti */ public function getTaskCountsForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/task_counts"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->get($path, $params, $options); } @@ -199,7 +199,7 @@ public function getTaskCountsForProject($project_gid, $params = array(), $option */ public function removeCustomFieldSettingForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/removeCustomFieldSetting"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->post($path, $params, $options); } @@ -212,7 +212,7 @@ public function removeCustomFieldSettingForProject($project_gid, $params = array */ public function removeFollowersForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/removeFollowers"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->post($path, $params, $options); } @@ -225,7 +225,7 @@ public function removeFollowersForProject($project_gid, $params = array(), $opti */ public function removeMembersForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/removeMembers"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->post($path, $params, $options); } @@ -238,7 +238,7 @@ public function removeMembersForProject($project_gid, $params = array(), $option */ public function updateProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/SectionsBase.php b/src/Asana/Resources/Gen/SectionsBase.php index c47af35..146dfc0 100644 --- a/src/Asana/Resources/Gen/SectionsBase.php +++ b/src/Asana/Resources/Gen/SectionsBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function addTaskForSection($section_gid, $params = array(), $options = array()) { $path = "/sections/{section_gid}/addTask"; - $path = str_replace($path,"{section_gid}", $section_gid); + $path = str_replace("{section_gid}", $section_gid, $path); return $this->client->post($path, $params, $options); } @@ -34,7 +34,7 @@ public function addTaskForSection($section_gid, $params = array(), $options = ar */ public function createSectionForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/sections"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->post($path, $params, $options); } @@ -47,7 +47,7 @@ public function createSectionForProject($project_gid, $params = array(), $option */ public function deleteSection($section_gid, $params = array(), $options = array()) { $path = "/sections/{section_gid}"; - $path = str_replace($path,"{section_gid}", $section_gid); + $path = str_replace("{section_gid}", $section_gid, $path); return $this->client->delete($path, $params, $options); } @@ -60,7 +60,7 @@ public function deleteSection($section_gid, $params = array(), $options = array( */ public function getSection($section_gid, $params = array(), $options = array()) { $path = "/sections/{section_gid}"; - $path = str_replace($path,"{section_gid}", $section_gid); + $path = str_replace("{section_gid}", $section_gid, $path); return $this->client->get($path, $params, $options); } @@ -73,7 +73,7 @@ public function getSection($section_gid, $params = array(), $options = array()) */ public function getSectionsForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/sections"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -86,7 +86,7 @@ public function getSectionsForProject($project_gid, $params = array(), $options */ public function insertSectionForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/sections/insert"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->post($path, $params, $options); } @@ -99,7 +99,7 @@ public function insertSectionForProject($project_gid, $params = array(), $option */ public function updateSection($section_gid, $params = array(), $options = array()) { $path = "/sections/{section_gid}"; - $path = str_replace($path,"{section_gid}", $section_gid); + $path = str_replace("{section_gid}", $section_gid, $path); return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/StoriesBase.php b/src/Asana/Resources/Gen/StoriesBase.php index 0e0816e..5b2c0bb 100644 --- a/src/Asana/Resources/Gen/StoriesBase.php +++ b/src/Asana/Resources/Gen/StoriesBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function createStoryForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/stories"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -34,7 +34,7 @@ public function createStoryForTask($task_gid, $params = array(), $options = arra */ public function deleteStory($story_gid, $params = array(), $options = array()) { $path = "/stories/{story_gid}"; - $path = str_replace($path,"{story_gid}", $story_gid); + $path = str_replace("{story_gid}", $story_gid, $path); return $this->client->delete($path, $params, $options); } @@ -47,7 +47,7 @@ public function deleteStory($story_gid, $params = array(), $options = array()) { */ public function getStoriesForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/stories"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -60,7 +60,7 @@ public function getStoriesForTask($task_gid, $params = array(), $options = array */ public function getStory($story_gid, $params = array(), $options = array()) { $path = "/stories/{story_gid}"; - $path = str_replace($path,"{story_gid}", $story_gid); + $path = str_replace("{story_gid}", $story_gid, $path); return $this->client->get($path, $params, $options); } @@ -73,7 +73,7 @@ public function getStory($story_gid, $params = array(), $options = array()) { */ public function updateStory($story_gid, $params = array(), $options = array()) { $path = "/stories/{story_gid}"; - $path = str_replace($path,"{story_gid}", $story_gid); + $path = str_replace("{story_gid}", $story_gid, $path); return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/TagsBase.php b/src/Asana/Resources/Gen/TagsBase.php index 2ef96ac..2c0cff6 100644 --- a/src/Asana/Resources/Gen/TagsBase.php +++ b/src/Asana/Resources/Gen/TagsBase.php @@ -32,7 +32,7 @@ public function createTag($params = array(), $options = array()) { */ public function createTagForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/tags"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->post($path, $params, $options); } @@ -45,7 +45,7 @@ public function createTagForWorkspace($workspace_gid, $params = array(), $option */ public function getTag($tag_gid, $params = array(), $options = array()) { $path = "/tags/{tag_gid}"; - $path = str_replace($path,"{tag_gid}", $tag_gid); + $path = str_replace("{tag_gid}", $tag_gid, $path); return $this->client->get($path, $params, $options); } @@ -69,7 +69,7 @@ public function getTags($params = array(), $options = array()) { */ public function getTagsForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/tags"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -82,7 +82,7 @@ public function getTagsForTask($task_gid, $params = array(), $options = array()) */ public function getTagsForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/tags"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -95,7 +95,7 @@ public function getTagsForWorkspace($workspace_gid, $params = array(), $options */ public function updateTag($tag_gid, $params = array(), $options = array()) { $path = "/tags/{tag_gid}"; - $path = str_replace($path,"{tag_gid}", $tag_gid); + $path = str_replace("{tag_gid}", $tag_gid, $path); return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/TasksBase.php b/src/Asana/Resources/Gen/TasksBase.php index 8e6581c..3c6a823 100644 --- a/src/Asana/Resources/Gen/TasksBase.php +++ b/src/Asana/Resources/Gen/TasksBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function addDependenciesForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/addDependencies"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -34,7 +34,7 @@ public function addDependenciesForTask($task_gid, $params = array(), $options = */ public function addDependentsForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/addDependents"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -47,7 +47,7 @@ public function addDependentsForTask($task_gid, $params = array(), $options = ar */ public function addFollowersForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/addFollowers"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -60,7 +60,7 @@ public function addFollowersForTask($task_gid, $params = array(), $options = arr */ public function addProjectForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/addProject"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -73,7 +73,7 @@ public function addProjectForTask($task_gid, $params = array(), $options = array */ public function addTagForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/addTag"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -86,7 +86,7 @@ public function addTagForTask($task_gid, $params = array(), $options = array()) */ public function createSubtaskForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/subtasks"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -110,7 +110,7 @@ public function createTask($params = array(), $options = array()) { */ public function deleteTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->delete($path, $params, $options); } @@ -123,7 +123,7 @@ public function deleteTask($task_gid, $params = array(), $options = array()) { */ public function duplicateTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/duplicate"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -136,7 +136,7 @@ public function duplicateTask($task_gid, $params = array(), $options = array()) */ public function getDependenciesForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/dependencies"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -149,7 +149,7 @@ public function getDependenciesForTask($task_gid, $params = array(), $options = */ public function getDependentsForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/dependents"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -162,7 +162,7 @@ public function getDependentsForTask($task_gid, $params = array(), $options = ar */ public function getSubtasksForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/subtasks"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -175,7 +175,7 @@ public function getSubtasksForTask($task_gid, $params = array(), $options = arra */ public function getTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->get($path, $params, $options); } @@ -199,7 +199,7 @@ public function getTasks($params = array(), $options = array()) { */ public function getTasksForProject($project_gid, $params = array(), $options = array()) { $path = "/projects/{project_gid}/tasks"; - $path = str_replace($path,"{project_gid}", $project_gid); + $path = str_replace("{project_gid}", $project_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -212,7 +212,7 @@ public function getTasksForProject($project_gid, $params = array(), $options = a */ public function getTasksForSection($section_gid, $params = array(), $options = array()) { $path = "/sections/{section_gid}/tasks"; - $path = str_replace($path,"{section_gid}", $section_gid); + $path = str_replace("{section_gid}", $section_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -225,7 +225,7 @@ public function getTasksForSection($section_gid, $params = array(), $options = a */ public function getTasksForTag($tag_gid, $params = array(), $options = array()) { $path = "/tags/{tag_gid}/tasks"; - $path = str_replace($path,"{tag_gid}", $tag_gid); + $path = str_replace("{tag_gid}", $tag_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -238,7 +238,7 @@ public function getTasksForTag($tag_gid, $params = array(), $options = array()) */ public function getTasksForUserTaskList($user_task_list_gid, $params = array(), $options = array()) { $path = "/user_task_lists/{user_task_list_gid}/tasks"; - $path = str_replace($path,"{user_task_list_gid}", $user_task_list_gid); + $path = str_replace("{user_task_list_gid}", $user_task_list_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -251,7 +251,7 @@ public function getTasksForUserTaskList($user_task_list_gid, $params = array(), */ public function removeDependenciesForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/removeDependencies"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -264,7 +264,7 @@ public function removeDependenciesForTask($task_gid, $params = array(), $options */ public function removeDependentsForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/removeDependents"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -277,7 +277,7 @@ public function removeDependentsForTask($task_gid, $params = array(), $options = */ public function removeFollowerForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/removeFollowers"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -290,7 +290,7 @@ public function removeFollowerForTask($task_gid, $params = array(), $options = a */ public function removeProjectForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/removeProject"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -303,7 +303,7 @@ public function removeProjectForTask($task_gid, $params = array(), $options = ar */ public function removeTagForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/removeTag"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -316,7 +316,7 @@ public function removeTagForTask($task_gid, $params = array(), $options = array( */ public function searchTasksForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/tasks/search"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -329,7 +329,7 @@ public function searchTasksForWorkspace($workspace_gid, $params = array(), $opti */ public function setParentForTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}/setParent"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->post($path, $params, $options); } @@ -342,7 +342,7 @@ public function setParentForTask($task_gid, $params = array(), $options = array( */ public function updateTask($task_gid, $params = array(), $options = array()) { $path = "/tasks/{task_gid}"; - $path = str_replace($path,"{task_gid}", $task_gid); + $path = str_replace("{task_gid}", $task_gid, $path); return $this->client->put($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/TeamMembershipsBase.php b/src/Asana/Resources/Gen/TeamMembershipsBase.php index 490f905..a38b76f 100644 --- a/src/Asana/Resources/Gen/TeamMembershipsBase.php +++ b/src/Asana/Resources/Gen/TeamMembershipsBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function getTeamMembership($team_membership_path_gid, $params = array(), $options = array()) { $path = "/team_memberships/{team_membership_gid}"; - $path = str_replace($path,"{team_membership_path_gid}", $team_membership_path_gid); + $path = str_replace("{team_membership_path_gid}", $team_membership_path_gid, $path); return $this->client->get($path, $params, $options); } @@ -45,7 +45,7 @@ public function getTeamMemberships($params = array(), $options = array()) { */ public function getTeamMembershipsForTeam($team_gid, $params = array(), $options = array()) { $path = "/teams/{team_gid}/team_memberships"; - $path = str_replace($path,"{team_gid}", $team_gid); + $path = str_replace("{team_gid}", $team_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -58,7 +58,7 @@ public function getTeamMembershipsForTeam($team_gid, $params = array(), $options */ public function getTeamMembershipsForUser($user_gid, $params = array(), $options = array()) { $path = "/users/{user_gid}/team_memberships"; - $path = str_replace($path,"{user_gid}", $user_gid); + $path = str_replace("{user_gid}", $user_gid, $path); return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/TeamsBase.php b/src/Asana/Resources/Gen/TeamsBase.php index 35e5007..74736ff 100644 --- a/src/Asana/Resources/Gen/TeamsBase.php +++ b/src/Asana/Resources/Gen/TeamsBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function addUserForTeam($team_gid, $params = array(), $options = array()) { $path = "/teams/{team_gid}/addUser"; - $path = str_replace($path,"{team_gid}", $team_gid); + $path = str_replace("{team_gid}", $team_gid, $path); return $this->client->post($path, $params, $options); } @@ -34,7 +34,7 @@ public function addUserForTeam($team_gid, $params = array(), $options = array()) */ public function getTeam($team_gid, $params = array(), $options = array()) { $path = "/teams/{team_gid}"; - $path = str_replace($path,"{team_gid}", $team_gid); + $path = str_replace("{team_gid}", $team_gid, $path); return $this->client->get($path, $params, $options); } @@ -47,7 +47,7 @@ public function getTeam($team_gid, $params = array(), $options = array()) { */ public function getTeamsForOrganization($workspace_gid, $params = array(), $options = array()) { $path = "/organizations/{workspace_gid}/teams"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -60,7 +60,7 @@ public function getTeamsForOrganization($workspace_gid, $params = array(), $opti */ public function getTeamsForUser($user_gid, $params = array(), $options = array()) { $path = "/users/{user_gid}/teams"; - $path = str_replace($path,"{user_gid}", $user_gid); + $path = str_replace("{user_gid}", $user_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -73,7 +73,7 @@ public function getTeamsForUser($user_gid, $params = array(), $options = array() */ public function removeUserForTeam($team_gid, $params = array(), $options = array()) { $path = "/teams/{team_gid}/removeUser"; - $path = str_replace($path,"{team_gid}", $team_gid); + $path = str_replace("{team_gid}", $team_gid, $path); return $this->client->post($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/TypeaheadBase.php b/src/Asana/Resources/Gen/TypeaheadBase.php index 6437a1b..804e4da 100644 --- a/src/Asana/Resources/Gen/TypeaheadBase.php +++ b/src/Asana/Resources/Gen/TypeaheadBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function typeaheadForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/typeahead"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/UserTaskListsBase.php b/src/Asana/Resources/Gen/UserTaskListsBase.php index 3abfd8c..a4aaf68 100644 --- a/src/Asana/Resources/Gen/UserTaskListsBase.php +++ b/src/Asana/Resources/Gen/UserTaskListsBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function getUserTaskList($user_task_list_gid, $params = array(), $options = array()) { $path = "/user_task_lists/{user_task_list_gid}"; - $path = str_replace($path,"{user_task_list_gid}", $user_task_list_gid); + $path = str_replace("{user_task_list_gid}", $user_task_list_gid, $path); return $this->client->get($path, $params, $options); } @@ -34,7 +34,7 @@ public function getUserTaskList($user_task_list_gid, $params = array(), $options */ public function getUserTaskListForUser($user_gid, $params = array(), $options = array()) { $path = "/users/{user_gid}/user_task_list"; - $path = str_replace($path,"{user_gid}", $user_gid); + $path = str_replace("{user_gid}", $user_gid, $path); return $this->client->get($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/UsersBase.php b/src/Asana/Resources/Gen/UsersBase.php index 54643fe..7fc5748 100644 --- a/src/Asana/Resources/Gen/UsersBase.php +++ b/src/Asana/Resources/Gen/UsersBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function getFavoritesForUser($user_gid, $params = array(), $options = array()) { $path = "/users/{user_gid}/favorites"; - $path = str_replace($path,"{user_gid}", $user_gid); + $path = str_replace("{user_gid}", $user_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -34,7 +34,7 @@ public function getFavoritesForUser($user_gid, $params = array(), $options = arr */ public function getUser($user_gid, $params = array(), $options = array()) { $path = "/users/{user_gid}"; - $path = str_replace($path,"{user_gid}", $user_gid); + $path = str_replace("{user_gid}", $user_gid, $path); return $this->client->get($path, $params, $options); } @@ -58,7 +58,7 @@ public function getUsers($params = array(), $options = array()) { */ public function getUsersForTeam($team_gid, $params = array(), $options = array()) { $path = "/teams/{team_gid}/users"; - $path = str_replace($path,"{team_gid}", $team_gid); + $path = str_replace("{team_gid}", $team_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -71,7 +71,7 @@ public function getUsersForTeam($team_gid, $params = array(), $options = array() */ public function getUsersForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/users"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/WebhooksBase.php b/src/Asana/Resources/Gen/WebhooksBase.php index 9840130..2f3eedb 100644 --- a/src/Asana/Resources/Gen/WebhooksBase.php +++ b/src/Asana/Resources/Gen/WebhooksBase.php @@ -32,7 +32,7 @@ public function createWebhook($params = array(), $options = array()) { */ public function deleteWebhook($webhook_gid, $params = array(), $options = array()) { $path = "/webhooks/{webhook_gid}"; - $path = str_replace($path,"{webhook_gid}", $webhook_gid); + $path = str_replace("{webhook_gid}", $webhook_gid, $path); return $this->client->delete($path, $params, $options); } @@ -45,7 +45,7 @@ public function deleteWebhook($webhook_gid, $params = array(), $options = array( */ public function getWebhook($webhook_gid, $params = array(), $options = array()) { $path = "/webhooks/{webhook_gid}"; - $path = str_replace($path,"{webhook_gid}", $webhook_gid); + $path = str_replace("{webhook_gid}", $webhook_gid, $path); return $this->client->get($path, $params, $options); } diff --git a/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php index 0f54933..24dc845 100644 --- a/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php +++ b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function getWorkspaceMembership($workspace_membership_path_gid, $params = array(), $options = array()) { $path = "/workspace_memberships/{workspace_membership_gid}"; - $path = str_replace($path,"{workspace_membership_path_gid}", $workspace_membership_path_gid); + $path = str_replace("{workspace_membership_path_gid}", $workspace_membership_path_gid, $path); return $this->client->get($path, $params, $options); } @@ -34,7 +34,7 @@ public function getWorkspaceMembership($workspace_membership_path_gid, $params = */ public function getWorkspaceMembershipsForUser($user_gid, $params = array(), $options = array()) { $path = "/users/{user_gid}/workspace_memberships"; - $path = str_replace($path,"{user_gid}", $user_gid); + $path = str_replace("{user_gid}", $user_gid, $path); return $this->client->getCollection($path, $params, $options); } @@ -47,7 +47,7 @@ public function getWorkspaceMembershipsForUser($user_gid, $params = array(), $op */ public function getWorkspaceMembershipsForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/workspace_memberships"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->getCollection($path, $params, $options); } } diff --git a/src/Asana/Resources/Gen/WorkspacesBase.php b/src/Asana/Resources/Gen/WorkspacesBase.php index bfd3243..2572eaf 100644 --- a/src/Asana/Resources/Gen/WorkspacesBase.php +++ b/src/Asana/Resources/Gen/WorkspacesBase.php @@ -21,7 +21,7 @@ public function __construct($client) */ public function addUserForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/addUser"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->post($path, $params, $options); } @@ -34,7 +34,7 @@ public function addUserForWorkspace($workspace_gid, $params = array(), $options */ public function getWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->get($path, $params, $options); } @@ -58,7 +58,7 @@ public function getWorkspaces($params = array(), $options = array()) { */ public function removeUserForWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}/removeUser"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->post($path, $params, $options); } @@ -71,7 +71,7 @@ public function removeUserForWorkspace($workspace_gid, $params = array(), $optio */ public function updateWorkspace($workspace_gid, $params = array(), $options = array()) { $path = "/workspaces/{workspace_gid}"; - $path = str_replace($path,"{workspace_gid}", $workspace_gid); + $path = str_replace("{workspace_gid}", $workspace_gid, $path); return $this->client->put($path, $params, $options); } } diff --git a/swagger_templates/api.mustache b/swagger_templates/api.mustache index cbdcd2a..e58a512 100644 --- a/swagger_templates/api.mustache +++ b/swagger_templates/api.mustache @@ -27,7 +27,7 @@ class {{classname}}Base { public function {{operationId}}({{#pathParams}}${{paramName}}, {{/pathParams}}$params = array(), $options = array()) { $path = "{{path}}"; {{#pathParams}} - $path = str_replace($path,"{ {{~baseName~}} }", ${{paramName}}); + $path = str_replace("{ {{~baseName~}} }", ${{paramName}}, $path); {{/pathParams}} return $this->client->{{#neq "GET" httpMethod}}{{toLowerCase httpMethod}}{{/neq}}{{#eq "GET" httpMethod}}{{returnContainer}}{{/eq}}($path, $params, $options); } From 4be9e6ceb8f3cb3014d4da2f35b1f9de55cf3262 Mon Sep 17 00:00:00 2001 From: Ross Grambo Date: Fri, 24 Jan 2020 16:21:37 -0800 Subject: [PATCH 05/11] version bump --- README.md | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9fef0c5..10b613f 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ If you use [Composer](https://getcomposer.org/) to manage dependencies you can i ```json { "require": { - "asana/asana": "^0.8.0" + "asana/asana": "^0.10.0" } } ``` diff --git a/VERSION b/VERSION index f374f66..78bc1ab 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.1 +0.10.0 From 603915bdde84fe7522c7846dc05252b622e07ce9 Mon Sep 17 00:00:00 2001 From: Ross Grambo Date: Fri, 24 Jan 2020 16:29:09 -0800 Subject: [PATCH 06/11] Updated readme --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 10b613f..87dc635 100644 --- a/README.md +++ b/README.md @@ -219,8 +219,8 @@ To develop: ### Code generation -The specific Asana resource classes (`Tag`, `Workspace`, `Task`, etc) are -generated code, hence they shouldn't be modified by hand. See the [asana-api-meta](https://github.com/Asana/asana-api-meta) repo for details. +The specific Asana resource classes in the Gen folder (`Tag`, `Workspace`, `Task`, etc) are +generated code, hence they shouldn't be modified by hand. ### Deployment @@ -240,3 +240,5 @@ The rest is automatically done by Composer / Packagist. Visit [the asana package [packagist-url]: https://packagist.org/packages/asana/asana [packagist-image]: https://img.shields.io/packagist/v/asana/asana.svg?style=flat-square + +[asana-docs]: https://developers.asana.com/docs From d1afbca5d7472b1349092e4d6715239cb2ba9565 Mon Sep 17 00:00:00 2001 From: Ross Grambo Date: Thu, 30 Jan 2020 11:30:15 -0800 Subject: [PATCH 07/11] Updated operationId for batch --- src/Asana/Resources/Gen/BatchAPIBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Asana/Resources/Gen/BatchAPIBase.php b/src/Asana/Resources/Gen/BatchAPIBase.php index 81c6d2d..77af5dd 100644 --- a/src/Asana/Resources/Gen/BatchAPIBase.php +++ b/src/Asana/Resources/Gen/BatchAPIBase.php @@ -18,7 +18,7 @@ public function __construct($client) * @param array $options * @return response */ - public function createBatchRequestAction($params = array(), $options = array()) { + public function createBatchRequest($params = array(), $options = array()) { $path = "/batch"; return $this->client->post($path, $params, $options); } From 350382bb6111b9ade1c6eb21e0a784fe5b105ab8 Mon Sep 17 00:00:00 2001 From: Ross Grambo Date: Mon, 3 Feb 2020 10:43:05 -0800 Subject: [PATCH 08/11] Updated path params --- src/Asana/Resources/Gen/PortfolioMembershipsBase.php | 6 +++--- src/Asana/Resources/Gen/ProjectMembershipsBase.php | 6 +++--- src/Asana/Resources/Gen/ProjectStatusesBase.php | 12 ++++++------ src/Asana/Resources/Gen/TeamMembershipsBase.php | 6 +++--- src/Asana/Resources/Gen/WorkspaceMembershipsBase.php | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Asana/Resources/Gen/PortfolioMembershipsBase.php b/src/Asana/Resources/Gen/PortfolioMembershipsBase.php index d9dee6b..16929a9 100644 --- a/src/Asana/Resources/Gen/PortfolioMembershipsBase.php +++ b/src/Asana/Resources/Gen/PortfolioMembershipsBase.php @@ -14,14 +14,14 @@ public function __construct($client) /** Get a portfolio membership * - * @param string $portfolio_membership_path_gid (required) + * @param string $portfolio_membership_gid (required) * @param array $params * @param array $options * @return response */ - public function getPortfolioMembership($portfolio_membership_path_gid, $params = array(), $options = array()) { + public function getPortfolioMembership($portfolio_membership_gid, $params = array(), $options = array()) { $path = "/portfolio_memberships/{portfolio_membership_gid}"; - $path = str_replace("{portfolio_membership_path_gid}", $portfolio_membership_path_gid, $path); + $path = str_replace("{portfolio_membership_gid}", $portfolio_membership_gid, $path); return $this->client->get($path, $params, $options); } diff --git a/src/Asana/Resources/Gen/ProjectMembershipsBase.php b/src/Asana/Resources/Gen/ProjectMembershipsBase.php index f147f59..dacbb88 100644 --- a/src/Asana/Resources/Gen/ProjectMembershipsBase.php +++ b/src/Asana/Resources/Gen/ProjectMembershipsBase.php @@ -14,14 +14,14 @@ public function __construct($client) /** Get a project membership * - * @param string $project_membership_path_gid (required) + * @param string $project_membership_gid (required) * @param array $params * @param array $options * @return response */ - public function getProjectMembership($project_membership_path_gid, $params = array(), $options = array()) { + public function getProjectMembership($project_membership_gid, $params = array(), $options = array()) { $path = "/project_memberships/{project_membership_gid}"; - $path = str_replace("{project_membership_path_gid}", $project_membership_path_gid, $path); + $path = str_replace("{project_membership_gid}", $project_membership_gid, $path); return $this->client->get($path, $params, $options); } diff --git a/src/Asana/Resources/Gen/ProjectStatusesBase.php b/src/Asana/Resources/Gen/ProjectStatusesBase.php index c86e2f8..06ba856 100644 --- a/src/Asana/Resources/Gen/ProjectStatusesBase.php +++ b/src/Asana/Resources/Gen/ProjectStatusesBase.php @@ -27,27 +27,27 @@ public function createProjectStatusForProject($project_gid, $params = array(), $ /** Delete a project status * - * @param string $project_status_path_gid (required) The project status update to get. + * @param string $project_status_gid (required) The project status update to get. * @param array $params * @param array $options * @return response */ - public function deleteProjectStatus($project_status_path_gid, $params = array(), $options = array()) { + public function deleteProjectStatus($project_status_gid, $params = array(), $options = array()) { $path = "/project_statuses/{project_status_gid}"; - $path = str_replace("{project_status_path_gid}", $project_status_path_gid, $path); + $path = str_replace("{project_status_gid}", $project_status_gid, $path); return $this->client->delete($path, $params, $options); } /** Get a project status * - * @param string $project_status_path_gid (required) The project status update to get. + * @param string $project_status_gid (required) The project status update to get. * @param array $params * @param array $options * @return response */ - public function getProjectStatus($project_status_path_gid, $params = array(), $options = array()) { + public function getProjectStatus($project_status_gid, $params = array(), $options = array()) { $path = "/project_statuses/{project_status_gid}"; - $path = str_replace("{project_status_path_gid}", $project_status_path_gid, $path); + $path = str_replace("{project_status_gid}", $project_status_gid, $path); return $this->client->get($path, $params, $options); } diff --git a/src/Asana/Resources/Gen/TeamMembershipsBase.php b/src/Asana/Resources/Gen/TeamMembershipsBase.php index a38b76f..40b4091 100644 --- a/src/Asana/Resources/Gen/TeamMembershipsBase.php +++ b/src/Asana/Resources/Gen/TeamMembershipsBase.php @@ -14,14 +14,14 @@ public function __construct($client) /** Get a team membership * - * @param string $team_membership_path_gid (required) + * @param string $team_membership_gid (required) * @param array $params * @param array $options * @return response */ - public function getTeamMembership($team_membership_path_gid, $params = array(), $options = array()) { + public function getTeamMembership($team_membership_gid, $params = array(), $options = array()) { $path = "/team_memberships/{team_membership_gid}"; - $path = str_replace("{team_membership_path_gid}", $team_membership_path_gid, $path); + $path = str_replace("{team_membership_gid}", $team_membership_gid, $path); return $this->client->get($path, $params, $options); } diff --git a/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php index 24dc845..ac95cb1 100644 --- a/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php +++ b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php @@ -14,14 +14,14 @@ public function __construct($client) /** Get a workspace membership * - * @param string $workspace_membership_path_gid (required) + * @param string $workspace_membership_gid (required) * @param array $params * @param array $options * @return response */ - public function getWorkspaceMembership($workspace_membership_path_gid, $params = array(), $options = array()) { + public function getWorkspaceMembership($workspace_membership_gid, $params = array(), $options = array()) { $path = "/workspace_memberships/{workspace_membership_gid}"; - $path = str_replace("{workspace_membership_path_gid}", $workspace_membership_path_gid, $path); + $path = str_replace("{workspace_membership_gid}", $workspace_membership_gid, $path); return $this->client->get($path, $params, $options); } From ddd5a11e4882b3e5da7b9d7d01f143769b7c0e2c Mon Sep 17 00:00:00 2001 From: Ross Grambo Date: Wed, 5 Feb 2020 13:06:08 -0800 Subject: [PATCH 09/11] Updated user param description --- src/Asana/Resources/Gen/ProjectsBase.php | 2 +- src/Asana/Resources/Gen/TeamMembershipsBase.php | 2 +- src/Asana/Resources/Gen/TeamsBase.php | 2 +- src/Asana/Resources/Gen/UserTaskListsBase.php | 2 +- src/Asana/Resources/Gen/UsersBase.php | 4 ++-- src/Asana/Resources/Gen/WorkspaceMembershipsBase.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Asana/Resources/Gen/ProjectsBase.php b/src/Asana/Resources/Gen/ProjectsBase.php index 8bc22dd..2b5063c 100644 --- a/src/Asana/Resources/Gen/ProjectsBase.php +++ b/src/Asana/Resources/Gen/ProjectsBase.php @@ -25,7 +25,7 @@ public function addCustomFieldSettingForProject($project_gid, $params = array(), return $this->client->post($path, $params, $options); } - /** Add users to a project + /** Add followers to a project * * @param string $project_gid (required) Globally unique identifier for the project. * @param array $params diff --git a/src/Asana/Resources/Gen/TeamMembershipsBase.php b/src/Asana/Resources/Gen/TeamMembershipsBase.php index 40b4091..b1e60df 100644 --- a/src/Asana/Resources/Gen/TeamMembershipsBase.php +++ b/src/Asana/Resources/Gen/TeamMembershipsBase.php @@ -51,7 +51,7 @@ public function getTeamMembershipsForTeam($team_gid, $params = array(), $options /** Get memberships from a user * - * @param string $user_gid (required) Globally unique identifier for the user. + * @param string $user_gid (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. * @param array $params * @param array $options * @return response diff --git a/src/Asana/Resources/Gen/TeamsBase.php b/src/Asana/Resources/Gen/TeamsBase.php index 74736ff..8f2ad20 100644 --- a/src/Asana/Resources/Gen/TeamsBase.php +++ b/src/Asana/Resources/Gen/TeamsBase.php @@ -53,7 +53,7 @@ public function getTeamsForOrganization($workspace_gid, $params = array(), $opti /** Get teams for a user * - * @param string $user_gid (required) Globally unique identifier for the user. + * @param string $user_gid (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. * @param array $params * @param array $options * @return response diff --git a/src/Asana/Resources/Gen/UserTaskListsBase.php b/src/Asana/Resources/Gen/UserTaskListsBase.php index a4aaf68..f8ec7c0 100644 --- a/src/Asana/Resources/Gen/UserTaskListsBase.php +++ b/src/Asana/Resources/Gen/UserTaskListsBase.php @@ -27,7 +27,7 @@ public function getUserTaskList($user_task_list_gid, $params = array(), $options /** Get a user's task list * - * @param string $user_gid (required) Globally unique identifier for the user. + * @param string $user_gid (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. * @param array $params * @param array $options * @return response diff --git a/src/Asana/Resources/Gen/UsersBase.php b/src/Asana/Resources/Gen/UsersBase.php index 7fc5748..63a873b 100644 --- a/src/Asana/Resources/Gen/UsersBase.php +++ b/src/Asana/Resources/Gen/UsersBase.php @@ -14,7 +14,7 @@ public function __construct($client) /** Get a user's favorites * - * @param string $user_gid (required) Globally unique identifier for the user. + * @param string $user_gid (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. * @param array $params * @param array $options * @return response @@ -27,7 +27,7 @@ public function getFavoritesForUser($user_gid, $params = array(), $options = arr /** Get a user * - * @param string $user_gid (required) Globally unique identifier for the user. + * @param string $user_gid (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. * @param array $params * @param array $options * @return response diff --git a/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php index ac95cb1..c0e11f9 100644 --- a/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php +++ b/src/Asana/Resources/Gen/WorkspaceMembershipsBase.php @@ -27,7 +27,7 @@ public function getWorkspaceMembership($workspace_membership_gid, $params = arra /** Get workspace memberships for a user * - * @param string $user_gid (required) Globally unique identifier for the user. + * @param string $user_gid (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. * @param array $params * @param array $options * @return response From f932a76459945ba6ec2537e255cec2b7234433c9 Mon Sep 17 00:00:00 2001 From: Ross Grambo Date: Wed, 5 Feb 2020 13:22:19 -0800 Subject: [PATCH 10/11] Updated readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 87dc635..92f7c69 100644 --- a/README.md +++ b/README.md @@ -108,12 +108,12 @@ The client's methods are divided into several resources: `attachments`, `events` Methods that return a single object return that object directly: ```php users->me(); +$me = $client->users->getUser("me"); echo "Hello " . $me->name; -$workspaceId = $me->workspaces[0]->id; -$project = $client->projects->createInWorkspace($workspaceId, array('name' => 'new project')); -echo "Created project with id: " . $project->id; +$workspaceGid = $me->workspaces[0]->gid; +$project = $client->projects->createProjectForWorkspace($workspaceGid, array('name' => 'new project')); +echo "Created project with gid: " . $project->gid; ``` Methods that return multiple items (e.x. `findAll`) return an items iterator by default. See the "Collections" section @@ -182,7 +182,7 @@ If you would rather suppress these warnings, you can set By default, methods that return a collection of objects return an item iterator: ```php workspaces->findAll(); +$workspaces = $client->workspaces->getWorkspaces(); foreach ($workspaces as $workspace) { var_dump($workspace); } @@ -197,7 +197,7 @@ You can also use the raw API to fetch a page at a time: workspaces->findAll(null, array('offset' => $offset, 'iterator_type' => null, 'page_size' => 2)); + $page = $client->workspaces->getWorkspaces(null, array('offset' => $offset, 'iterator_type' => null, 'page_size' => 2)); var_dump($page); if (isset($page->next_page)) { $offset = $page->next_page->offset; From eca51cf82837747525a1a7eb68611f21466427a4 Mon Sep 17 00:00:00 2001 From: Ross Grambo Date: Tue, 11 Feb 2020 17:06:27 -0800 Subject: [PATCH 11/11] Removed post attachment --- src/Asana/Resources/Gen/AttachmentsBase.php | 13 ------------- swagger_templates/api.mustache | 4 ++-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/Asana/Resources/Gen/AttachmentsBase.php b/src/Asana/Resources/Gen/AttachmentsBase.php index 19c206e..f2770b3 100644 --- a/src/Asana/Resources/Gen/AttachmentsBase.php +++ b/src/Asana/Resources/Gen/AttachmentsBase.php @@ -12,19 +12,6 @@ public function __construct($client) $this->client = $client; } - /** Upload an attachment - * - * @param string $task_gid (required) The task to operate on. - * @param array $params - * @param array $options - * @return response - */ - public function createAttachmentForTask($task_gid, $params = array(), $options = array()) { - $path = "/tasks/{task_gid}/attachments"; - $path = str_replace("{task_gid}", $task_gid, $path); - return $this->client->post($path, $params, $options); - } - /** Delete an attachment * * @param string $attachment_gid (required) Globally unique identifier for the attachment. diff --git a/swagger_templates/api.mustache b/swagger_templates/api.mustache index e58a512..1354287 100644 --- a/swagger_templates/api.mustache +++ b/swagger_templates/api.mustache @@ -12,7 +12,7 @@ class {{classname}}Base { { $this->client = $client; } -{{#operation}} +{{#operation}}{{^formParams}} {{#contents}} /** {{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} @@ -32,6 +32,6 @@ class {{classname}}Base { return $this->client->{{#neq "GET" httpMethod}}{{toLowerCase httpMethod}}{{/neq}}{{#eq "GET" httpMethod}}{{returnContainer}}{{/eq}}($path, $params, $options); } {{/contents}} -{{/operation}} +{{/formParams}}{{/operation}} {{/operations}} }