2017 © Pedro Peláez
 

library php-afanasy-client

A PHP rewrite of the Afanasy python client

image

abuisine/php-afanasy-client

A PHP rewrite of the Afanasy python client

  • Tuesday, May 30, 2017
  • by abuisine
  • Repository
  • 1 Watchers
  • 0 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Introduction

This is an implementation of a client for the Afanasy server. It's based on the python client, but even if it's goal is to provide the same features, some of them are missing other are specific to this package and even if the overall architecture looks similar, there is a few differences. So don't expect this to provide a 1:1 reproduction of the python client., (*1)

Here is the API's official documentation., (*2)

How to

First, you need to install the library, you can use composer: composer require abuisine/php-afanasy-client., (*3)

Then, the usage is quite straightforward. Create a Network object with your server's adress and port., (*4)

use Afanasy\Network;

$afnetwork = new Network('localhost', 51000);

You will then be able to interact with the server from this object. Here are a few examples., (*5)

use Afanasy\Job;
use Afanasy\Block;
use Afanasy\Task;

// Get all jobs
$jobs = $afnetwork->getAllJobs();

// Pause jobs
$jobIds = array_column($jobs['jobs'], 'job_id');
$afnetwork->pauseJobs($jobIds);

// Send a new Job
$job = new Job("Foo");
$block = new Block("Bar");
$task = new Task("FooBar");
$job->addBlock($block);
$block->addTask($task);
$task->setCommand('echo "Hello, World!"');

$afnetwork->sendJob($job);

The Versions

30/05 2017

dev-master

9999999-dev https://github.com/abuisine/php-afanasy-client

A PHP rewrite of the Afanasy python client

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6

 

by Alexandre Buisine

30/05 2017

1.3.2

1.3.2.0 https://github.com/abuisine/php-afanasy-client

A PHP rewrite of the Afanasy python client

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6

 

by Alexandre Buisine

30/05 2017

1.3.1

1.3.1.0 https://github.com/abuisine/php-afanasy-client

A PHP rewrite of the Afanasy python client

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6

 

by Alexandre Buisine

30/05 2017

1.3.0

1.3.0.0 https://github.com/abuisine/php-afanasy-client

A PHP rewrite of the Afanasy python client

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6

 

by Alexandre Buisine

05/04 2017

1.2.1

1.2.1.0 https://github.com/abuisine/php-afanasy-client

A PHP rewrite of the Afanasy python client

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6

 

by Alexandre Buisine

04/04 2017

1.2.0

1.2.0.0 https://github.com/abuisine/php-afanasy-client

A PHP rewrite of the Afanasy python client

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6

 

by Alexandre Buisine

04/04 2017

1.1.0

1.1.0.0 https://github.com/abuisine/php-afanasy-client

A PHP rewrite of the Afanasy python client

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6

 

by Alexandre Buisine

03/04 2017

1.0.0

1.0.0.0 https://github.com/abuisine/php-afanasy-client

A PHP rewrite of the Afanasy python client

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6

 

by Alexandre Buisine

03/04 2017

0.99.0

0.99.0.0 https://github.com/abuisine/php-afanasy-client

A PHP rewrite of the Afanasy python client

  Sources   Download

GPL-3.0

The Requires

  • php >=5.6

 

by Alexandre Buisine