sashasunsh1ne / wappi-php-sdk
dev-master
2024-05-24 14:14 UTC
Requires
- php: >=8.2.3
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- ext-simplexml: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.57.2
- phpunit/phpunit: ^10.3
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2025-04-24 16:01:07 UTC
README
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: api_key $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\ChatApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $profile_id = "profile_id_example"; // string | Profile ID $chat_id = "chat_id_example"; // string | Chat ID - ID чата из списка сообщений. *Примеры:* **13475634251@c.us** для личных сообщений и **13475634251-1567456345@g.us** для группы. try { $result = $apiInstance->apiSyncChatDeletePost($profile_id, $chat_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling ChatApi->apiSyncChatDeletePost: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: api_key $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\ChatApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $profile_id = "profile_id_example"; // string | Profile ID $chat_id = "chat_id_example"; // string | Chat ID - ID чата из списка сообщений. *Примеры:* **13475634251@c.us** для личных сообщений и **13475634251-1567456345@g.us** для группы. try { $result = $apiInstance->apiSyncChatSeenSendPost($profile_id, $chat_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling ChatApi->apiSyncChatSeenSendPost: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: api_key $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Swagger\Client\Api\ChatApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $profile_id = "profile_id_example"; // string | Profile ID try { $result = $apiInstance->apiSyncChatsGetGet($profile_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling ChatApi->apiSyncChatsGetGet: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://wappi.pro
Class | Method | HTTP request | Description |
---|---|---|---|
ChatApi | apiSyncChatDeletePost | POST /api/sync/chat/delete | Удалить чат |
ChatApi | apiSyncChatSeenSendPost | POST /api/sync/chat/seen/send | Отметить сообщения прочитанными в чате |
ChatApi | apiSyncChatsGetGet | GET /api/sync/chats/get | Получить список чатов |
ContactsApi | apiSyncContactBlockPost | POST /api/sync/contact/block | Заблокировать контакт |
ContactsApi | apiSyncContactGetGet | GET /api/sync/contact/get | Получить информацию о контакте |
ContactsApi | apiSyncContactRegisteredCheckPost | POST /api/sync/contact/registered/check | Проверка зарегестрирован ли контакт |
ContactsApi | apiSyncContactUnblockPost | POST /api/sync/contact/unblock | Разблокировать контакт |
ContactsApi | apiSyncContactsGetGet | GET /api/sync/contacts/get | Получить список контактов |
GetQRCodeApi | apiSyncQrGetGet | GET /api/sync/qr/get | Получить QR код из WhatsApp для авторизации |
GroupsApi | apiSyncGroupAdminDemotePost | POST /api/sync/group/admin/demote | Убрать права администратора группы для контакта |
GroupsApi | apiSyncGroupAdminPromovePost | POST /api/sync/group/admin/promove | Добавить права администратора группы контакту |
GroupsApi | apiSyncGroupAdminsGetGet | GET /api/sync/group/admins/get | Получить список администраторов из группы |
GroupsApi | apiSyncGroupCreatePost | POST /api/sync/group/create | Создать новую группу |
GroupsApi | apiSyncGroupLeavePost | POST /api/sync/group/leave | Покинуть группу |
GroupsApi | apiSyncGroupParticipantAddPost | POST /api/sync/group/participant/add | Добавить контакт в группу |
GroupsApi | apiSyncGroupParticipantRemovePost | POST /api/sync/group/participant/remove | Удалить контакт из группы |
GroupsApi | apiSyncGroupParticipantsGetGet | GET /api/sync/group/participants/get | Получить контакты из группы |
MessagesApi | apiSyncMessageDeletePost | POST /api/sync/message/delete | Удалить сообщение |
MessagesApi | apiSyncMessageFileSendPost | POST /api/sync/message/file/send | Отправить файл |
MessagesApi | apiSyncMessageReplyPost | POST /api/sync/message/reply | Ответить на сообщение |
MessagesApi | apiSyncMessageSendPost | POST /api/sync/message/send | Отправить сообщение |
MessagesApi | apiSyncMessagesGetGet | GET /api/sync/messages/get | Получить сообщения |
MessagesApi | apiSyncMessagesUnreadGetGet | GET /api/sync/messages/unread/get | Получить непрочитанные сообщения |
TasksApi | apiTasksClearPendingPost | POST /api/tasks/clear/pending | Удалить из очереди ожидающие выполнения асинхронные задачи |
TasksApi | apiTasksGetGet | GET /api/tasks/get | Получить список асинхронных задач |
UseHereApi | apiSyncUseHerePost | POST /api/sync/use/here | Принудительное использование браузера у нас, если залогинен в другом браузере |
WebhookApi | apiWebhookUrlDeletePost | POST /api/webhook/url/delete | Удалить ссылку на webhook |
WebhookApi | apiWebhookUrlGetGet | GET /api/webhook/url/get | Получить ссылку на webhook |
WebhookApi | apiWebhookUrlSetPost | POST /api/webhook/url/set | Установить ссылку на webhook для уведомлений |
WhatsAppStatusApi | apiAsyncGetStatusGet | GET /api/async/get/status | WhatsApp проверить статус |
Documentation For Models
- FileSendBody
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20011
- InlineResponse20012
- InlineResponse20013
- InlineResponse20013Contacts
- InlineResponse20014
- InlineResponse20015
- InlineResponse20016
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2004Contacts
- InlineResponse2005
- InlineResponse2006
- InlineResponse2006Chats
- InlineResponse2007
- InlineResponse2007Chats
- InlineResponse2007Sender
- InlineResponse2008
- InlineResponse2008Chats
- InlineResponse2008UnreadMessages
- InlineResponse2009
- InlineResponse201
- InlineResponse405
- InlineResponse4051
- InlineResponse406
- InlineResponse4061
- InlineResponse4062
- InlineResponse4063
- InlineResponse4064
- InlineResponse407
- InlineResponse408
- InlineResponse4081
- InlineResponse409
- InlineResponse4091
Documentation For Authorization
api_key
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header