2017 © Pedro Peláez
 

library syrup-php-client

Keboola Syrup PHP Client

image

keboola/syrup-php-client

Keboola Syrup PHP Client

  • Tuesday, May 22, 2018
  • by kachnitel
  • Repository
  • 8 Watchers
  • 0 Stars
  • 4,564 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 21 Versions
  • 2 % Grown

The README.md

Syrup PHP Client

Simple PHP wrapper library for Syrup async calls., (*1)

Installation

Library is available as composer package. To start using composer in your project follow these steps:, (*2)

Install composer, (*3)

curl -s http://getcomposer.org/installer | php
mv ./composer.phar ~/bin/composer # or /usr/local/bin/composer

Create composer.json file in your project root folder:, (*4)

{
    "require": {
        "php" : ">=5.4.0",
        "keboola/syrup-php-client": "2.0.*"
    }
}

Install package:, (*5)

composer install

Add autoloader in your bootstrap script:, (*6)

require 'vendor/autoload.php';

Read more in Composer documentation, (*7)

Usage examples

Create and run a job, (*8)

require 'vendor/autoload.php';

use Keboola\Syrup\Client,

$client = new Client([
  'token' => 'YOUR_TOKEN',
  'runId' => 'CURRENT_RUNID'
]);

$response = $client->runJob("test-component", array("config" => 1));

Encrypt component and project specific string for a Docker component (calls docker/test-component/configs/encrypt), (*9)

require 'vendor/autoload.php';

use Keboola\Syrup\Client,

$client = new Client([
  'token' => 'YOUR_TOKEN',
  'runId' => 'CURRENT_RUNID',
  'super' => 'docker'
]);

$response = $client->encryptString("test-component", "string", ["path" => "configs"]);

Create a custom job on a component (calls POST provisioning/async/docker) with {"type" => "rstudio"} body, (*10)

require 'vendor/autoload.php';

use Keboola\Syrup\Client,

$client = new Client([
  'token' => 'YOUR_TOKEN',
  'runId' => 'CURRENT_RUNID',
  'super' => 'provisioning'
]);

$response = $client->runAsyncAction("async/docker", "POST", ["body" => ["type" => "rstudio"]]);

Create a custom DELETE job on a component (calls DELETE provisioning/async/docker/1), (*11)

require 'vendor/autoload.php';

use Keboola\Syrup\Client,

$client = new Client([
  'token' => 'YOUR_TOKEN',
  'runId' => 'CURRENT_RUNID',
  'super' => 'provisioning'
]);

$response = $client->runAsyncAction("async/docker/1", "DELETE");

License

MIT licensed, see LICENSE file., (*12)

The Versions

22/05 2018

dev-master

9999999-dev

Keboola Syrup PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Keboola

22/05 2018

5.1.0

5.1.0.0

Keboola Syrup PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Keboola

22/05 2018

dev-martin-sync-action-run

dev-martin-sync-action-run

Keboola Syrup PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Keboola

20/01 2018

5.0.0

5.0.0.0

Keboola Syrup PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Keboola

13/10 2016
13/10 2016
13/10 2016
30/05 2016
30/05 2016
18/04 2016

dev-joburl

dev-joburl

Keboola Syrup PHP Client

  Sources   Download

The Requires

 

The Development Requires

05/01 2016
11/02 2015

0.1.0

0.1.0.0

Keboola Syrup PHP Client

  Sources   Download

The Requires

 

The Development Requires