cvo-technologies / cakephp-github
CakePHP webservice implementation for GitHub
Installs: 103
Dependents: 1
Suggesters: 0
Security: 0
Stars: 8
Watchers: 3
Forks: 3
Open Issues: 1
Type:cakephp-plugin
Requires
- muffin/webservice: ^1.0
Requires (Dev)
- cakephp/cakephp: ^3.2
- cakephp/cakephp-codesniffer: ^2.1
- cvo-technologies/stream-emulation: ^1.0
- phpunit/phpunit: ^5.5
This package is not auto-updated.
Last update: 2024-11-09 20:28:20 UTC
README
Installation
Using Composer
Ensure require
is present in composer.json
. This will install the plugin into Plugin/GitHub
:
{ "require": { "cvo-technologies/cakephp-github": "~1.1" } }
Usage
If you want to get information about a specific repository
Webservice config
Add the following to the Webservice
section of your application config.
'git_hub' => [
'className' => 'Muffin\Webservice\Connection',
'service' => 'CvoTechnologies/GitHub.GitHub',
]
Controller
<?php namespace CvoTechnologies\GitHub\Controller; use Cake\Controller\Controller; use Cake\Event\Event; class IssuesController extends Controller { public function beforeFilter(Event $event) { $this->loadModel('CvoTechnologies/GitHub.Issues', 'Endpoint'); } public function index() { $issues = $this->Issues->find()->where([ 'owner' => 'cakephp', 'repo' => 'cakephp' ]); $this->set('issues', $issues); } }