carltonsoftware/tabs2-php-client

此包已被废弃,不再维护。未建议替代包。

tabs2 PHP 客户端

0.0.31 2019-05-22 10:09 UTC

README

入门指南

要开始使用此项目,您需要通过 composer 安装客户端。

通过 composer 安装

  1. 在您想要安装项目的位置创建一个 composer.json 文件

  2. 添加以下内容

    {
        "repositories": [{
            "type": "vcs",
            "url": "git@github.com:carltonsoftware/tabs2-php-client.git"
        }],
        "require": {
            "carltonsoftware/tabs2-php-client": "dev-master"
        }
    }
  3. 下载 composer 并安装仓库

    curl -sS https://getcomposer.org/installer | php
    ./composer.phar install
    
  4. 在您的目录中创建一个新的 php 文件,并插入以下代码。运行文件时应看到输出属性!

    <?php
    
    require_once __DIR__ . '/vendor/autoload.php';
    
    \tabs\apiclient\client\Client::factory(
        'https://apiurl/v2/', // Api Url: this will be provided to you.
                              // NOTE: This url should end in '/v2/'
        'abc', // Api username: this will be provided to you
        'def', // Api password: this will be provided to you
        '14_hij', // Api client key: this will be provided to you
        'klm'  // Api client secret: this will be provided to you
    );
    
    $prop = new \tabs\apiclient\Property(1);
    $prop->get();
    
    echo $prop->getName();