PHP code example of muffin / github
1. Go to this page and download the library: Download muffin/github library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
muffin / github example snippets
Plugin::load('Muffin/Github');
'Webservices' => [
'github' => [
'className' => 'Muffin\Webservice\Connection',
'service' => 'Muffin/Github.Github',
]
]
'Webservices' => [
'github' => [
'className' => 'Muffin\Webservice\Connection',
'service' => 'Muffin\Github\Webservice\Driver\Github',
'token' => env('GITHUB_TOKEN'),
]
]
'Webservices' => [
'github' => [
'className' => 'Muffin\Webservice\Connection',
'service' => 'Muffin/Github.Github',
'username' => env('GITHUB_USERNAME'),
'password' => env('GITHUB_PASSWORD'),
]
]
'Webservices' => [
'github' => [
'className' => 'Muffin\Webservice\Connection',
'service' => 'Muffin/Github.Github',
'clientId' => env('GITHUB_CLIENT_ID'),
'secret' => env('GITHUB_SECRET'),
]
]
ConnectionManager::config(Configure::consume('Webservices'));
$connection = ConnectionManager:get('github');
$repo = $connection->api('repo')->show('usemuffin', 'github');