Conversation
This allows Bees to store a state independent from event parameters.
Those states can be checked in filters or used as action parameters
like other values.
Just as examples, Bees could store whether they're currently connected,
the latest sensor read-out, or the timestamp of the most recent sync
as their states.
In Filters you could then check their state:
{{test eq .context.irc.connected true}}
added myself as author, replaced hardcoded address, changed error handling, changed event name
|
I incorporated the comments. Please let me know if I should fix anything else! @muesli |
CalmBit
left a comment
There was a problem hiding this comment.
Overall, looking great. This will be really useful once it's ready to go. Just a few small questions and one final nitpick to make sure you're crediting yourself!
| Namespace: factory.Name(), | ||
| Name: "notification", | ||
| Description: "A push notification was sent by the Youtube channel", | ||
| Options: []bees.PlaceholderDescriptor{ |
There was a problem hiding this comment.
Is there any other information that can be extracted from YouTube's API? As it stands, this mostly just seems like a generic push, rather than something more actionable. If not, that's absolutely fine - I'm just wondering, so we can broaden it now if possible 😄
There was a problem hiding this comment.
Also, again, if we can extract more information, then @muesli's suggestion of dividing the current monolith event into multiple events might be a good idea.
There was a problem hiding this comment.
I agree how the current monolith event should be split into multiple events so I looked at the notification and the response object provided in the documentation. Unfortunately, I don't think it's possible to divide the notification into three different types of events. I think you can definitely expand this bee for more functionalities such as uploading video, but in the aspect of notification this is as specific as it can get I believe.
There was a problem hiding this comment.
I'm not sure if the publication/updated date are initially set to the same value for initial publication, but if they were you could check if they were the same, and at least divide them into two - the initial publish and the update.
There was a problem hiding this comment.
oof good catch. I missed that. Thank you for your insight. I'll commit that this weekend!
| * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| * | ||
| * Authors: | ||
| * Christian Muehlhaeuser <muesli@gmail.com> |
There was a problem hiding this comment.
You should add yourself here too! 😄
Parsed the monolithic event into two: new_video and change_video
Able to listen for Youtube notifications when beehive is exposed to a public url.