afrzlfa/githubcrud
最新稳定版本:v1.0.0
Composer 安装命令:
composer require afrzlfa/githubcrud
包简介
README 文档
README
A simple PHP library for managing GitHub repository files using the GitHub API.
Installation
Install the library using Composer:
composer require afrzlfa/githubcrud
Usage
Here's an example of how to use the library:
require 'vendor/autoload.php'; use Afrzlfa\Githubcrud; $config = [ 'token' => 'YOUR_GITHUB_TOKEN', 'username' => 'YOUR_GITHUB_USERNAME', 'repository' => 'YOUR_REPOSITORY_NAME', 'branch' => 'main' // or any branch name ]; $github = new Githubcrud($config); // Create a file $github->createFile('example.txt', 'Hello, World!'); // Edit a file $github->editFile('example.txt', 'Updated content'); // Read a file $content = $github->readFile('example.txt'); echo $content; // Delete a file $github->deleteFile('example.txt');
Requirements
- PHP 7.4 or higher
- Composer
License
This library is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: mit
- 更新时间: 2025-01-14