2017 © Pedro Peláez
 

cakephp-plugin github

Github Webservice (API) for CakePHP 3.

image

muffin/github

Github Webservice (API) for CakePHP 3.

  • Thursday, June 9, 2016
  • by jadb
  • Repository
  • 3 Watchers
  • 1 Stars
  • 1,104 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Github

Build Status Coverage Total Downloads License, (*1)

Github Webservice (API) for CakePHP 3., (*2)

Install

Using Composer:, (*3)

composer require muffin/github:dev-master

You then need to load the plugin. You can use the shell command:, (*4)

bin/cake plugin load Muffin/Github

or by manually adding statement shown below to boostrap.php:, (*5)

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:, (*6)


'Webservices' => [ 'github' => [ 'className' => 'Muffin\Webservice\Connection', 'service' => 'Muffin/Github.Github', ] ]

or, to use a token for example (and full namespaced driver):, (*7)


'Webservices' => [ 'github' => [ 'className' => 'Muffin\Webservice\Connection', 'service' => 'Muffin\Github\Webservice\Driver\Github', 'token' => env('GITHUB_TOKEN'), ] ]

or using your username/password combination:, (*8)


'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:, (*9)


'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:, (*10)

ConnectionManager::config(Configure::consume('Webservices'));

Now, from anywhere, you could call the webservice like so:, (*11)

$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., (*12)

Bugs & Feedback

http://github.com/usemuffin/github/issues, (*13)

License

Copyright (c) 2015, [Use Muffin] and licensed under The MIT License., (*14)

The Versions

09/06 2016

dev-master

9999999-dev https://github.com/usemuffin/github

Github Webservice (API) for CakePHP 3.

  Sources   Download

MIT

The Requires

 

The Development Requires

api cakephp github webservice muffin

31/05 2016

1.0

1.0.0.0 https://github.com/usemuffin/github

Github Webservice (API) for CakePHP 3.

  Sources   Download

MIT

The Requires

 

The Development Requires

api cakephp github webservice muffin