gallowaylabs / streamdeck-tomato-timer

A configurable timer for balancing work and break times
MIT License
19 stars 1 forks source link

Feature Request: Hooks #6

Open RobErskine opened 1 year ago

RobErskine commented 1 year ago

I apologize for the late-night request. I was wondering if there was a preferred way to implement hooks to other services as part of this extension. For instance, if I start a Timer, can I leverage the Slack API to update my status to indicate I am "in flow"? And likewise, when the timer is finished, can I update Slack to make me available? This is a bit of a catchall and just looking for open advice before I fork and try to submit a PR for something like this.

Thanks for the original plugin! Looking forward to potentially contributing -Rob

mgway commented 1 year ago

That's a fascinating idea for sure! app.js has (hopefully) clearly named methods for timer events; start, pause, timerExpired, etc that you could append plugin interface calls to. I'll admit that I don't have too much advice on the architecture of a plugin system front as I'm not really a JS developer, I just picked it for this project since at the time all of the Stream Deck plugin examples were written in JS or C++ and this seemed like the lesser evil.