티스토리 뷰

카테고리 없음

github rest api

silver18 2020. 10. 23. 23:41

create a repository for the authenticated user

            axios({
                method: "post",
                url: `https://api.github.com/user/repos`,
                headers: {
                    'Authorization': `token ${githubToken}`
                },
                data: {
                    'name': 'test1023'
                }
                })
                .then(res => {
                    console.log(res.data);
                })
                .catch(e => {
                    console.log(e);
                })

 

create repository projects

            axios({
                method: 'post',
                url: `https://api.github.com/repos/Jungea/test1023/projects`,
                headers: {
                    'Authorization': `token ${githubToken}`,
                    'Accept': 'application/vnd.github.inertia-preview+json'
                },
                data: {
                    'name': '계획세우기',
                    'body': 'DB, frontend, backend'
                }
                })
                .then(res => {
                    console.log(res.data);
                })
                .catch(e => {
                    console.log(e);
                })

 

create projects column

 

 

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함