Hyungsuk Hong > AnyEvent-Campfire-Stream-0.0.2 > AnyEvent::Campfire::Stream

Download:
AnyEvent-Campfire-Stream-0.0.2.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.0.2   Source   Latest Release: AnyEvent-Campfire-Stream-0.0.3

NAME ^

AnyEvent::Campfire::Stream

VERSION ^

version 0.0.2

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.

syntax highlighting: