Skip to content

Commit

Permalink
🐛 Move Project Tasks to workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonJnsson committed Sep 11, 2023
1 parent f456536 commit 85220bc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/TogglApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,14 @@ public function getProjectGroupRelations($workspaceId, $projectId)
/**
* Get project tasks.
*
* @param int $workspaceId
* @param int $projectId
*
* @return bool|mixed|object
*/
public function getProjectTasks($projectId)
public function getProjectTasks($workspaceId, $projectId)
{
return $this->GET('projects/'.$projectId.'/tasks');
return $this->workspace($workspaceId)->getProjectTasks($projectId);
}

/**
Expand Down
12 changes: 12 additions & 0 deletions src/TogglTrackWorkspaceApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,18 @@ public function getProjectGroupRelations($projectId)
return $this->GET("projects/{$projectId}/project_groups");
}

/**
* Get project group relations.
*
* @param int $projectId
*
* @return bool|mixed|object
*/
public function getProjectTasks($projectId)
{
return $this->GET("projects/{$projectId}/tasks");
}

/**
* Get client by ID.
*
Expand Down

0 comments on commit 85220bc

Please sign in to comment.