# gist-util **Repository Path**: npm-packages/gist-util ## Basic Information - **Project Name**: gist-util - **Description**: gitee and github gist(code) helper - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-05-27 - **Last Updated**: 2022-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gist-util gitee and github gist(code) helper ## How use ### npm ```bash npm i gist-util --save ``` ### yarn ```bash yarn add gist-util -S ``` ### Demo ```javascript const gist = require('gist-util'); const token='your token'; const gitee=gist('gitee',token); async function getOne(){ let result=await gitee.getOne('2ohtyffdsau035333'); console.log(result.data); } // getOne(); async function create(){ const data={ files:{ "file1.txt": { "content": "String file contents" }}, description:'mytest code', public:false }; let result=await gitee.create(data); console.log(result.data); } // create(); async function update(){ const id='2ohtyffdsau035333'; const data={ files:{ "file1.txt": { "content": "hello" }}, description:'mytest code', public:false }; let result=await gitee.update(id,data); console.log(result.data); } // update(); async function delOne(){ const id='2ohtyffdsau035333'; let result=await gitee.delOne(id); console.log(result.data); } // delOne(); async function test(){ let result=await gitee.test(); console.log(result.data); } test(); ```