An open API service indexing awesome lists of open source software.

https://github.com/bugra9/github-api

Single file GitHub API client (Php, Javascript) - Creating/changing/deleting multiple files in a single commit
https://github.com/bugra9/github-api

Last synced: 8 months ago
JSON representation

Single file GitHub API client (Php, Javascript) - Creating/changing/deleting multiple files in a single commit

Awesome Lists containing this project

README

          

# PHP, Javascript GitHub API
Creating/changing/deleting multiple files in a single commit

## Basic usage
### PHP
```php
$gh = new Github('user', 'token', 'owner/repo/branch');
$gh->add('path/fileName', 'file content');
$gh->add('path/fileName', 'file content (base64 encoded)', false);
$gh->commit("message");
// $gh->commit("message", "Author Name", "Author Email");
```

### Javascript
```javascript
var gh = new Github('user', 'token', 'owner/repo/branch');
gh.add('path/fileName', 'file content');
gh.add('path/fileName', 'file content (base64 encoded)', false);
gh.commit("message");
// gh.commit("message", "Author Name", "Author Email");
```