root/POE-Component-YahooMessenger/trunk/README

Revision 768 (checked in by miyagawa, 17 years ago)

add

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 NAME
2     POE::Component::YahooMessenger - POE component for Yahoo! Messenger
3
4 SYNOPSIS
5       use POE qw(Component::YahooMessenger);
6
7       # spawn YM session
8       POE::Component::YahooMessenger->spawn(Alias => 'ym');
9
10       # register your session for callbacks
11       $kernel->post(ym => 'register');
12
13       # tell YM how to connect
14       $kernel->post(ym => connect => {
15           id       => 'your_id',
16           password => 'xxxxxxx',
17       });
18
19       # associate this callback with 'ym_goes_online'
20       sub goes_online {
21           my $event = $_[ARG0];
22           printf "buddy %s goes online\n", $event->buddy_id;
23       }
24
25       # send message
26       $kernel->post(ym => send_message => {
27           to => $buddy_id,
28           message => "Hello World",
29       });
30
31       # change your status
32       $kernel->post(ym => change_my_status => {
33           busy => 0, # 0 = not busy
34           message => "going for lunch now!",
35       });
36
37       # retrieve your buddies list
38       $kernel->post(ym => buddies => 'retrieve_buddies');
39       sub retrieve_buddies {
40           my $buddies = $_[ARG0];
41           for my $group (keys %$buddies) {
42               print "$group:\n", map "  $_\n", @{$buddies->{$group}};
43           }
44       }
45
46       $poe_kernel->run();
47
48 DESCRIPTION
49     POE::Component::YahooMessenger is a POE component to connect Yahoo!
50     Messener. This module ripoffs a lot of code from Net::YahooMessenger for
51     protocol implementations.
52
53     API is intentionally made similar to that of PoCo::IRC.
54
55 EVENTS
56     TBD.
57
58 CAVEATS
59     This is ALPHA SOFTWARE: There maybe some bugs. API might change.
60
61 AUTHOR
62     Tatsuhiko Miyagawa <miyagawa@bulknews.net>
63
64     YahooMessenger protocol implementation is based on Net::YahooMessenger
65     by Hiroyuki Oyama <oyama[cpan.org>.
66
67     This library is free software; you can redistribute it and/or modify it
68     under the same terms as Perl itself.
69
70 SEE ALSO
71     the POE manpage, the POE::Component::IRC manpage, the
72     Net::YahooMessenger manpage, http://ymca.infoware.ne.jp/
73
Note: See TracBrowser for help on using the browser.