承接 digitickets/digitickets-php-api-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

digitickets/digitickets-php-api-client

最新稳定版本:1.0.9

Composer 安装命令:

composer require digitickets/digitickets-php-api-client

包简介

Provides access to the DigiTickets API.

README 文档

README

Provides access to the DigiTickets API. At present this is a fairly basic HTTP client. Eventually this will be fleshed out and have methods for all the endpoints available in the API along with the possible parameters.

Installation

composer require digitickets/digitickets-php-api-client

Usage

<?php

require __DIR__.'/vendor/autoload.php';

use DigiTicketsApiClient\ApiClient;

$apiClient = new ApiClient();
$apiClient->setApiKey('your_key_here');

$response = $apiClient->get('branches'); // Returns a PSR ResponseInterface.

// You can get an array of data from the response object with this method:
$branches = $apiClient->parseResponse($response);

print_r($branches);
// Returns:
// Array
// (
//     [0] => Array
//         (
//             [branchID] => 11
//             [name] => DigiTickets Demo Branch

Testing

To run tests:

phpunit tests

Some of these tests require an API Key to access the API. You can also specify a different API to make requests to when testing. Both of these go into a .env file in the root of this repository. Make a copy of .env.example to see what this file should contain.

cp .env.example .env

Note: Don't use the API key of a live company (or a test company you care about) for these tests, as the tests will create and delete data.

统计信息

  • 总下载量: 31.07k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-12