diff --git a/docs/content/12.features/9.dto.md b/docs/content/12.features/9.dto.md index b7d2c5b9..821a62ef 100644 --- a/docs/content/12.features/9.dto.md +++ b/docs/content/12.features/9.dto.md @@ -9,8 +9,8 @@ Data obtained from manual polling or webhooks is available through a set of DTO, contains incoming data (a message or a callback query) - `->id()` incoming _update_id_ -- `->message()` (optional) an instance of [`Message`](/webhooks/dto#message) -- `->callbackQuery()` (optional) an instance of [`CallbackQuery`](/webhooks/dto#callback-query) +- `->message()` (optional) an instance of [`Message`](/features/dto#message) +- `->callbackQuery()` (optional) an instance of [`CallbackQuery`](/features/dto#callback-query) ## `Chat` @@ -27,21 +27,21 @@ contains incoming data (a message or a callback query) - `->editDate()` a `CarbonInterface` holding the message last edit date - `->text()` the message text - `->protected()` a boolean flag that states the message is protected from forwarding and download -- `->from()` (optional) an instance of [`User`](/webhooks/dto#user) holding data about the message's sender -- `->forwardedFrom()` (optional) an instance of [`User`](/webhooks/dto#user) holding data about a forwarded message's original sender -- `->chat()` (optional) an instance of [`Chat`](/webhooks/dto#chat) holding data about the chat to which the message belongs to +- `->from()` (optional) an instance of [`User`](/features/dto#user) holding data about the message's sender +- `->forwardedFrom()` (optional) an instance of [`User`](/features/dto#user) holding data about a forwarded message's original sender +- `->chat()` (optional) an instance of [`Chat`](/features/dto#chat) holding data about the chat to which the message belongs to - `->keyboard()` (optional) an instance of [`DefStudio\Telegraph\Keyboard\Keyboard`](/features/keyboards) holding the message inline keyboard -- `->replyToMessage()` (optional) an instance of the original [`Message`](/webhooks/dto#message) that the current message is replying -- `->photos()` (optional) a collection of [`Photo`](/webhooks/dto#photo) holding data about the contained image resolutions -- `->animation()` (optional) an instance of [`Photo`](/webhooks/dto#animation) holding data about the contained animation -- `->audio()` (optional) an instance of [`Audio`](/webhooks/dto#audio) holding data about the contained audio -- `->document()` (optional) an instance of [`Document`](/webhooks/dto#document) holding data about the contained document -- `->video()` (optional) an instance of [`Video`](/webhooks/dto#video) holding data about the contained video -- `->location()` (optional) an instance of [`Location`](/webhooks/dto#location) holding data about the contained location -- `->contact()` (optional) an instance of [`Contact`](/webhooks/dto#contact) holding data about the contained contact data -- `->voice()` (optional) an instance of [`Voice`](/webhooks/dto#voice) holding data about the contained voical message -- `->newChatMembers()` a collection of [`User`](/webhooks/dto#user) holding the list of users that joined the group/supergroup -- `->leftChatMember()` (optional) an instance of [`User`](/webhooks/dto#user) holding data about the user that left the group/supergroup +- `->replyToMessage()` (optional) an instance of the original [`Message`](/features/dto#message) that the current message is replying +- `->photos()` (optional) a collection of [`Photo`](/features/dto#photo) holding data about the contained image resolutions +- `->animation()` (optional) an instance of [`Photo`](/features/dto#animation) holding data about the contained animation +- `->audio()` (optional) an instance of [`Audio`](/features/dto#audio) holding data about the contained audio +- `->document()` (optional) an instance of [`Document`](/features/dto#document) holding data about the contained document +- `->video()` (optional) an instance of [`Video`](/features/dto#video) holding data about the contained video +- `->location()` (optional) an instance of [`Location`](/features/dto#location) holding data about the contained location +- `->contact()` (optional) an instance of [`Contact`](/features/dto#contact) holding data about the contained contact data +- `->voice()` (optional) an instance of [`Voice`](/features/dto#voice) holding data about the contained voical message +- `->newChatMembers()` a collection of [`User`](/features/dto#user) holding the list of users that joined the group/supergroup +- `->leftChatMember()` (optional) an instance of [`User`](/features/dto#user) holding data about the user that left the group/supergroup - `->webAppData()` (optional) incoming data from sendData method of telegram WebApp @@ -50,8 +50,8 @@ contains incoming data (a message or a callback query) ## `CallbackQuery` - `->id()` incoming _callback_query_id_ -- `->from()` (optional) an instance of the [`User`](/webhooks/dto#user) that triggered the callback query -- `->message()` (optional) an instance of the [`Message`](/webhooks/dto#message) that triggered the callback query +- `->from()` (optional) an instance of the [`User`](/features/dto#user) that triggered the callback query +- `->message()` (optional) an instance of the [`Message`](/features/dto#message) that triggered the callback query - `->data()` an `Illuminate\Support\Collection` that holds the key/value pairs of the callback query data @@ -71,7 +71,7 @@ contains incoming data (a message or a callback query) - `->filename()` (optional) audio file name - `->mimeType()` (optional) audio MIME type - `->filesize()` (optional) audio file size in Bytes -- `->thumbnail()` (optional) an instance of the [`Photo`](/webhooks/dto#photo) that holds data about the thumbnail +- `->thumbnail()` (optional) an instance of the [`Photo`](/features/dto#photo) that holds data about the thumbnail ## `Animation` @@ -82,7 +82,7 @@ contains incoming data (a message or a callback query) - `->filename()` (optional) animation file name - `->mimeType()` (optional) animation MIME type - `->filesize()` (optional) animation file size in Bytes -- `->thumbnail()` (optional) an instance of the [`Photo`](/webhooks/dto#photo) that holds data about the thumbnail +- `->thumbnail()` (optional) an instance of the [`Photo`](/features/dto#photo) that holds data about the thumbnail ## `Document` @@ -90,7 +90,7 @@ contains incoming data (a message or a callback query) - `->filename()` (optional) document file name - `->mimeType()` (optional) document MIME type - `->filesize()` (optional) document file size in Bytes -- `->thumbnail()` (optional) an instance of the [`Photo`](/webhooks/dto#photo) that holds data about the thumbnail +- `->thumbnail()` (optional) an instance of the [`Photo`](/features/dto#photo) that holds data about the thumbnail ## `Photo` @@ -108,7 +108,7 @@ contains incoming data (a message or a callback query) - `->filename()` (optional) video file name - `->mimeType()` (optional) video MIME type - `->filesize()` (optional) video file size in Bytes -- `->thumbnail()` (optional) an instance of the [`Photo`](/webhooks/dto#photo) that holds data about the thumbnail +- `->thumbnail()` (optional) an instance of the [`Photo`](/features/dto#photo) that holds data about the thumbnail ## `Location` @@ -137,10 +137,10 @@ contains incoming data (a message or a callback query) - `->id()` inline query _id_ - `->query()` the query typed by the user after the bot's name -- `->from()` an instance of [`User`](/webhooks/dto#user) holding data about the user that started the query +- `->from()` an instance of [`User`](/features/dto#user) holding data about the user that started the query - `->offset()` offset of the results to be returned, can be controlled by the bot - `->chat_type()` type of the chat, from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat -- `->location()` (optional) an instance of [`Location`](/webhooks/dto#photo) containing sender location, only for bots that request user location. +- `->location()` (optional) an instance of [`Location`](/features/dto#photo) containing sender location, only for bots that request user location. ## `InlineQueryResultGif` diff --git a/docs/content/14.webhooks/4.webhook-request-types.md b/docs/content/14.webhooks/4.webhook-request-types.md index 0a6d37a2..4001bca8 100644 --- a/docs/content/14.webhooks/4.webhook-request-types.md +++ b/docs/content/14.webhooks/4.webhook-request-types.md @@ -77,7 +77,7 @@ class CustomWebhookHandler extends WebhookHandler } ``` -The full chat message data can be retrieved through the [`DefStudio\Telegraph\DTO\Message`](/webhooks/dto#message) DTO: +The full chat message data can be retrieved through the [`DefStudio\Telegraph\DTO\Message`](/features/dto#message) DTO: ```php class CustomWebhookHandler extends WebhookHandler @@ -141,7 +141,7 @@ class CustomWebhookHandler extends WebhookHandler } ``` -The full callback query data can be retrieved through the [`DefStudio\Telegraph\DTO\CallbackQuery`](/webhooks/dto#callback-query) DTO +The full callback query data can be retrieved through the [`DefStudio\Telegraph\DTO\CallbackQuery`](/features/dto#callback-query) DTO ```php class CustomWebhookHandler extends WebhookHandler @@ -159,7 +159,7 @@ class CustomWebhookHandler extends WebhookHandler ## Inline queries -Users can interact with a bot through inline queries calling it by typing its name followed by the query. The query is sent to the webhook (or can be [manually polled](/webhooks/manual-polling)) wrapped in a [`DefStudio\Telegraph\DTO\InlineQuery`](/webhooks/dto#inline-query). For more information see [inline bot page](https://core.telegram.org/bots/inline) and [the official api documentation](https://core.telegram.org/bots/api#inline-mode) +Users can interact with a bot through inline queries calling it by typing its name followed by the query. The query is sent to the webhook (or can be [manually polled](/webhooks/manual-polling)) wrapped in a [`DefStudio\Telegraph\DTO\InlineQuery`](/features/dto#inline-query). For more information see [inline bot page](https://core.telegram.org/bots/inline) and [the official api documentation](https://core.telegram.org/bots/api#inline-mode) Inline queries should be enabled inside bot configuration (see [here](https://core.telegram.org/bots/inline) for more info) @@ -189,18 +189,18 @@ class CustomWebhookHandler extends WebhookHandler Different kind of result can be sent through the handler: -- Article ([`DefStudio\Telegraph\DTO\InlineQueryResultArticle`](/webhooks/dto#inline-query-result-article)) -- Audio ([`DefStudio\Telegraph\DTO\InlineQueryResultAudio`](/webhooks/dto#inline-query-result-audio)) -- Contact ([`DefStudio\Telegraph\DTO\InlineQueryResultContact`](/webhooks/dto#inline-query-result-contact)) +- Article ([`DefStudio\Telegraph\DTO\InlineQueryResultArticle`](/features/dto#inline-query-result-article)) +- Audio ([`DefStudio\Telegraph\DTO\InlineQueryResultAudio`](/features/dto#inline-query-result-audio)) +- Contact ([`DefStudio\Telegraph\DTO\InlineQueryResultContact`](/features/dto#inline-query-result-contact)) - Game (coming soon) -- Document ([`DefStudio\Telegraph\DTO\InlineQueryResultDocument`](/webhooks/dto#inline-query-result-document)) -- Gif ([`DefStudio\Telegraph\DTO\InlineQueryResultGif`](/webhooks/dto#inline-query-result-gif)) -- Location ([`DefStudio\Telegraph\DTO\InlineQueryResultLocation`](/webhooks/dto#inline-query-result-location)) -- Mpeg4Gif ([`DefStudio\Telegraph\DTO\InlineQueryResultMpeg4Gif`](/webhooks/dto#inline-query-result-Mpeg4Gif)) -- Photo([`DefStudio\Telegraph\DTO\InlineQueryResultPhoto`](/webhooks/dto#inline-query-result-photo)) +- Document ([`DefStudio\Telegraph\DTO\InlineQueryResultDocument`](/features/dto#inline-query-result-document)) +- Gif ([`DefStudio\Telegraph\DTO\InlineQueryResultGif`](/features/dto#inline-query-result-gif)) +- Location ([`DefStudio\Telegraph\DTO\InlineQueryResultLocation`](/features/dto#inline-query-result-location)) +- Mpeg4Gif ([`DefStudio\Telegraph\DTO\InlineQueryResultMpeg4Gif`](/features/dto#inline-query-result-Mpeg4Gif)) +- Photo([`DefStudio\Telegraph\DTO\InlineQueryResultPhoto`](/features/dto#inline-query-result-photo)) - Venue (coming soon) -- Video ([`DefStudio\Telegraph\DTO\InlineQueryResultVideo`](/webhooks/dto#inline-query-result-video)) -- Voice ([`DefStudio\Telegraph\DTO\InlineQueryResultVoice`](/webhooks/dto#inline-query-result-voice)) +- Video ([`DefStudio\Telegraph\DTO\InlineQueryResultVideo`](/features/dto#inline-query-result-video)) +- Voice ([`DefStudio\Telegraph\DTO\InlineQueryResultVoice`](/features/dto#inline-query-result-voice)) ## Member activities diff --git a/docs/content/14.webhooks/8.manual-polling.md b/docs/content/14.webhooks/8.manual-polling.md index 5088f104..12e7f2bd 100644 --- a/docs/content/14.webhooks/8.manual-polling.md +++ b/docs/content/14.webhooks/8.manual-polling.md @@ -13,8 +13,8 @@ in order to get the updates, an `->updates()` method is available in the [Telegr $updates = $telegraphBot->updates(); ``` -the call will result in a collection of [`DefStudio\Telegraph\DTO\TelegramUpdate`](/webhooks/dto#telegram-update) instances, one for each update, sorted by the oldest one. +the call will result in a collection of [`DefStudio\Telegraph\DTO\TelegramUpdate`](/features/dto#telegram-update) instances, one for each update, sorted by the oldest one. It is advised to keep track of the `TelegramUpdate::id()` in order to avoid processing the same update multiple times. -The content of each update depends on the update type ([Chat Message](/webhooks/webhook-request-types#chat-messages) or [Callback Query](/webhooks/webhook-request-types#callback-queries)) and on the specific message type. Refer to the [DTO](/webhooks/dto) section for more details. +The content of each update depends on the update type ([Chat Message](/webhooks/webhook-request-types#chat-messages) or [Callback Query](/webhooks/webhook-request-types#callback-queries)) and on the specific message type. Refer to the [DTO](/features/dto) section for more details. diff --git a/docs/content/15.storage/1.entities_storage.md b/docs/content/15.storage/1.entities_storage.md index 58c6a19e..740e26ca 100644 --- a/docs/content/15.storage/1.entities_storage.md +++ b/docs/content/15.storage/1.entities_storage.md @@ -49,7 +49,7 @@ $lastMessage->forget('last_message') //stored data is deleted ### User DTO Storage -[User DTO](/webhooks/dto#user) data storage is available through its `->storage()` method +[User DTO](/features/dto#user) data storage is available through its `->storage()` method ```php /** @var \App\Models\User $user */