Skip to content

Normalize return types #12

@thekaveman

Description

@thekaveman

Hey there, thanks for writing this library! I'm excited to streamline my monthly reporting workflow 😅

I had a question/suggestion about some of the methods on TogglClientApi.

It seems like some return the parsed JSON response, like:

While others return the raw requests.Response object, like:

I'm wondering if you have considered and/or would be open to normalizing these return types? One way or the other. I guess my two cents would be it probably makes sense to return the parsed JSON response every time, because of how some of the methods (like get_user_hours_range()) dive into the structure to return specific values.

Of course this would be a breaking change in the library, so I realize this is a big ask. I would be happy to put a PR together (with tests) if this seems reasonable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions