arendjantetteroo / guzzle-toggl

A Toggl API client based on guzzle
MIT License
88 stars 42 forks source link

Add additional Toggl v8 API functions #21

Closed GregPeden closed 8 years ago

GregPeden commented 8 years ago

(Note: This is a second PR for this content, with the previous merge conflict resolved.)

The "delete a project" action on Toggl API supports multiple comma-separated Project ID numbers, so I added "DeleteProjects" to guzzle-toggl in a style similar to that used for other Toggl API objects. Docs reference: https://github.com/toggl/toggl_api_docs/blob/master/chapters/projects.md#delete-multiple-projects

I suggested to Toggl that the same method should be supported on Clients, but it's not, and they declined to implement but said it will be added on v9 of the API.

I asked Toggl to implement a means to query for all Project Users within a workspace, for sanity check purposes, and they responded by saying that exists but is not documented, then updated the docs. I have added a guzzle-toggl method 'GetWorkspaceProjectUsers' to take advantage of this. This has been tested and works. Docs reference: https://github.com/toggl/toggl_api_docs/blob/master/chapters/project_users.md#get-list-of-project-users-in-a-workspace

In "GetWorkspaceProjects", I added some query parameters which I happened to notice in the docs but missing from guzzle-toggl. These were not tested but mirror the format used for other similar parameters. Docs reference: https://github.com/toggl/toggl_api_docs/blob/master/chapters/workspaces.md#get-workspace-projects

arendjantetteroo commented 8 years ago

@SirLamer Thanks!