\Contacts

Contacts class

Get list of contacts who you can add to chats etc.

Summary

Methods
Properties
Constants
Get()
FindByID()
Add()
Remove()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

Get()

Get(integer|string  $q = "me", array  $o = array(), array  $u_o = array()) : \(User|array<mixed,\int)>

Get contacts

Get current user's (or by id) contacts

Parameters

integer|string $q

Query. If === me - works with current user

array $o

Options

  • RETURN_IDS - Users will be returned as int ids instead of classes
array $u_o

Options for User class

Throws

\apiException
  • [701] Incorrect query

Returns

\(User|array<mixed,\int)>

FindByID()

FindByID(integer  $u, integer|string  $q = "me", array  $o = array()) : boolean

Find By ID

Search for a user in contacts list

Returns true if found such ID

Parameters

integer $u

Requested user

integer|string $q

Contacts ist owner. If === me - works with current user

array $o

Options

Returns

boolean

Add()

Add(integer  $u, string|integer  $q = "me", array  $o = array()) : boolean

Add User to Contacts

Adds a user to requested contacts list

Parameters

integer $u

User ID to add

string|integer $q

Contacts list owner. If === me - works with current user

array $o

Options

Throws

\apiException
  • [701] Incorrect ID
  • [702] User is already added

Returns

boolean

Remove()

Remove(integer  $u, string|integer  $q = "me") : boolean

Remove Contacts

Removes a contact from list

Not ready yet

Parameters

integer $u

User to remove

string|integer $q

Contacts ist owner. If === me - work with current user

Throws

\apiException
  • [701] Incorrect typ
  • [703] No such user in contacts

Returns

boolean —

Result