alorel/dropbox-v2-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

alorel/dropbox-v2-php

最新稳定版本:0.4.2

Composer 安装命令:

composer require alorel/dropbox-v2-php

包简介

A PHP SDK for Dropbox's v2 API

README 文档

README

Percentage of issues still open Build Status codecov Dependency Status

Latest Stable Version Total Downloads License

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

  1. Installation
  2. Usage
  3. Supported API operations
  4. API Documentation

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

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 alorel/dropbox-v2-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 97.8k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 49
  • 点击次数: 8
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 48
  • Watchers: 15
  • Forks: 23
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-06-05