siapepfrance/free-mobile-sms-php-client

0.1.0 2021-10-28 15:47 UTC

This package is auto-updated.

Last update: 2024-09-28 22:26:59 UTC


README

这是为Free Mobile REST API 1生成的Swagger文档。您可以在以下位置找到更多文档:[在线文档](https://github.com/siapepfrance/free-mobile-sms-php-client/blob/HEAD//doc)。

此PHP包由Swagger Codegen项目自动生成。[Swagger Codegen](https://github.com/swagger-api/swagger-codegen) 项目。

  • API版本:1.0.0
  • 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen

要求

PHP 5.5及更高版本

安装与使用

Composer

要通过Composer安装绑定,请执行以下命令:

composer require siapepfrance/free-mobile-sms-php-client

然后运行composer install

手动安装

下载文件并包含autoload.php

    require_once('/path/to/free-mobile-sms-php-client/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

请按照安装和用法说明进行操作,然后运行以下命令:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new \SiapepFrance\FreeMobile\Sms\Api\SmsApi(
    // 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()
);
$user = "user_example"; // string | User of free mobile account
$pass = "pass_example"; // string | Password of free mobile account
$msg = "msg_example"; // string | Message to send (max length 999 caracters, above it will trigger 400 error)

try {
    $apiInstance->sendmsgPost($user, $pass, $msg);
} catch (Exception $e) {
    echo 'Exception when calling SmsApi->sendmsgPost: ', $e->getMessage(), PHP_EOL;
}
?>

API端点文档

所有URI均相对于https://smsapi.free-mobile.fr/

模型文档

授权文档

所有端点都不需要授权。

作者

security@free.fr