node-toggl-api icon indicating copy to clipboard operation
node-toggl-api copied to clipboard

Add support for .pdf response

Open JulianJorgensen opened this issue 8 years ago • 3 comments

Great work on this library! Big thanks @estliberitas !

Wanted to request support for .pdf response. According to their docs you just need to add .pdf to the call URL: https://github.com/toggl/toggl_api_docs/blob/master/reports.md

e.g. GET https://toggl.com/reports/api/v2/summary.pdf

Cheers

JulianJorgensen avatar Sep 05 '17 07:09 JulianJorgensen

@estliberitas I've forked this repo and added ".pdf" to the Toggl api calls. Not sure if I need to also modify some of the other code to support file streaming?

Just spent the day trying to fetch the pure PDF, but with no luck.

P.s. I've also asked StackOverflow for any pointers: https://stackoverflow.com/questions/46070781/get-toggl-pdf-report-using-node

JulianJorgensen avatar Sep 06 '17 08:09 JulianJorgensen

@JulianJorgensen Hey man. Well, I can look into it during weekend, or you can make a PR, hehe. I wonder if you can do it with a usual Node http client.

estliberitas avatar Sep 18 '17 20:09 estliberitas

Ah yea that may work!

As a temporary solution I just ended up embedding the “Saved Report” as a iframe instead.

Cheers

On Sep 19, 2017, at 4:46 AM, Alexander Makarenko [email protected] wrote:

@JulianJorgensen https://github.com/julianjorgensen Hey man. Well, I can look into it during weekend, or you can make a PR, hehe. I wonder if you can do it with a usual Node http client.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/7eggs/node-toggl-api/issues/12#issuecomment-330351098, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC1C3TQ3Nr7GeU19R-crukz3Ut5cE2Qks5sjtapgaJpZM4PMiuA.

JulianJorgensen avatar Oct 02 '17 02:10 JulianJorgensen