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
- Host: GitHub
- URL: https://github.com/bugra9/github-api
- Owner: bugra9
- License: mit
- Created: 2016-07-27T21:57:03.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-01T14:29:46.000Z (almost 10 years ago)
- Last Synced: 2025-01-23T00:22:32.949Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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");
```