ticketpark/php-api-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ticketpark/php-api-client

最新稳定版本:2.1

Composer 安装命令:

composer require ticketpark/php-api-client

包简介

A PHP client to use the Ticketpark API

README 文档

README

Build Status

A PHP client to consume the Ticketpark REST API.

Installation

Add this library to your composer.json:

composer require ticketpark/php-api-client

Usage

Also see example.php.

Getting data (GET)

<?php

include('vendor/autoload.php');

$client = new \Ticketpark\ApiClient\TicketparkApiClient('yourApiKey', 'yourApiSecret');
$client->setUserCredentials('your@username.com', 'yourPassword');

$response = $client->get('/events/', ['maxResults' => 2]);

if ($response->isSuccessful()) {
    $data = $response->getContent();
}

Creating data (POST)

<?php

include('vendor/autoload.php');

$client = new \Ticketpark\ApiClient\TicketparkApiClient('yourApiKey', 'yourApiSecret');
$client->setUserCredentials('your@username.com', 'yourPassword');

$response = $client->post('/events/', [
    'host' => 'yourHostPid',
    'name' => 'Some great event',
    'currency' => 'CHF'
]);

if ($response->isSuccessful()) {
    $pidOfNewEvent = $response->getGeneratedPid();
    
    // if you created a collection of records, the response will contain a link instead
    // that can be used to fetch the data of the newly generated records.
    //
    // $path = $response->getGeneratedListLink();
    // $newResponse = $client->get($path);
}

Updating data (PATCH)

<?php

include('vendor/autoload.php');

$client = new \Ticketpark\ApiClient\TicketparkApiClient('yourApiKey', 'yourApiSecret');
$client->setUserCredentials('your@username.com', 'yourPassword');

$response = $client->patch('/events/yourEventPid', [
    'name' => 'Some changed event name'
]

if ($response->isSuccessful()) {
    // Data was successfully updated
}

API credentials

Get in touch to get your API credentials:
support@ticketpark.ch

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固