scribe/github-api-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

GitHub API client for PHP5

v1.3.1 2014-10-09 03:37 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:33:19 UTC


README

Build Status Quality Score Coverage Status Dependency Status Latest Version Software License

This is a simple, object oriented PHP5 client for GitHub's API (v3), implemented with an intentionally similar API to GitHub's native RESTful API.

Features

  • Code Standards: Implements PSR-0 code and structure standards to accommodate auto-loading using Composer or another class auto-loading solution.
  • Speed and Familiarity: Lightweight, fast, and friendly object model utilizing lazy loading with an intentional similarly to GitHub's own RESTful API.
  • Tests and Continuous Integration: Extensive PHPUnit tests utilizing Travis CI as our continuous integration service.
  • Quality, Coverage and Dependencies: Code quality reports with Code Climate, coverage reports with Coveralls, and dependency version monitoring using Gemnasium.
  • Documentation and Examples: Comprehensive examples written in markdown and automatically generated API documentationn.

Requirements

This library requires a short list of dependencies for both a production installation or a development build.

Production

Development

Installation

This library can be included into your project easily using Composer by adding the dependency to the require section of your composer.json project file.

{
    "require": {
        "scribe/github-api-library": "dev-master"
    }
}

Usage

Basic Usage

<?php

require_once 'vendor/autoload.php';

$client = new \Github\Client();
$repositories = $client->api('user')->repositories('ornicar');

Cached Usage

<?php

require_once 'vendor/autoload.php';

$client = new \Github\Client(
    new \Github\HttpClient\CachedHttpClient(array('cache_dir' => '/tmp/github-api-cache'))
);

$client = new \Github\HttpClient\CachedHttpClient();
$client->setCache(
    new \Github\HttpClient\Cache\FilesystemCache('/tmp/github-api-cache')
);

$client = new \Github\Client($client);

Documentation

For general usage and examples, you can check the doc directory. For a comprehensive API reference, check this project's github.io webpage.

Contributors

This project has code contributed from an array of individuals.