\msgAccess

Get forwarded messages with msgAccess

A child of Access object for getting forwarded messages

Summary

Methods
Properties
Constants
getObjects()
__construct()
No public properties found
MESSAGE_TYPE
USER_TYPE
CHAT_TYPE
als
No protected methods found
$success
N/A
getAccess()
$data
N/A

Constants

MESSAGE_TYPE

MESSAGE_TYPE = 2

Type to use it from DB and functions

USER_TYPE

USER_TYPE = 3

Type to use it from DB and functions

CHAT_TYPE

CHAT_TYPE = 4

Type to use it from DB and functions

als

als = array("c" => "im_chats", "u" => "users")

Acceptable get-types

Properties

$success

$success : boolean

Type

boolean — Was access provided

$data

$data : array

Type

array — Message data

Methods

getObjects()

getObjects(array<mixed,boolean>  $o = array()) : array

Get saved in the class objects

Universal method to access objects, which were stored by extended methods.

Parameters

array<mixed,boolean> $o

Options.

  • DOWNGRADE_CHATS_TO_USERS - Chat users lists will be extracted from Chat class and presented as User class
  • MERGE_RESULTS - If there's more than one object the return value will be merged

Returns

array —

Requested objects

__construct()

__construct(string|array  $query, array  $o = array()) : void

Router

Get a message/prepare to forwarding

Parameters

string|array $query

Token/Message data

array $o

Options

  • CREATE_NEW - Creates new token

getAccess()

getAccess(string  $key, array  $o = array()) : \Message

Get access to a message

access_token is used for passive access to messages (eg forwarded)

Parameters

string $key

32-symbols length Access key

array $o

Options

Throws

\apiException
  • [400] Invalid data
  • [401] Not found

Returns

\Message