2017 © Pedro Peláez
 

library ttg-sdk

TTG SDK

image

torchlighttechnology/ttg-sdk

TTG SDK

  • Tuesday, June 5, 2018
  • by _waffles
  • Repository
  • 3 Watchers
  • 0 Stars
  • 1,278 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 76 % Grown

The README.md

ttg-sdk

A PHP library to interact with TTG's APIs, (*1)

Install with composer, (*2)

composer require torchlighttechnology/ttg-sdk:"~1.0"

Usage in your project, (*3)

use torchlighttechnology\TtgSDK;

$api = new TtgSDK(
  'URL', // required
  'USERNAME', // optional
  'PASSWORD' // optional
);

$args = [
  'foo' => 'bar'
];

// your API method must be a dashed route
// calling it here needs to be camelcased
$response = $api->yourExposedApiMethod( // translates to your-exposed-api-method
  json_encode($args), // JSON encoded array
  'POST' // request type of GET, POST, PUT, DELETE
);

Example

Create a new event on delayed events

use torchlighttechnology\TtgSDK;

$api = new TtgSDK(
  'http://delayedevents/delayed-events/'
);

// Add custom headers
$api->setHeaders( ['x-api-key: abc1234'] );

$args = [
  $callback_uri,
  $parameters,
  $fire_date
];
$response = $api->create(
  json_encode($args),
  'POST'
);

The Versions

05/06 2018

dev-master

9999999-dev

TTG SDK

  Sources   Download

The Development Requires

05/06 2018

v1.5

1.5.0.0

TTG SDK

  Sources   Download

The Development Requires

05/06 2018

dev-dev

dev-dev

TTG SDK

  Sources   Download

The Development Requires

31/05 2018

v1.4

1.4.0.0

TTG SDK

  Sources   Download

The Development Requires

26/02 2018

v1.3

1.3.0.0

TTG SDK

  Sources   Download

12/01 2018

v1.2

1.2.0.0

TTG SDK

  Sources   Download

10/01 2018

v1.1

1.1.0.0

TTG SDK

  Sources   Download

10/01 2018

v1.0

1.0.0.0

TTG SDK

  Sources   Download