Skip to content

Commit 85220bc

Browse files
committed
🐛 Move Project Tasks to workspace
1 parent f456536 commit 85220bc

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/TogglApi.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,14 @@ public function getProjectGroupRelations($workspaceId, $projectId)
386386
/**
387387
* Get project tasks.
388388
*
389+
* @param int $workspaceId
389390
* @param int $projectId
390391
*
391392
* @return bool|mixed|object
392393
*/
393-
public function getProjectTasks($projectId)
394+
public function getProjectTasks($workspaceId, $projectId)
394395
{
395-
return $this->GET('projects/'.$projectId.'/tasks');
396+
return $this->workspace($workspaceId)->getProjectTasks($projectId);
396397
}
397398

398399
/**

src/TogglTrackWorkspaceApi.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,18 @@ public function getProjectGroupRelations($projectId)
237237
return $this->GET("projects/{$projectId}/project_groups");
238238
}
239239

240+
/**
241+
* Get project group relations.
242+
*
243+
* @param int $projectId
244+
*
245+
* @return bool|mixed|object
246+
*/
247+
public function getProjectTasks($projectId)
248+
{
249+
return $this->GET("projects/{$projectId}/tasks");
250+
}
251+
240252
/**
241253
* Get client by ID.
242254
*

0 commit comments

Comments
 (0)