sashasunsh1ne/wappi-php-sdk

dev-master 2024-05-24 14:14 UTC

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

模型文档

授权文档

api_key

  • 类型:API密钥
  • API密钥参数名:Authorization
  • 位置:HTTP头

作者