NAME

Pikeo::API::User::Logged - Abstraction the logged in pikeo user

DESCRIPTION

This modules provides an interface to the logged in user in pikeo.

This module inherits from Pikeo::API::User so all the methods of Pikeo::API::User are also available.

SYNOPSIS

use Pikeo::API;
use Pikeo::API::User::Logged;

# create an API object to maintain you session
# trough out the diferent calls
my $api = Pikeo::API->new({api_secret=>'asd', api_key=>'asdas'});
$api->login({ username => 'a', password => 'b' });

# Get the logged in user 
my $user1 = Pikeo::API::User::Logged->new({ api => $api });

#get the public photos
my $photos = $user->getPublicPhotos();

FUNCTIONS

CONSTRUCTORS

new( \%args )

Returns a Pikeo::API::User object.

Required args are:

  • api

    Pikeo::API object

INSTANCE METHODS

uploadPhoto(\%args)

Upload one photo to the photo repository

Returns the Pikeo::API::Photo object representing the uploaded photo

Required args:

  • picture

    One file name containing the picture or a IO::File object pointing to the picture

Optional args:

  • title

    The picture title

  • access_type

    The access type of the picture: 0 for PRIVATE, 2 for FRIEND, 4 for FAMILY, 6 for FRIEND AND FAMILY and 7 for PUBLIC. By default the picture is PUBLIC

  • title

    Title associated to the photo

  • description

    Description of the photo

  • A list of tags associated to the uploaded photo

    The list of tags is a reference to an array containing 'category' => 'tag' pairs.

    Example: [ 'where' => 'lisbon', 'who' => 'donald' , ... ]

    Tag categories can be: who, what or where.

    Only letters, figures and spaces are authorized in the tag itself.

getMyCommentedPhotos()

Return all the photos that the user owns that are commented.

Return a list of Pikeo::API::Photo

getPicturesCommentedByMe()

Returns all the photos that were commented by the user.

Return a list of Pikeo::API::Photo

getContactsList()

The function will get the contacts of the logged user.

Returns a list of Pikeo::API::Contact objects.