NAME

Net::ZooTool - Moose interface to the Zootool API: http://zootool.com

SYNOPSIS

my $zoo = Net::ZooTool->new({ apikey   => $config{apikey} });

my $weekly_popular = $zoo->item->popular({ type => "week" });

# Info about a specific item
print Dumper($zoo->item->info({ uid => "6a80z" }));

# Examples with authenticated calls
my $auth_zoo = Net::ZooTool->new(
    {
        apikey   => $config{apikey},
        user     => $config{user},
        password => $config{password},
    }
);

my $data = $auth_zoo->user->validate({ username => $config{user}, login => 'true' });
print Dumper($data);

# In some methods authentication is optional.
# Public items only
my $public_items = $auth_zoo->user->items({ username => $config{user} });
# Include also your private items
my $all_items = $auth_zoo->user->items({ username => $config{user}, login => 'true' });

DESCRIPTION

Net::ZooTool is a wrapper to the Zootool bookmarking service. It attempts to follow the api defined in http://zootool.com/api/docs/general as much as possible. Please refer to their API Documentation site for more information.

PACKAGE METHODS

new(\%ARGS)

Create a new Net::ZooTool object.

Parameters:

  • apikey

    string. Your Zootool apikey (required)

  • user

    string. Your Zootool username (optional)

  • password

    string. Your Zootool password (optional)

OBJECT METHODS

$zoo->user()

Net::ZooTool::User object

$zoo->item()

Net::ZooTool::Item object

$zoo->add(\%ARGS)

Adds a new item to your zoo (authentication is required).

Parameters:

  • apikey

    string. Your Zootool api key (required)

  • url

    string. Url to add (required)

  • title

    string. Item title (required)

  • tags

    string. Comma separated if you want to include more than one (optional)

  • description

    string. Entry description (optional)

  • referer

    string. Entry referer, must be a valid url (optional)

  • public

    string. Whether or not the item is public ('y' or 'n')

  • login

    boolean. Add method requires authenticated call (required)

$zoo->user->items(\%ARGS)

Get the latest items from all users or specify a username to get all items from a specific user. Authenticate to get all private items of a user as well. Use authentication if you want to get private items as well).

Parameters:

  • apikey

    string. Your Zootool api key (required)

  • username

    string. Zootool username (required)

  • login

    string. must be true if you want to make an authenticated call via digest (optional).

  • tag

    string. Tag search (optional)

  • offset

    int. Search offset (optional)

  • limit

    int. Search limit (optional)

  • login

    boolean. Set to true to get private items as well.

$zoo->user->info(\%ARGS)

Get info about a certain user. Authentication is optional (if you want to get the email address from the user, you need to sign in).

Parameters:

  • apikey

    string. Your Zootool api key (required)

  • username

    string. Zootool username (required)

  • login

    boolean. Set to true to get email address

$zoo->user->validate(\%ARGS)

Validate the user credentials. Useful for logins.

Parameters:

  • apikey

    string. Your Zootool api key (required)

  • username

    string. Your zootool username (required)

SEE ALSO

http://zootool.com/

http://zootool.com/api/docs

AUTHOR

Josep Roca, <quelcom@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2011 by Josep Roca

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.