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

Badge::GoogleTalk - To get your status message/online status/chat link from google talk badge for website live chat.

VERSION

version 0.0.1

SYNOPSIS

    use Badge::GoogleTalk;
	my $my_object = Badge::GoogleTalk->new(
			key => "your identification key",
	);

	# Get Your Badge's online status
	my $online_status = $my_object->is_online();
	my $ol_status = $online_status == 0 ? "Offline" : "Online";
	
	# Get Your Badge's status message	
	my $status = $my_object->get_status();

	# Check Your Badge's away status
	my $away_status = $my_object->is_away();
	my $aw_status = $away_status == 1 ? "Away" : "Online";
	
	# Check Your Badge's Style
	my $style = $my_object->is_classic_style();
	my $style_status = $style == 1 ? "Classic badge or one/two line style" : "Hyperlink and status icon style";
	
	# Your Badge's in HTML format
	my $badge = $my_object->get_badge();

	# Your chat link for your website
	my $chat_link = $my_object->get_chat_box_link();

	To create a simple Badge::GoogleTalk you must pass the key;
	key is your identification from the google authentication.
	
	To create your chatback badge, visit http://www.google.com/talk/service/badge/New.
	If you're using a Google Apps account,
	you can create a chatback badge by visiting http://www.google.com/talk/service/a/DOMAIN/badge/New where DOMAIN is the name of your domain.
 
	Use the alphanumeric account hash to pass as key in constructor
  

DESCRIPTION

A simple perl module for retrieving a user's Google Talk status
Google does provide a badge, to post your status/images/links to your
website to start a chat. Using this code, we can extract the status messages, online status,
chat box link and return that information to our perl application to keep up the live chat.

METHODS

is_online

	Title   : is_online
					      
    Function: this will return your online status
	
	return : 1 if online, 0 if offline

is_away

	Title   : is_away
					      
    Function: this will return your away status
	
	return : 1 if away

get_status

	Title   : get_status
					      
    Function: this will return your status message
	
	return : 1 if away

is_classic_style

	Title   : is_classic_style
					      
    Function: this will return your badge style
	
	return : 1 if Classic badge or one/two line style, 0 if Hyperlink and status icon style
	Title   : get_chat_box_link
					      
    Function: this will return you the link of you chat box

get_badge

	Title   : get_badge
					      
    Function: this will return you the badge iframe to use for your website

DIAGNOSTICS

This module depends on the output from a hosted web page by Google. If Google
decides at any time to change this output, the module will likely fail.
Please e-mail me if this is the case, so we can get it working again.

CONFIGURATION AND ENVIRONMENT

Badge::GoogleTalk requires no configuration files or environment variables.

DEPENDENCIES

This module have the dependencies with the following modules
WWW::Mechanize

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to
C<bug-badge-googletalk@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>.

AUTHOR

Rakesh Kumar Shardiwal <rakesh.shardiwal@gmail.com>

LICENCE AND COPYRIGHT

Copyright (c) 2009, Rakesh Kumar Shardiwal <rakesh.shardiwal@gmail.com>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.