intelworx/tripican-api-client-php

该包最新版本(dev-master)没有可用的许可证信息。

Tripican.com API 的客户端

dev-master 2015-12-15 17:12 UTC

This package is auto-updated.

Last update: 2024-09-19 09:25:46 UTC


README

这是 tripican.com API(V1)的 PHP 客户端实现。

如何获取 API 密钥

请发送邮件至 bizdev@[at]tripican[dot]com,描述您的使用情况,您的邮件将被审核,并将通知您。

客户端使用

#!php

require_once '/path/to/TripicanV1Client.php';

use intelworx\tripican\apiclient\TripicanV1Client;

$config = array(
    'api_consumer_key' => '---SOME-CONSUMER-KEY---',
    'api_consumer_secret' => '----SOME-SECRET-----',
    'api_host' => 'tripican.com', //or beta20.tripican.com
);


$apiClient = new TripicanV1Client();

//if you wish to debug responses.
$apiClient->debug(true);

//sample call
//short hand method transforms serviceResourceName to service/resource-name
//it knows resources that are expected to be called with POST,
//however to be safe, you may want to use the full call method for post
//e.g. $apiClient->post($path, $params);
$result = $apiClient->moviesShowtimes();
var_dump($result);