Skip to content

erivello/GithubApiBundle

Repository files navigation

GithubApiBundle

This bundle provides a simple integration of the KnpLabs PHP GitHub API client into Symfony2.

Build Status

Installation

Installation is very easy, it makes use of Composer.

Add GithubApiBundle to your composer.json

"require": {
    "erivello/github-api-bundle": "dev-master"
}

Register the bundle in app/AppKernel.php:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...

        new Erivello\GithubApiBundle\ErivelloGithubApiBundle(),
    );
}

Configure

Basic usage

erivello_github_api: ~

Cache usage

erivello_github_api:
    cache:
        # Select cache dir
        dir: '/tmp/dir'
        # Or select directly which cache you want to use
        file: '/tmp/file'

Usage

You can access the php-github-api by the github_api service:

<?php

$service = $this->container->get('github_api');
$client = $service->getClient();

$repositories = $client->api('user')->repositories('ornicar');

License

The GithubApiBundle is licensed under the MIT license.

About

Bundle around PHP GitHub API client from KnpLabs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages