Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/saber2pr/github-edit

Github Content CURD API.
https://github.com/saber2pr/github-edit

github-api

Last synced: 7 days ago
JSON representation

Github Content CURD API.

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