2017 © Pedro Peláez
 

library github-repo-walk

Simple class for GitHub repository download or compare

image

ierusalim/github-repo-walk

Simple class for GitHub repository download or compare

  • Sunday, July 2, 2017
  • by ierusalim
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

github-repo-walk

Simple class for download files from GitHub repositories., (*1)

_It is not wrapper for "git". Using api.github.com to get files list., (*2)

Example of use:

namespace ierusalim\GitRepoWalk;

require 'GitRepoWalk.php'; // or require 'vendor/autoload.php';

$g = new GitRepoWalk();

$g->writeEnable(); // if skip it remote repository will be compare with local

//download all files from repository to local-path
$stat = $g->gitRepoWalk( 
    '<local path for repository>',
    'ierusalim/github-repo-walk' //git-user and repository in one string
);

print_r($stat);

Result: download files from this repository to <local path for repository>, (*3)

Examples of some other functions:

//Get repositories list for specified user:
$repo_list_arr = $g->getUserRepositoriesList('php-fig');

//Get information about repository 'user/repo'
$repo_info = $g->getRepositoryInfo('ierusalim/github-repo-walk');

//Get contacts from repository 'user/repo' (emails, names, roles)
$contacts = $g->getRepositoryContacts('ierusalim/github-repo-walk');

print_r($contacts);

//Get files list from repository
$files = $g->getRepoFilesList("ierusalim/github-repo-walk");
//show file names
foreach($files->tree as $file_obj) {
    echo $file_obj->path . "\t{$file_obj->size}\n";
}

The Versions

02/07 2017

dev-master

9999999-dev

Simple class for GitHub repository download or compare

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4

 

by Alex Jer

repository github download repo

29/06 2017

0.1.1

0.1.1.0

Simple class for GitHub repository download or compare

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4

 

by Alex Jer

repository github download repo

27/06 2017

0.1.0

0.1.0.0

Simple class for GitHub repository download or compare

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4

 

by Alex Jer

repository github download repo