-
Notifications
You must be signed in to change notification settings - Fork 49
API Requests & Responses
Setiawan edited this page Aug 14, 2020
·
9 revisions
For convenience, the first argument of all wrapped method may be a TelegramObject which contains the target method payload. It's fields will be sent as payload.
example:
$payload = new TelegramObject();
$payload->peer = '@your_username';
$payload->message = 'Your Message';
Messages::sendMessage($payload);
All wrapped method returns a TelegramObject instance which wrapping the array response from Telegram api into an "object notated" response. The TelegramObject implements the Illuminate\Contracts\Support\Arrayable
contract.
examples:
$response = Messages::sendMessage('@your_username', 'Your Message');
dd($response->toArray());
- Messages (WIP)