cloudmersive/cloudmersive_spam_api_client
最新稳定版本:3.1.2
Composer 安装命令:
composer require cloudmersive/cloudmersive_spam_api_client
包简介
README 文档
README
Easily and directly scan and block spam security threats in input.
Cloudmersive Barcode API provides advanced spam detection capabilities.
- API version: v1
- Package version: 3.1.2
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/cloudmersive/cloudmersive_spam_api_client.git"
}
],
"require": {
"cloudmersive/cloudmersive_spam_api_client": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
require_once('/path/to/cloudmersive_spam_api_client/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: Apikey $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer'); $apiInstance = new Swagger\Client\Api\SpamDetectionApi( // 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 ); $model = "Advanced"; // string | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. $preprocessing = "Auto"; // string | Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto. $allow_phishing = false; // bool | True if phishing should be allowed, false otherwise $allow_unsolicited_sales = false; // bool | True if unsolicited sales should be allowed, false otherwise $allow_promotional_content = true; // bool | True if promotional content should be allowed, false otherwise $custom_policy_id = "custom_policy_id_example"; // string | Apply a Custom Policy for Spam Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud $input_file = "/path/to/file.txt"; // \SplFileObject | try { $result = $apiInstance->spamDetectFileAdvancedPost($model, $preprocessing, $allow_phishing, $allow_unsolicited_sales, $allow_promotional_content, $custom_policy_id, $input_file); print_r($result); } catch (Exception $e) { echo 'Exception when calling SpamDetectionApi->spamDetectFileAdvancedPost: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://api.cloudmersive.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| SpamDetectionApi | spamDetectFileAdvancedPost | POST /spam/detect/file/advanced | Perform advanced AI spam detection and classification against input text file. |
| SpamDetectionApi | spamDetectFilePost | POST /spam/detect/file | Perform AI spam detection and classification on an input image or document (PDF or DOCX) |
| SpamDetectionApi | spamDetectFormSubmissionAdvancedPost | POST /spam/detect/form-submission/advanced | Perform advanced AI spam detection and classification against a form submission |
| SpamDetectionApi | spamDetectTextStringAdvancedPost | POST /spam/detect/text-string/advanced | Perform advanced AI spam detection and classification against input text string |
| SpamDetectionApi | spamDetectTextStringPost | POST /spam/detect/text-string | Perform AI spam detection and classification against input text string |
Documentation For Models
- SpamDetectionAdvancedFormField
- SpamDetectionAdvancedFormSubmissionRequest
- SpamDetectionAdvancedRequest
- SpamDetectionAdvancedResponse
- SpamDetectionFormSubmissionAdvancedResponse
- SpamDetectionRequest
- SpamDetectionResponse
Documentation For Authorization
Apikey
- Type: API key
- API key parameter name: Apikey
- Location: HTTP header
Author
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2025-07-13