Свойство | Тип | Описание | |
---|---|---|---|
$advDebug | |||
$debug | |||
$fastAPI | |||
$responseCode | |||
$timeout | Use Asana fast API version, currently in open beta: https://asana.com/developers/feed/asana-fast-api-open-beta |
Метод | Описание | |
---|---|---|
__construct ( array $options ) | Class constructor. | |
addAttachmentToTask ( string $taskId, array $data = [] ) : string | Add attachment to a task | |
addFollowersToTask ( string $taskId, array $followerIds ) : string | Adds followers to a task | |
addProjectToTask ( string $taskId, string $projectId, array $opts = [] ) : string | Adds a project to task. If successful, will return success and an empty data block. | |
addTagToTask ( string $taskId, string $tagId ) : string | Adds a tag to a task. If successful, will return success and an empty data block. | |
commentOnProject ( string $projectId, string $text = '' ) : string | Adds a comment to a project The comment will be authored by the authorized user, and timestamped when the server receives the request. | |
commentOnTask ( string $taskId, string $text = '' ) : string | Adds a comment to a task. | |
createProject ( array $data ) : string | Function to create a project. | |
createSubTask ( string $parentId, array $data, array $opts = [] ) : string | Creates a subtask in the parent task ID | |
createTag ( string $name, array $data, array $opts = [] ) : string | This method creates a new tag and returns its full record. | |
createTask ( array $data, array $opts = [] ) : string | Creates a task. | |
createTeam ( string $organizationId, array $data ) : string | Function to create a team in an Organization. | |
createWebhook ( string $resourceId, string $target ) : string | Creates a webhook. | |
deleteProject ( string $projectId ) : string | Deletes a project. | |
deleteTask ( string $taskId ) : string | Deletes a task. | |
deleteWebhook ( string $webhookId ) : string | This method permanently removes a webhook. | |
getAttachment ( string $attachmentId, array $opts = [] ) : string | Returns single attachment information | |
getData ( ) : object, | Decodes the response and returns as an object, array. | |
getMyTeams ( string $organizationId ) : string | Returns all teams the logged in user is associated with | |
getProject ( string $projectId, array $opts = [] ) : string | Returns the full record for a single project. | |
getProjectSections ( string $projectId, array $opts = [] ) : string | Returns the list of sections associated with the project. | |
getProjectStories ( string $projectId, array $opts = [] ) : string | Returns the list of stories associated with the project. | |
getProjectTasks ( string $projectId, array $opts = [] ) : string | Returns all unarchived tasks of a given project | |
getProjects ( boolean $archived = false, string $opt_fields = '' ) | Returns the projects in all workspaces containing archived ones or not. | |
getProjectsForTask ( string $taskId, array $opts = [] ) : string | Returns the projects associated to the task. | |
getProjectsInTeam ( string $teamId, boolean $archived = false, array $opts = [] ) : string | Returns the projects in provided workspace containing archived ones or not. | |
getProjectsInWorkspace ( string $workspaceId, boolean $archived = false, array $opts = [] ) : string | Returns the projects in provided workspace containing archived ones or not. | |
getSingleStory ( string $storyId, array $opts = [] ) : string | Returns the full record for a single story. | |
getSubTasks ( string $taskId, array $opts = [] ) : string | Returns sub-task information | |
getTag ( string $tagId, array $opts = [] ) : string | Returns the full record for a single tag. | |
getTags ( ) : string | Returns the full record for all tags in all workspaces. | |
getTask ( string $taskId, array $opts = [] ) : string | Returns task information | |
getTaskAttachments ( string $taskId, array $opts = [] ) : string | Returns task attachments information | |
getTaskStories ( string $taskId, array $opts = [] ) : string | Returns the list of stories associated with the object. | |
getTaskTags ( string $taskId, array $opts = [] ) : string | Returns a compact list of tags associated with the object. | |
getTasksByFilter ( array $filter = ['assignee' => '', 'project' => '', 'workspace' => ''], array $opts = [] ) : string | Returns task by a given filter. | |
getTasksWithTag ( string $tagId, array $opts = [] ) : string | Returns the list of all tasks with this tag. Tasks can have more than one tag at a time. | |
getTeamsInOrganization ( string $organizationId ) : string | Returns all teams in an Organization. | |
getUserInfo ( string $userId = null, array $opts = [] ) : string | Returns the full user record for a single user. | |
getUsers ( array $opts = [] ) : string | Returns the user records for all users in all workspaces you have access. | |
getWebhook ( string $webhookId ) : string | Returns the full record for the given webhook. | |
getWebhooks ( string $workspaceId, string $resource = null, array $opts = [] ) : string | Returns the compact representation of all webhooks your app has registered for the authenticated user in the given workspace. | |
getWorkspaceTags ( string $workspaceId ) : string | Returns tags of all workspace. | |
getWorkspaceTasks ( string $workspaceId, string $assignee = 'me', array $opts = [] ) : string | Returns tasks of all workspace assigned to someone. | |
getWorkspaceTypeahead ( string $workspaceId, string $type, string $query, string $count = 1, array $opts = [] ) : string | Returns search for objects from a single workspace. | |
getWorkspaceUsers ( string $workspaceId ) : string | Returns users of all workspace. | |
getWorkspaces ( array $opts = [] ) : string | Returns all the workspaces. | |
hasError ( ) : boolean | Checks for errors in the response. | |
moveTaskWithinProject ( string $projectId, string $taskToMove, string $taskReference, boolean $insertAfter = true ) : string | Moves a task within a project relative to another task. This should let you take a task and move it below or above another task as long as they are within the same project. | |
removeFollowersFromTask ( string $taskId, array $followerIds ) : string | Removes followers from a task | |
removeProjectToTask ( string $taskId, string $projectId ) : string | Removes project from task. If successful, will return success and an empty data block. | |
removeTagFromTask ( string $taskId, string $tagId ) : string | Removes a tag from a task. If successful, will return success and an empty data block. | |
setReturnType ( integer $type ) : Asana | Set the return type. | |
updateProject ( string $projectId, array $data ) : string | This method modifies the fields of a project provided in the request, then returns the full updated record. | |
updateTag ( string $tagId, array $data ) : string | Modifies the fields of a tag provided in the request, then returns the full updated record. | |
updateTask ( string $taskId, array $data ) : string | Updates a task | |
updateTaskParent ( string $taskId, string $parentId, array $opts = [] ) : string | Updated the parent from a task. | |
updateWorkspace ( $workspaceId, array $data = ['name' => ''] ) : string | Currently the only field that can be modified for a workspace is its name (as Asana API says). |
Метод | Описание | |
---|---|---|
askAsana ( string $url, string $data = null, integer $method = ASANA_METHOD_GET ) : string | This function communicates with Asana REST API. |
public __construct ( array $options ) | ||
$options | array | Array of options containing an apiKey OR a personalAccessToken OR an accessToken. Just one of them. Can be also an string if you want to use an apiKey. |
public createProject ( array $data ) : string | ||
$data | array | Array of data for the project following the Asana API documentation. Example: array( "workspace" => "1768", "name" => "Foo Project!", "notes" => "This is a test project" ) |
Результат | string | JSON or null |
public createSubTask ( string $parentId, array $data, array $opts = [] ) : string | ||
$parentId | string | The id of the parent task. |
$data | array | Array of data for the task following the Asana API documentation. Example: array( "name" => "Hello World!", "notes" => "This is a task for testing the Asana API :)", "assignee" => "176822166183", "followers" => array( "37136", "59083" ) ) |
$opts | array | Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options) |
Результат | string | JSON or null |
public createTag ( string $name, array $data, array $opts = [] ) : string | ||
$name | string | Tag name |
$data | array | An array containing either workspace or organization and the id. Example: array("workspace" => "3242349871"); |
$opts | array | Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options) |
Результат | string | JSON or null |
public createTask ( array $data, array $opts = [] ) : string | ||
$data | array | Array of data for the task following the Asana API documentation. Example: array( "workspace" => "1768", "name" => "Hello World!", "notes" => "This is a task for testing the Asana API :)", "assignee" => "176822166183", "followers" => array( "37136", "59083" ) ) |
$opts | array | Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options) |
Результат | string | JSON or null |
public deleteProject ( string $projectId ) : string | ||
$projectId | string | |
Результат | string | Empty if success |
public deleteTask ( string $taskId ) : string | ||
$taskId | string | |
Результат | string | Empty if success |
public deleteWebhook ( string $webhookId ) : string | ||
$webhookId | string | The webhook to delete. |
Результат | string | JSON or null |
public getData ( ) : object, | ||
Результат | object, |
public getMyTeams ( string $organizationId ) : string | ||
$organizationId | string | |
Результат | string | JSON or null |
public getProjects ( boolean $archived = false, string $opt_fields = '' ) | ||
$archived | boolean | Return archived projects or not |
$opt_fields | string | Return results with optional parameters |
public getProjectsInTeam ( string $teamId, boolean $archived = false, array $opts = [] ) : string | ||
$teamId | string | |
$archived | boolean | Return archived projects or not |
$opts | array | Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options) |
Результат | string | JSON or null |
public getProjectsInWorkspace ( string $workspaceId, boolean $archived = false, array $opts = [] ) : string | ||
$workspaceId | string | |
$archived | boolean | Return archived projects or not |
$opts | array | Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options) |
Результат | string | JSON or null |
public getTasksByFilter ( array $filter = ['assignee' => '', 'project' => '', 'workspace' => ''], array $opts = [] ) : string | ||
$filter | array | The filter with optional values. array( "assignee" => "", "project" => 0, "workspace" => 0 ) |
$opts | array | Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options) |
Результат | string | JSON or null |
public getTeamsInOrganization ( string $organizationId ) : string | ||
$organizationId | string | |
Результат | string | JSON or null |
public getWebhook ( string $webhookId ) : string | ||
$webhookId | string | The webhook to get. |
Результат | string | JSON or null |
public getWebhooks ( string $workspaceId, string $resource = null, array $opts = [] ) : string | ||
$workspaceId | string | The workspace to query for webhooks in. |
$resource | string | Optional: Only return webhooks for the given resource. |
$opts | array | Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options) |
Результат | string | JSON or null |
public getWorkspaceTags ( string $workspaceId ) : string | ||
$workspaceId | string | The id of the workspace |
Результат | string | JSON or null |
public getWorkspaceTasks ( string $workspaceId, string $assignee = 'me', array $opts = [] ) : string | ||
$workspaceId | string | The id of the workspace |
$assignee | string | Can be "me" or user ID |
$opts | array | Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options) |
Результат | string | JSON or null |
public getWorkspaceTypeahead ( string $workspaceId, string $type, string $query, string $count = 1, array $opts = [] ) : string | ||
$workspaceId | string | The id of the workspace |
$type | string | The type of object to look up. You can choose from one of the following: project, user, task, and tag. Note that unlike other endpoints, the types listed here are in singular form. Using multiple types is not yet supported. |
$query | string | The value to look up |
$count | string | The number of results to return with a minimum of 1 and a maximum of 100. The default is 1 if this parameter is omitted. If there are fewer results found than requested, all will be returned |
$opts | array | Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options) |
Результат | string | JSON or null |
public getWorkspaceUsers ( string $workspaceId ) : string | ||
$workspaceId | string | The id of the workspace |
Результат | string | JSON or null |
public getWorkspaces ( array $opts = [] ) : string | ||
$opts | array | Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options) |
Результат | string | JSON or null |
public moveTaskWithinProject ( string $projectId, string $taskToMove, string $taskReference, boolean $insertAfter = true ) : string | ||
$projectId | string | the project $taskReference is in and optionally $taskToMove is already in ($taskToMove will be added to the project if it's not already there) |
$taskToMove | string | the task that will be moved (and possibly added to $projectId |
$taskReference | string | the task that indicates a position for $taskToMove |
$insertAfter | boolean | true to insert after $taskReference, false to insert before |
Результат | string | JSON or null |
public setReturnType ( integer $type ) : Asana | ||
$type | integer | Return type defined in the constants. |
Результат | Asana |
public updateTaskParent ( string $taskId, string $parentId, array $opts = [] ) : string | ||
$taskId | string | The task to update |
$parentId | string | The id of the new parent task. |
$opts | array | Array of options to pass (@see https://asana.com/developers/documentation/getting-started/input-output-options) |
Результат | string | JSON or null |
public updateWorkspace ( $workspaceId, array $data = ['name' => ''] ) : string | ||
$data | array | Example: array("name" => "Test"); |
Результат | string | JSON or null |