arendjantetteroo / guzzle-toggl

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

Add additional Toggl v8 API functions #20

Closed GregPeden closed 8 years ago

GregPeden commented 8 years ago

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

(Note: Sorry for direct blob links, however right now there's something wrong with GitHub and it's not mapping URLs from the project root properly. Anyone reading this in the future should take care to verify if links end up broken or something).

arendjantetteroo commented 8 years ago

@SirLamer Github complains about merge conflicts, can you take a look?

GregPeden commented 8 years ago

That's just because I forked before you merged someone else's request. You have to resolve the conflict because I cannot without write access on your project.

GregPeden commented 8 years ago

Actually, I can merge from your project in to my fork and then back in to your project. I'll do that.