定制 afrzlfa/githubcrud 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: mit
  • 更新时间: 2025-01-14