Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/labi-le/vk-data-fetcher

Data fetcher for bots vkontakte
https://github.com/labi-le/vk-data-fetcher

astaroth-package data-fetcher vk-api-schema vk-callback-api vk-longpoll

Last synced: about 1 month ago
JSON representation

Data fetcher for bots vkontakte

Awesome Lists containing this project

README

        

# vk-data-fetcher

[![GitHub license](https://img.shields.io/badge/license-BSD-green.svg)](https://github.com/labi-le/vk-data-fetcher/blob/main/LICENSE)
[![Packagist Stars](https://img.shields.io/packagist/stars/labile/vk-data-fetcher)](https://packagist.org/packages/labile/vk-data-fetcher/stats)
[![Packagist Stats](https://img.shields.io/packagist/dt/labile/vk-data-fetcher)](https://packagist.org/packages/labile/vk-data-fetcher/stats)

[Документация на русском языке](https://github.com/labi-le/vk-data-fetcher/blob/main/README_RU.md)

## Installation

`composer require labile/vk-data-fetcher`

### Data fetcher for bots vkontakte

```php
getRawData();
//$raw_data->...

if ($data->getType() === "message_new"){
$message_new = $data->messageNew();

$message_new->getText();
$message_new->getAttachments();
$message_new->getFromId();
$message_new->getPayload();
//...
}

if ($data->getType() === "message_event"){
$message_event = $data->messageEvent();

$message_event->getConversationMessageId();
$message_event->getPeerId();
$message_event->getEventId();
$message_event->getChatId();
//...
}

```