The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

AnyEvent::Campfire::Stream

VERSION

version 0.0.3

SYNOPSIS

use AnyEvent::Campfire::Stream;
my $stream = AnyEvent::Campfire::Stream->new(
    token => 'xxx',
    rooms => '1234',    # hint: room id is in the url
                        # seperated by comma `,`
);

$stream->on('stream', sub {
    my ($s, $data) = @_;    # $s is $stream
    print "$data->{id}: $data->{body}\n";
});

$stream->on('error', sub {
    my ($s, $error) = @_;
    print STDERR "$error\n";
});

SEE ALSO

https://github.com/37signals/campfire-api/blob/master/sections/streaming.md

AUTHOR

Hyungsuk Hong <hshong@perl.kr>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Hyungsuk Hong.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.