Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Github API integration module for Zend Framework 2
PHP
branch: master
Failed to load latest commit information.
config Fix: Run php-cs-fixer to fix failing build
src/EdpGithub Fix: Field is declared dynamically
test Fix: Method is misspelled, too
.gitignore Enhancement: Ignore php-cs-fixer cache
.php_cs Enhancement: Add php-cs-fixer configuration
.travis.yml Enhancement: Run php-cs-fixer on Travis
LICENSE Update LICENSE (MIT -> 2 Clause BSD)
Module.php Fix: Run php-cs-fixer to fix failing build
README.md Added coveralls to Readme
autoload_classmap.php
composer.json
composer.lock Update composer lock
phpunit.xml Modified testing behaviour

README.md

Github Api Module for ZF2

Build Status Coverage Status

Introduction

EdpGithub is a Wrapper for the Github Api based on Zend Framework 2 which uses Github API v3.

Installation

Main Setup

  1. Clone this project into your ./vendor/ directory and enable it in your application.config.php file.

Usage

Basic Usage

Here is short example on how to use

$client = $serviceManager->get('EdpGithub\Client');
$repos = $client->api('user')->repos('hounddog');

This would fetch all the Repositories for the user Hounddog

Authentication

To use functionality which needs Authentication you have to first authenticate

$client = $serviceManager->get('EdpGithub\Client');
$client->authenticate('url_token', 'access_token');
$repos = $client->api('current_user')->repos();

You can also listen to the Event 'EdpGithub\Client', 'api'

$em->attach('EdpGithub\Client', 'api', function($e) use ($sm) {
    $client = $e->getTarget();
    $client->authenticate('url_token', $token /* your access_token here */);
} );

Documentation

Please refer to the Wiki for a more detailed Documentation

Something went wrong with that request. Please try again.