gist-util
v1.0.3
Published
gitee and github gist(code) helper.
Downloads
1
Readme
gist-util
gitee and github gist(code) helper
How use
npm
npm i gist-util --save
yarn
yarn add gist-util -S
Demo
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();