mhd-jalilvand / mediana-php
Mediana sms api 文档 </br> 一些编程语言的 SDK 存放在我们的 GitHub 上:https://github.com/ippanelippanel </br> API 密钥格式:<code>Authorization: "AccessKey your-api-key"</code> # 认证 <!-- ReDoc-Inject: <security-definitions> -->
1.0.4
2023-10-09 06:38 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-09-09 08:35:25 UTC
README
Mediana sms api 文档
一些编程语言的 SDK 存放在我们的 GitHub 上:https://github.com/ippanelippanel
API 密钥格式:Authorization: "AccessKey your-api-key"
认证
安装和用法
要求
PHP 7.4 及更高版本。应也能与 PHP 8.0 一起使用。
Composer
要通过 Composer 安装绑定,请将以下内容添加到 composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/mhd-jalilvand/Mediana-php.git" } ], "require": { "mhd-jalilvand/Mediana-php": "*@dev" } }
然后运行 composer install
手动安装
下载文件并包含 autoload.php
<?php require_once('/path/to/Mediana-php/vendor/autoload.php');
入门指南
请按照 安装过程 操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: ApiKeyAuth $config = Mediana\Sdk\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Mediana\Sdk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Mediana\Sdk\Api\MedianaApi( // 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 ); $pattern_to_create = new \Mediana\Sdk\Model\PatternToCreate(); // \Mediana\Sdk\Model\PatternToCreate | parameters try { $result = $apiInstance->createPattern($pattern_to_create); print_r($result); } catch (Exception $e) { echo 'Exception when calling MedianaApi->createPattern: ', $e->getMessage(), PHP_EOL; }
API 端点
所有 URI 都相对于 http://rest.ippanel.com
模型
- CreatePatternResponse
- CreatePatternResponseAllOfData
- CreditResponse
- CreditResponseAllOfData
- ErrorResponse
- GenericResponse
- InboxMessage
- InboxResponse
- InboxResponseAllOfData
- Message
- MessageResponse
- MessageResponseAllOfData
- MessageToSend
- Meta
- Pattern
- PatternToCreate
- PatternToSend
- Recipient
- RecipientResponse
- RecipientResponseAllOfData
- SmsResponse
- SmsResponseAllOfData
- User
- UserResponse
- UserResponseAllOfData
- UserResponseData
- UserResponseDataData
授权
API 定义的认证方案
ApiKeyAuth
- 类型:API 密钥
- API 密钥参数名称:Authorization
- 位置:HTTP 头
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
关于此包
此 PHP 包由 Mediana 团队 项目自动生成
- API 版本:
1.0.1
- 包版本:
1.0.4
- 包版本: