alorel/dropbox-v2-php
最新稳定版本:0.4.2
Composer 安装命令:
composer require alorel/dropbox-v2-php
包简介
A PHP SDK for Dropbox's v2 API
README 文档
README
Tested with PHP 5.6-7.1 and HHVM 3.18. See the CI builds page for the most accurate, up-to-date version list.
Maintainer(s) needed!
[10 Feb 2017] Unfortunately, I do not have time to maintain this SDK. I do not expect it to become out-of-date in terms of functionality for at least another year, but it won't be adding any new functionality. Please open an issue if you're interested.
A PHP SDK for Dropbox's v2 API. If you haven't tried Dropbox out yet, do - it's great!
Table of Contents
Installation
Installation is only available via Composer.
Quick version:
composer require alorel/dropbox-v2-php
More informed version:
The package is still in its 0.x development stage, therefore adding it as a ^ dependency, e.g. "alorel/dropbox-v2-php":"^0.1" will severely limit the amount of updates you receive, as, per semver specification, 0.2 is allowed to be backwards-incompatible with 0.1. While I definitely cannot guarantee full backwards compatibility if you fiddle with protected methods and derive your own subclasses, I do guarantee that the public API will remain backwards-compatible, therefore, if you only use the raw methods in your application e.g.
$options = new UploadOptions(); //set your options (new Upload())->raw('/file.txt', 'data', $options);
You can safely add the following as a dependency in your composer.json:
{
"require": {
"alorel/dropbox-v2-php": ">=0.4 <1.0"
}
}
Additionally, composer outdated is a useful command to know during the 0.x development stage!
Usage
Every Dropbox API operation is located in the \Alorel\Dropbox\Operation namespace and is a class named after the API endpoint. There are a few exceptions to this, however, e.g. the class for https://content.dropboxapi.com/2/files/upload_session/start is \Alorel\Dropbox\Operation\Files\UploadSession\Start.
All operation classes inherit the AbstractOperation constructor:
/** * Operation constructor. * * @param bool $async Whether requests should be asynchronous * @param string $accessToken Our access token */ public function __construct($async = null, string $accessToken = null) {}
The first parameter is a boolean determining whether operations should run synchronously or asynchronously (defaults to synchronous), the second is the access token created when the user authorises your application. Both can have default values set via AbstractOperation::setDefaultToken() and AbstractOperation::setDefaultAsync() respectively.
Currently the only supported way of making requests is with the respective operation class' raw method, which will return an instance of PromiseInterface when operating in asynchronous mode or an instance of ResponseInterface if operating in synchronous mode. See guzzlephp.org for more information on promises and responses.
In future releases I will be adding 'management' classes that will automatically format the response.
Supported API Operations
Unless specified otherwise, any operation that is not currently supported will be added in a future release.
Files
All except:
- /alpha/get_metadata | In Beta/Alpha on Dropbox - will implement once stable
- /alpha/upload | In Beta/Alpha on Dropbox - will implement once stable
- /properties/add | In Beta/Alpha on Dropbox - will implement once stable
- /properties/overwrite | In Beta/Alpha on Dropbox - will implement once stable
- /properties/remove | In Beta/Alpha on Dropbox - will implement once stable
- /properties/template/get | In Beta/Alpha on Dropbox - will implement once stable
- /properties/template/list | In Beta/Alpha on Dropbox - will implement once stable
- /properties/update | In Beta/Alpha on Dropbox - will implement once stable
Users
All
API Documentation
0.4 | 0.3.3 | 0.2 | 0.1.1 | 0.1
Links
- Changelog
- Dropbox HTTP API docs (this library is merely a HTTP request wrapper)
- Dropbox API explorer
alorel/dropbox-v2-php 适用场景与选型建议
alorel/dropbox-v2-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 97.8k 次下载、GitHub Stars 达 48, 最近一次更新时间为 2016 年 06 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「api」 「sdk」 「dropbox」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 alorel/dropbox-v2-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 alorel/dropbox-v2-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 alorel/dropbox-v2-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Alfabank REST API integration
Zero-dependency raw PHP DNS resolver, domain-ownership verification, and intoDNS/MxToolbox-style diagnostics. Queries authoritative nameservers directly over sockets — never trusts the recursive cache for ownership checks.
A lightweight plain-PHP framework for database-backed CRUD APIs.
bughq error tracking - PHP SDK
ABsurge PHP SDK for feature flags and A/B testing
统计信息
- 总下载量: 97.8k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 49
- 点击次数: 8
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2016-06-05