revenuewire/email-sdk-php

v1.3 2017-04-19 20:52 UTC

This package is auto-updated.

Last update: 2024-09-12 05:28:33 UTC


README

电子邮件服务

此PHP包由Swagger Codegen项目自动生成,[点击访问项目](https://github.com/swagger-api/swagger-codegen)(外部链接)

  • API版本:1.0.0
  • 构建包:io.swagger.codegen.languages.PhpClientCodegen

要求

PHP 5.4.0及以后版本

安装与使用

Composer

要通过Composer安装绑定,请将以下内容添加到composer.json

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/revenuewire/email-sdk-php.git"
    }
  ],
  "require": {
    "revenuewire/email-sdk-php": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

    require_once('/path/to/SwaggerClient-php/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

请遵循安装和用法,然后运行以下命令

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

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Configure API key authorization: JWTHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Authorization-JWT', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Authorization-JWT', 'Bearer');

$api_instance = new Swagger\Client\Api\EmailsApi();

try {
    $result = $api_instance->getEmailTypes();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EmailsApi->getEmailTypes: ', $e->getMessage(), PHP_EOL;
}

?>

API端点文档

所有URI相对于https:///v1

模型文档

授权文档

APIKeyHeader

  • 类型:API密钥
  • API密钥参数名:X-API-KEY
  • 位置:HTTP头

JWTHeader

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

作者