https://github.com/saber2pr/github-edit
Github Content CURD API.
https://github.com/saber2pr/github-edit
github-api
Last synced: 11 months ago
JSON representation
Github Content CURD API.
- Host: GitHub
- URL: https://github.com/saber2pr/github-edit
- Owner: Saber2pr
- Created: 2020-02-03T07:10:57.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-13T12:16:49.000Z (almost 6 years ago)
- Last Synced: 2025-02-03T08:44:26.393Z (12 months ago)
- Topics: github-api
- Language: TypeScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @saber2pr/github-edit
> Github Content CURD API.
```bash
yarn add @saber2pr/github-edit
```
# Example
```ts
import {
login,
unLogin,
getContentTree,
createFile,
removeFile,
readFile,
getCommit,
getSha
} from "@saber2pr/github-edit"
// 1. login
login(username, password)
// 2. content tree
getContentTree(repo)
// 3. createFile
createFile(repo, path, commit)
// 4. removeFile
removeFile(repo, path, commit)
// 5. readFile
readFile(repo, path)
// 6. get Commit Info
getCommit(repo, path)
// 7. get sha
getSha(repo, path)
// 8. unLogin
unLogin()
```
---
## start
```bash
yarn install
```
```bash
yarn start
yarn dev
```
> Author: saber2pr