gn-office/directcloud-api
最新稳定版本:v1.6.4
Composer 安装命令:
composer require gn-office/directcloud-api
包简介
A minimal implementation of DirectCloud API
README 文档
README
This is a minimal PHP implementation of the DirectCloud API. It contains only the methods needed for our flysystem-directcloud adapter. We are open however to PRs that add extra methods to the client.
Installation
You can install the package via composer:
composer require gn-office/directcloud-api
Usage
The first thing you need to do is to get an authorization information at DirectCloud. You'll find more info at DirectCloud API Documentation.
use GNOffice\DirectCloud\Client; $client = new Client([$service, $service_key, $code, $id, $password]); // or $client = new Client([$service, $service_key, $access_key]); // or $client = new Client($access_token); //create a folder $client->createFolder($node, $name); //list a folder $client->getList($node);
Endpoints
Look in the source code of GNOffice\DirectCloud\Client to discover the methods you can use.
If you do not find your favorite method, you can directly use the v1Request and v2Request functions.
public function v1Request(string $method, string $endpoint, string $requestOption = null, $parameters = []) public function v2Request(string $method, string $endpoint, string $requestOption, $parameters = [], $extraHeaders = [])
Here's an example:
$client->v1Request('/openapp/v1/files/search/'.{$node}, ['keyword' => 'something', 'sort' => '+datetime', 'limit' => 100]);
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 92
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-14