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: 2024-09-24 14:51:45 UTC
README
未提供描述(由Swagger Codegen生成 https://github.com/swagger-api/swagger-codegen)
此PHP软件包是由Swagger Codegen项目自动生成的
- API版本:1.0.0
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
要求
PHP 5.5 及以上版本
安装与使用
Composer
要通过Composer安装绑定,请将以下内容添加到composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请按照安装过程进行操作,然后运行以下命令
<?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; } ?>
API端点文档
所有URI相对于https://wappi.pro
模型文档
- 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
授权文档
api_key
- 类型:API密钥
- API密钥参数名:Authorization
- 位置:HTTP头