ekotechnology/guzzlecal 问题修复 & 功能扩展

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

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

ekotechnology/guzzlecal

Composer 安装命令:

composer require ekotechnology/guzzlecal

包简介

Google Calendar client that uses Guzzle

README 文档

README

Google Calendar Client that uses Guzzle at its core.

Features

Authentication

  • Helpers for OAuth2 URL creation
  • Helpers for capturing OAuth2 authentication
  • Requests sent through the Guzzle client are signed via plugin
    • If the OAuth2 settings specify an offline mode, expired access tokens can be automatically refreshed

Calendar List

  • List calendars that are available to the authenticated user
  • Remove calendars from the listing

Calendar

  • Create new account sub-calendars
  • View/Update metadata on existing calendars
  • Delete account sub-calendars

Events

  • Create new events
    • Including recurring events
    • Add attendees/invitations
  • View/Update metadata on events
  • Delete single or recurring events

Free/Busy Queries

  • Allows you to query for times that are marked as Busy on the calendar

Custom Requests

  • If you don't want to use the response representations provided via Guzzlecal, we provide a passthru option that will just give you an OAuth2 authenticated Guzzle client that you can do whatever you want on. If you're using offline mode, expired tokens will still be refreshed for you automatically.

Installation

Install via Composer

Depending on what version of Guzzlecal you want to use, your settings will vary. The goal is to keep the most stable version of this package in master, with the develop branch containing bleeding edge changes. When you want to lock in to a specific version (and you should for anything important), then you'll want to use a require line in your composer.json that might look like "ekotechnology/guzzlecal": "0.2", etc. If you want to follow along with the bleeding edge ( This is not suggested for anything important. ), you can do "ekotechnology/guzzlecal": "dev-develop" as your requirement.

If you'd rather not muck around with your composer.json manually, you can just search for Guzzlecal when adding requirements with the composer command.

Install via Git/Filesystem

If you are going to use this method, it is suggested that you star the repository so that you can integrate any security patches or bug fixes as soon as possible.

Use with Laravel 4

This package was built for and within Laravel 4, although the goal is that it will function properly in other PHP projects. See the section below for more info.

Configuration

Guzzlecal ships with a Service Provider and Facade so that it can tie in very nicely with Laravel 4. Once you've installed Guzzlecal, configuring it for Laravel is pretty simple. You just need to add an entry in for the Service Provider and the Facade.

From the base directory of your app, you need to go to the app configuration file which is found in app/config/app.php. You'll need to add an entry in the providers array with a value of Ekotechnology\Guzzlecal\GuzzlecalServiceProvider. This might make your providers array look something like this:

'providers' => array(
	'Illuminate\Foundation\Providers\ArtisanServiceProvider',
	'Illuminate\Auth\AuthServiceProvider',
	'Illuminate\Cache\CacheServiceProvider',
	'Illuminate\Foundation\Providers\CommandCreatorServiceProvider',
	'Illuminate\Foundation\Providers\ComposerServiceProvider',
	...
	'Illuminate\Validation\ValidationServiceProvider',
	'Illuminate\View\ViewServiceProvider',
	'Illuminate\Workbench\WorkbenchServiceProvider',
	'Ekotechnology\Guzzlecal\GuzzlecalServiceProvider'

),

Now, we just need to register the alias for the Facade. So in the aliases array, you'll need to add an entry with the value of Ekotechnology\Guzzlecal\Facades\GuzzlecalFacade. This might make your aliases array look like so:

'aliases' => array(
	'App'             => 'Illuminate\Support\Facades\App',
	'Artisan'         => 'Illuminate\Support\Facades\Artisan',
	'Auth'            => 'Illuminate\Support\Facades\Auth',
	'Blade'           => 'Illuminate\Support\Facades\Blade',
	'Cache'           => 'Illuminate\Support\Facades\Cache',
	'ClassLoader'     => 'Illuminate\Foundation\ClassLoader',
	'Config'          => 'Illuminate\Support\Facades\Config',
	...
	'Route'           => 'Illuminate\Support\Facades\Route',
	'Schema'          => 'Illuminate\Support\Facades\Schema',
	'Session'         => 'Illuminate\Support\Facades\Session',
	'URL'             => 'Illuminate\Support\Facades\URL',
	'Validator'       => 'Illuminate\Support\Facades\Validator',
	'View'            => 'Illuminate\Support\Facades\View',
	'Guzzlecal'       => 'Ekotechnology\Guzzlecal\Facades\GuzzlecalFacade'
),

Example

Use outside of Laravel 4

If you're not using Laravel 4, you should still be able to use Guzzlecal. You'll want to make sure that you're autoloading your Composer autoloader, and if you aren't using Composer (You really should!), then you'll just have to make sure that the classes in src/Ekotechnology/Guzzlecal get loaded.

ekotechnology/guzzlecal 适用场景与选型建议

ekotechnology/guzzlecal 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 71 次下载、GitHub Stars 达 10, 最近一次更新时间为 2013 年 01 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「oauth2」 「Guzzle」 「calendar」 「google」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 ekotechnology/guzzlecal 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 ekotechnology/guzzlecal 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 1
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2013-01-22