| 1 | package Exobrain::Agent::Beeminder::Notify; | ||
| 2 | |||
| 3 | use Exobrain; | ||
| 4 | use Moose; | ||
| 5 | use Method::Signatures; | ||
| 6 | |||
| 7 | # ABSTRACT: Send a notification every time a bmndr data point is updated | ||
| 8 | our $VERSION = '1.06'; # VERSION | ||
| 9 | |||
| 10 | with 'Exobrain::Agent::Run'; | ||
| 11 | |||
| 12 | method run() { | ||
| 13 | $self->exobrain->watch_loop( | ||
| 14 | class => 'Measurement::Beeminder', | ||
| 15 | then => sub { | ||
| 16 | $self->exobrain->notify($_->summary); | ||
| 17 | }, | ||
| 18 | ); | ||
| 19 | } | ||
| 20 | |||
| 21 | 1; | ||
| 22 | |||
| 23 | __END__ |