WWW::Myspace::FriendChanges - Track additions/deletions to your friends list


WWW-Myspace documentation  | view source Contained in the WWW-Myspace distribution.

Index


NAME

Top

WWW::Myspace::FriendChanges - Track additions/deletions to your friends list

VERSION

Top

Version 0.04

SYNOPSIS

Top

Returns a list of friends that have been added or deleted since the last run.

	use WWW::Myspace;
    use WWW::Myspace::FriendChanges;

	my $myspace = new WWW::Myspace;

    my $foo = WWW::Myspace::FriendChanges->new( $myspace );

	OR

	my $foo = WWW::Myspace::FriendChanges->new( $myspace, $cache_file )

	# Get the list of deleted friends.
	@deleted_friends = $foo->deleted_friends;

	# Get the list of new friends
	@added_friends = $foo->added_friends;

	# Write the current friend list into the cache file.
	$foo->write_cache;

METHODS

Top

new

The new method requires 1 argument (a WWW::Myspace object), and takes an optional second argument, a filename for the cache file. The cache file defaults to "friendcache" in the WWW::Myspace cache_dir. You can set it using the "new" method or using the "cache_file" method.

set_cache_file( filename )

Sets the cache file. You should use "cache_file" instead. This method is only for backwards compatibility.

cache_file

Sets or returns the current cache filename.

	my $cache_file = $friend_changes->cache_file;

	print $cache_file;

"filename" is used as the file from/to which we read/write the list of friends. Setting the cache filename also clears the internal last_friends list.

write_cache

Writes out the current list of friends to the cache file.

deleted_friends

Returns a list of the IDs of friends that have disappeared since the last cache list was saved. The first time it's called it searches the friends lists and caches the list of deleted friends within the object data.

	Usage:

	use WWW::Myspace;
	use WWW::Myspace::FriendChanges;

	my $myspace = new WWW::Myspace;
	my $friend_changes = new FriendChanges( $myspace );

	my @deleted_friends = $friend_changes->deleted_friends;

added_friends

Returns a list of the IDs of friends that have been added since the last cache list was saved.

AUTHOR

Top

Grant Grueninger, <grant at cscorp.com>

BUGS

Top

Please report any bugs or feature requests to bug-www-myspace at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Myspace. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc WWW::Myspace::FriendChanges

You can also look for information at:

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/WWW-Myspace

* CPAN Ratings

http://cpanratings.perl.org/d/WWW-Myspace

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Myspace

* Search CPAN

http://search.cpan.org/dist/WWW-Myspace

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


WWW-Myspace documentation  | view source Contained in the WWW-Myspace distribution.