{"id":19450899,"url":"https://github.com/morning-train/toggl-api","last_synced_at":"2025-10-07T08:19:21.310Z","repository":{"id":2446099,"uuid":"46565362","full_name":"Morning-Train/toggl-api","owner":"Morning-Train","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-17T14:19:01.000Z","size":333,"stargazers_count":35,"open_issues_count":17,"forks_count":27,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T07:19:09.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Morning-Train.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-20T14:05:33.000Z","updated_at":"2025-02-10T14:31:21.000Z","dependencies_parsed_at":"2024-06-18T18:35:48.906Z","dependency_job_id":"171cc3c7-54ed-4366-8120-01c32b1d6b3c","html_url":"https://github.com/Morning-Train/toggl-api","commit_stats":{"total_commits":78,"total_committers":13,"mean_commits":6.0,"dds":"0.41025641025641024","last_synced_commit":"f9075853f03c950f4c9a88300fefd38fc93f1d85"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morning-Train%2Ftoggl-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morning-Train%2Ftoggl-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morning-Train%2Ftoggl-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morning-Train%2Ftoggl-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Morning-Train","download_url":"https://codeload.github.com/Morning-Train/toggl-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252831271,"owners_count":21810784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T16:39:24.255Z","updated_at":"2025-10-07T08:19:16.265Z","avatar_url":"https://github.com/Morning-Train.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nPHP class to connect with the Toggl API.\n\nThis was coded on an early http://morningtrain.dk\n\n# Installation\n\nIt can be installed with composer\n\n```\ncomposer require morningtrain/toggl-api\n```\n\n# Dependencies\n\nIt depends on guzzlehttp/guzzle ver.6.\n\nGuzzle can be added with the following composer snippet:\n(or automatically when installing through composer)\n\n```\n{\n    \"require\": {\n        \"guzzlehttp/guzzle\": \"^6.0\"\n    }\n}\n```\n\n# Changelog\n### 14/06/2021 \n- Added methods for some of the undocumented project_group endpoints. This will make it possible to assign, update or remove groups from private projects.\n\n### 30/06/17 \n- Changed function name from getDashboadForWorkspace to getDashboardForWorkspace, if your system is using getDashboadForWorkspace please change it to getDashboardForWorkspace.\n\n# Examples\n\nFor details about the different objects required in the Toggl Api, take a look at their documentation:\nhttps://github.com/toggl/toggl_api_docs\n\n## Toggl API\n\n### Initialization\n\n```\n$toggl = new MorningTrain\\TogglApi\\TogglApi('my-api-token');\n```\n\n### Get available endpoints\n\n```\n$toggl-\u003egetAvailableEndpoints();\n```\n\n### Clients\n\nhttps://github.com/toggl/toggl_api_docs/blob/master/chapters/clients.md\n\n#### Creating a client\n\n```\n$toggl-\u003ecreateClient($clientObject);\n```\n\n#### Updating a client\n\n```\n$toggl-\u003eupdateClient($clientId, $clientObject);\n```\n\n#### Deleting a client\n\n```\n$toggl-\u003edeleteClient($clientId);\n```\n\n#### Get all clients\n\n```\n$toggl-\u003egetClients();\n```\n\n#### Get all projects for a client\n\n```\n$toggl-\u003egetClientProjects($clientId);\n```\n\n#### Get all active projects for a client\n\n```\n$toggl-\u003egetActiveClientProjects($clientId);\n```\n\n#### Get all inactive projects for a client\n\n```\n$toggl-\u003egetInactiveClientProjects($clientId);\n```\n\n#### Get both active and inactive projects for a client\n\n```\n$toggl-\u003egetAllClientProjects($clientId);\n```\n\n#### Get client by id\n\n```\n$toggl-\u003egetClientById($clientId);\n```\n\n### Project users\n\nhttps://github.com/toggl/toggl_api_docs/blob/master/chapters/project_users.md\n\n#### Create project user\n\n```\n$toggl-\u003ecreateProjectUser($projectUserObject);\n```\n\n#### Create project users\n\n```\n$toggl-\u003ecreateProjectUsers($projectUserObject);\n```\n\n#### Update project user\n\n```\n$toggl-\u003eupdateProjectUser($projectUserId, $projectUserObject);\n```\n\n#### Update project users\n\n```\n$toggl-\u003eupdateProjectUsers($projectUserIds, $projectUserObject);\n```\n\n#### Create project users\n\n```\n$toggl-\u003edeleteProjectUser($projectUserId);\n```\n\n#### Create project users\n\n```\n$toggl-\u003edeleteProjectUsers($projectUserIds);\n```\n\n### Projects\nhttps://github.com/toggl/toggl_api_docs/blob/master/chapters/projects.md\n\n#### Create project\n\n```\n$toggl-\u003ecreateProject($projectObject);\n```\n\n#### Update project\n\n```\n$toggl-\u003eupdateProject($projectId, $projectObject);\n```\n\n#### Delete project\n\n```\n$toggl-\u003edeleteProject($projectId);\n```\n\n#### Delete projects\n\n```\n$toggl-\u003edeleteProjects($projectIds);\n```\n\n#### Get users for project\n\n```\n$toggl-\u003egetProjectUserRelations($projectId);\n```\n\n#### Get project tasks\n\n```\n$toggl-\u003egetProjectTasks($projectId);\n```\n\n#### Get project by ID\n\n```\n$toggl-\u003egetProject($projectId);\n```\n\n### Dashboard\nhttps://github.com/toggl/toggl_api_docs/blob/master/chapters/dashboard.md\n\n#### Get dashboard for workspace\n\n```\n$toggl-\u003egetDashboardForWorkspace($workspaceId);\n```\n\n### Users\nhttps://github.com/toggl/toggl_api_docs/blob/master/chapters/users.md\n\n#### Get me\n$related defaults to false. Set it to true, to get related data\n```\n$toggl-\u003egetMe($related);\n```\n\n#### Update me\n```\n$toggl-\u003eupdateMe($userObject);\n```\n\n#### Sign up\n```\n$toggl-\u003esignup($userObject);\n```\n\n#### Reset API Token\n```\n$toggl-\u003eresetApiToken();\n```\n\n### Workspaces\nhttps://github.com/toggl/toggl_api_docs/blob/master/chapters/workspaces.md\n\n#### Get workspaces\n```\n$toggl-\u003egetWorkspaces();\n```\n\n#### Get workspace by ID\n```\n$toggl-\u003egetWorkspace($workspaceId);\n```\n\n#### Update workspace\n```\n$toggl-\u003eupdateWorkspace($workspaceId, $workspaceObject);\n```\n\n#### Get workspace users\n```\n$toggl-\u003egetWorkspaceUsers($workspaceId);\n```\n\n#### Get workspace clients\n```\n$toggl-\u003egetWorkspaceClients($workspaceId);\n```\n\n#### Get workspace projects\n```\n$toggl-\u003egetWorkspaceProjects($workspaceId);\n```\n\n#### Get workspace tasks\n```\n$toggl-\u003egetWorkspaceTasks($workspaceId);\n```\n\n#### Get workspace tags\n```\n$toggl-\u003egetWorkspaceTags($workspaceId);\n```\n\n### Workspace users\nhttps://github.com/toggl/toggl_api_docs/blob/master/chapters/workspace_users.md\n\n#### Invite users to workspace\n```\n$toggl-\u003einviteUsersToWorkspace($workspaceId, $emails);\n```\n\n#### Update workspace user\n```\n$toggl-\u003eupdateWorkspaceUser($workspaceUserId, $userObject);\n```\n\n#### Delete workspace user\n```\n$toggl-\u003edeleteWorkspaceUser($workspaceUserId);\n```\n\n#### Get workspace users for workspace\n```\n$toggl-\u003egetWorkspaceUserRelations($workspaceId);\n```\n\n### Tags\nhttps://github.com/toggl/toggl_api_docs/blob/master/chapters/tags.md\n\n#### Create tag\n```\n$toggl-\u003ecreateTag($tagObject);\n```\n\n#### Update tag\n```\n$toggl-\u003eupdateTag($tagId, $tagObject);\n```\n\n#### Delete tag\n```\n$toggl-\u003edeleteTag($tagId);\n```\n\n### Tasks\nhttps://github.com/toggl/toggl_api_docs/blob/master/chapters/tags.md\n\n#### Get task\n```\n$toggl-\u003egetTask($taskId);\n```\n\n#### Create task\n```\n$toggl-\u003ecreateTask($taskObject);\n```\n\n#### Update task\n```\n$toggl-\u003eupdateTask($taskId, $taskObject);\n```\n\n#### Update tasks\n```\n$toggl-\u003eupdateTasks($taskId, $taskObject);\n```\n\n#### Delete task\n```\n$toggl-\u003edeleteTask($taskId);\n```\n\n#### Delete tasks\n```\n$toggl-\u003edeleteTasks($taskIds);\n```\n\n### Time entries\nhttps://github.com/toggl/toggl_api_docs/blob/master/chapters/time_entries.md\n\n#### Create time entry\n```\n$toggl-\u003ecreateTimeEntry($timeEntryObject);\n```\n\n#### Start time entry\n```\n$toggl-\u003estartTimeEntry($timeEntryObject);\n```\n\n#### Stop time entry\n```\n$toggl-\u003estopTimeEntry($timeEntryIds);\n```\n\n#### Get time entry\n```\n$toggl-\u003egetTimeEntry($timeEntryIds);\n```\n\n#### Get running time entry\n```\n$toggl-\u003egetRunningTimeEntry();\n```\n\n#### Get time entries\n```\n$toggl-\u003egetTimeEntries();\n```\n\n#### Get time entries in range\n```\n$toggl-\u003egetTimeEntriesInRange($start, $end);\n```\n\n#### Update tags for time entries\n```\n$toggl-\u003eupdateTagsForTimeEntries($timeEntryIds, $timeEntryObject);\n```\n\n#### Update time entry\n```\n$toggl-\u003eupdateTimeEntry($timeEntryIds, $timeEntryObject);\n```\n\n#### Delete time entry\n```\n$toggl-\u003edeleteTimeEntry($timeEntryIds);\n```\n\n## Reports API\nhttps://github.com/toggl/toggl_api_docs/blob/master/reports.md\n\n### Initialization\n\n```\n$toggl = new MorningTrain\\TogglApi\\TogglReportsApi('my-api-token');\n```\n\n### Get available endpoints\n\n```\n$toggl-\u003egetAvailableEndpoints();\n```\n\n### Methods\n\n#### Get project report\n```\n$toggl-\u003egetProjectReport($query);\n```\n\n#### Get summary report\n```\n$toggl-\u003egetSummaryReport($query);\n```\n\n#### Get details report\n```\n$toggl-\u003egetDetailsReport($query);\n```\n\n#### Get weekly report\n```\n$toggl-\u003egetWeeklyReport($query);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorning-train%2Ftoggl-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorning-train%2Ftoggl-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorning-train%2Ftoggl-api/lists"}