2017 © Pedro Peláez
 

library github-client

image

davahome/github-client

  • Friday, January 26, 2018
  • by dava
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

github-php-api

Provides functionality for communication with the github using php., (*1)

A possible usage of this is the implementation a github api based self-update functionality (for private repositories), (*2)

Installation

php composer.phar require davahome/github-php-api

Usage

use DavaHome\GithubApi\AssetFileDownloader;

$assetFileDownloader = new AssetFileDownloader('davahome', 'github-api', '<TOKEN>');

// Display some release information (optional)
$releaseInformation = $assetFileDownloader->getReleaseInformation();
$date = new \DateTime($releaseInformation['published_at']);
echo 'Version: ', $releaseInformation['tag_name'], PHP_EOL;
echo 'Published: ', $date->format('Y-m-d H:i:s'), PHP_EOL;

// Download the asset
$fileContent = $assetFileDownloader->downloadAsset('file.phar');
file_put_contents('file.phar', $fileContent);

The Versions

26/01 2018

dev-master

9999999-dev

  Sources   Download

GPL GPL-3.0-or-later

The Requires