\Folks_Api

Folks api

Copyright 2008 Obala d.o.o (www.obala.si)

See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://cvs.horde.org/co.php/folks/LICENSE.

Summary

Methods
Properties
Constants
disabled()
getImageUrl()
commentCallback()
hasComments()
getOnlineUsers()
getProfile()
getFriends()
addFriend()
removeFriend()
getBlacklist()
addBlacklisted()
removeBlacklisted()
isBlacklisted()
listTimeObjectCategories()
listTimeObjects()
logActivity()
getActivity()
setStatus()
getStatus()
No public properties found
No constants found
No protected methods found
$_links
N/A
No private methods found
No private properties found
N/A

Properties

$_links

$_links : array

Links.

Type

array

Methods

disabled()

disabled() 

getImageUrl()

getImageUrl(string  $user, string  $view = 'small', boolean  $full = false) : string

Returns profile image URL.

Parameters

string $user

User uid

string $view

The view ('small', 'big') to show.

boolean $full

Return a path that includes the server name?

Returns

string —

The image path.

commentCallback()

commentCallback(integer  $id, string  $type = 'title', array  $params = null) 

Callback for comment API.

Parameters

integer $id

Internal data identifier.

string $type

Type of data to retreive (title, owner...).

array $params

Parameter to be passed to callback function

hasComments()

hasComments() 

Comments are enebled

getOnlineUsers()

getOnlineUsers() 

Get online users

getProfile()

getProfile(string  $user = null) 

Get user profile

Parameters

string $user

User to get profile for

getFriends()

getFriends(string  $user = null) : array

Get user friends

Parameters

string $user

Username to get friends for

Returns

array —

of users

addFriend()

addFriend(  $user = null) : true

Add user to our friend list

Parameters

$user

Returns

true —

or PEAR_Error

removeFriend()

removeFriend(  $user = null) : true

Remove user from a fiend list

Parameters

$user

Returns

true —

or PEAR_Error

getBlacklist()

getBlacklist(string  $user = null) : array

Get user blacklist

Parameters

string $user

Username to get blacklist for

Returns

array —

of users

addBlacklisted()

addBlacklisted(string  $user = null) 

Add user to a blacklist list

Parameters

string $user

Usersame

removeBlacklisted()

removeBlacklisted(string  $user = null) 

Remove user from a blacklist list

Parameters

string $user

Usersame

isBlacklisted()

isBlacklisted(string  $user = null) : array

Are we blackisted by user this user?

Parameters

string $user

Username to get blacklist for

Returns

array —

of users

listTimeObjectCategories()

listTimeObjectCategories() 

Users categories

listTimeObjects()

listTimeObjects(array  $categories, \Horde_Date  $start, \Horde_Date  $end) 

Lists users with birthdays/goout dates as time objects.

Parameters

array $categories

The time categories (from listTimeObjectCategories) to list.

\Horde_Date $start

The start date of the period.

\Horde_Date $end

The end date of the period.

logActivity()

logActivity(mixed  $message, string  $scope = 'folks', string  $user = null) : boolean

Log user's activity

Parameters

mixed $message

Activity message or details

string $scope

Scope

string $user

$user

Returns

boolean —

True on success or a PEAR_Error object on failure.

getActivity()

getActivity(string  $user, integer  $limit = 10) : array

Get user's activity

Parameters

string $user

Username

integer $limit

Number of actions to return

Returns

array —

Activity log

setStatus()

setStatus(\booelan  $online = true, string  $user = null) : boolean

Set user status

Parameters

\booelan $online

True to set user online, false to push it offline

string $user

Username

Returns

boolean —

True if succes, PEAR_Error on failure

getStatus()

getStatus(string  $user = null) : boolean

Get user status

Parameters

string $user

Username

Returns

boolean —

True if user is online, false otherwise