weeek/weeek-client-php
最新稳定版本:v1.0.0
Composer 安装命令:
composer require weeek/weeek-client-php
包简介
Weeek PHP Library
README 文档
README
Weeek is a multi-service platform that helps you make work more productive.
This package implements API that you can learn more about at developers.weeek.net
Installation
This package can be installed through Composer.
composer require weeek/weeek-client-php
You will also need to install packages that "provide"
psr/http-client-implementation
and psr/http-factory-implementation.
More info at php-http.org.
For example, you can use Guzzle
composer guzzlehttp/guzzle http-interop/http-factory-guzzle:^1.0
Getting started
<?php require_once __DIR__ . '/vendor/autoload.php'; use Weeek\Client; $accessToken = "<your-access-token>"; $client = new Client($accessToken);
Examples
Get workspace info
# Get workspace info $response = $client->workspace->info(); $workspaceInfo = $response->info; # Get workspace members $response = $client->workspace->members(); $workspaceMembers = $response->members;
Work with tasks
# Create a task $response = $client->taskManager->tasks->create(['title' => 'My task']); $createdTask = $response->task; # Delete the task $client->taskManager->tasks->destroy($createdTask->id);
Work with deals
$statusId = '<funnel-status-id>'; # Create a deal $response = $client->crm->deals->create($statusId, [ 'title' => 'My deal', 'amount' => 100.01 ]); $createdDeal = $response->deal; # Create a subtask $response = $client->crm->deals->createSubtask($createdDeal->id, ['title' => 'Deal subtask']); $createdSubtask = $response->task;
统计信息
- 总下载量: 384
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-21