| 1 | package Exobrain::Intent::Response; | ||
| 2 | |||
| 3 | use 5.010; | ||
| 4 | use Moose; | ||
| 5 | use Method::Signatures; | ||
| 6 | |||
| 7 | our $VERSION = '1.08'; # VERSION | ||
| 8 | # ABSTRACT: A generic class for responses to social media messages | ||
| 9 | |||
| 10 | |||
| 11 | # TODO: Find a good way of doing platform verification | ||
| 12 | |||
| 13 | method summary() { return $self->to.'@'.$self->platform.': '.$self->text; } | ||
| 14 | |||
| 15 | BEGIN { with 'Exobrain::Intent'; } | ||
| 16 | |||
| 17 | payload text => ( isa => 'Str' ); | ||
| 18 | payload to => ( isa => 'Str' ); # User to receive message | ||
| 19 | payload in_response_to => ( isa => 'Str' ); # Status/event we're responding to | ||
| 20 | payload platform => ( isa => 'Str' ); # Platform to respond on. | ||
| 21 | |||
| 22 | 1; | ||
| 23 | |||
| 24 | __END__ |