承接 abuisine/php-afanasy-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

abuisine/php-afanasy-client

Composer 安装命令:

composer require abuisine/php-afanasy-client

包简介

A PHP rewrite of the Afanasy python client

README 文档

README

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.

Here is the API's official documentation.

How to

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

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

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.

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);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2017-04-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固