muffin/github
Composer 安装命令:
composer require muffin/github
包简介
Github Webservice (API) for CakePHP 3.
README 文档
README
Github Webservice (API) for CakePHP 3.
Install
Using Composer:
composer require muffin/github:dev-master
You then need to load the plugin. You can use the shell command:
bin/cake plugin load Muffin/Github
or by manually adding statement shown below to boostrap.php:
Plugin::load('Muffin/Github');
Usage
In your app.php, configure your github service like any other configuration, by adding a new element to the configure array:
'Webservices' => [ 'github' => [ 'className' => 'Muffin\Webservice\Connection', 'service' => 'Muffin/Github.Github', ] ]
or, to use a token for example (and full namespaced driver):
'Webservices' => [ 'github' => [ 'className' => 'Muffin\Webservice\Connection', 'service' => 'Muffin\Github\Webservice\Driver\Github', 'token' => env('GITHUB_TOKEN'), ] ]
or using your username/password combination:
'Webservices' => [ 'github' => [ 'className' => 'Muffin\Webservice\Connection', 'service' => 'Muffin/Github.Github', 'username' => env('GITHUB_USERNAME'), 'password' => env('GITHUB_PASSWORD'), ] ]
or using your client ID and secret:
'Webservices' => [ 'github' => [ 'className' => 'Muffin\Webservice\Connection', 'service' => 'Muffin/Github.Github', 'clientId' => env('GITHUB_CLIENT_ID'), 'secret' => env('GITHUB_SECRET'), ] ]
You will also need to load the webservices if you haven't already done that in your
bootstrap.php file:
ConnectionManager::config(Configure::consume('Webservices'));
Now, from anywhere, you could call the webservice like so:
$connection = ConnectionManager:get('github'); $repo = $connection->api('repo')->show('usemuffin', 'github');
Patches & Features
- Fork
- Mod, fix
- Test - this is important, so it's not unintentionally broken
- Commit - do not mess with license, todo, version, etc. (if you do change any, bump them into commits of their own that I can ignore when I pull)
- Pull request - bonus point for topic branches
To ensure your PRs are considered for upstream, you MUST follow the CakePHP coding standards.
Bugs & Feedback
http://github.com/usemuffin/github/issues
License
Copyright (c) 2015, [Use Muffin] and licensed under The MIT License.
muffin/github 适用场景与选型建议
muffin/github 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.18k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2015 年 04 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「github」 「cakephp」 「webservice」 「muffin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 muffin/github 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 muffin/github 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 muffin/github 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
Handles basic OAuth/OAuth2 authentication along with classes for common services
MediaWiki extension that allows embedding external content, specified by URL, into your wiki pages
A PSR-7 compatible library for making CRUD API endpoints
Email Toolkit Plugin for CakePHP
Rhino, a CMS and Application-Framework plugin for CakePHP
统计信息
- 总下载量: 1.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-29