Skip to content

Latest commit

Β 

History

History
106 lines (93 loc) Β· 2.95 KB

File metadata and controls

106 lines (93 loc) Β· 2.95 KB
description Mora Api κΉƒν—ˆλΈŒ μž…λ‹ˆλ‹€.
slug github

κΉƒν—ˆλΈŒ

Templates

Field Type Description
name String 호좜된 κ³„μ •μ˜ 이름
nickname String 호좜된 κ³„μ •μ˜ λ‹‰λ„€μž„
url String 호좜된 κ³„μ •μ˜ 링크
company String 호좜된 κ³„μ •μ˜ μ†Œμ†νšŒμ‚¬
area String 호좜된 κ³„μ •μ˜ μ§€μ—­
email String 호좜된 κ³„μ •μ˜ 이메일
introduction String 호좜된 κ³„μ •μ˜ μ†Œκ°œ
id Number 호좜된 κ³„μ •μ˜ μƒμ„±μ‹œκ°„
node String 호좜된 κ³„μ •μ˜ κ³ μœ μ½”λ“œ
gravatar String 호좜된 κ³„μ •μ˜ 아바타
followers String 호좜된 계정을 νŒ”λ‘œμš°ν•œ 수
following String 호좜된 κ³„μ •μ˜ νŒ”λ‘œμœ™ν•œ 수
twitter String 호좜된 κ³„μ •μ˜ νŠΈμœ„ν„°
avatarurl String 호좜된 κ³„μ •μ˜ 아바타 URL
type String 호좜된 κ³„μ •μ˜ κ³„μ •νƒ€μž…
creation String 호좜된 κ³„μ •μ˜ 계정생성일
update String 호좜된 κ³„μ •μ˜ λ§ˆμ§€λ§‰ μ—…λ°μ΄νŠΈμΌ

{% code lineNumbers="true" %}

// 응닡 λ‚΄μš©
{
    "message": "Return succeeded.",
    "status": 200,
    "name": "erukim",
    "nickname": "이루",
    "url": "https://github.com/erukim",
    "company": "@hiplaygit ",
    "area": null,
    "email": null,
    "introduction": "방솑을 ν•˜λ©΄μ„œ 개발과 μ˜¨λΌμΈμ‚¬μ—…μ„ ν•˜λŠ” μ΄λ£¨μž…λ‹ˆλ‹€.\r\n@Dev-Korea-Server @MORA-Team @Team-Laon @Team-Social-Dev ",
    "info": {
        "id": 100296449,
        "node": "U_kgDOBfpnAQ",
        "gravatar": ""
    },
    "followers": 5,
    "following": 6,
    "twitter": null,
    "avatarurl": "https://avatars.githubusercontent.com/u/100296449?v=4",
    "type": "User",
    "creation": "2022-02-23T14:46:16Z",
    "update": "2022-11-09T14:29:24Z",
    "success": true
}

{% endcode %}

NodeJS

{% code lineNumbers="true" %}

// node-fetch
const fetch = require('node-fetch')
fetch(`https://mora-bot.kr/api/v2/github?username=[μ‘°νšŒν• μœ μ € λ‹‰λ„€μž„]`)
    .then(res => res.json())
    .then(json => {
        console.log(json)
    });

// request
const request = require('request');
let options = {
    url: `https://mora-bot.kr/api/v2/github?username=[μ‘°νšŒν• μœ μ € λ‹‰λ„€μž„]`
}
request.get(options, function (error, response, body) {
    if (!error && response.status == 200) {
        let json = JSON.parse(body)
        console.log(`μ‘°νšŒκ°’ : ${json}`);
    } else {
        console.log('error = ' + response.errorcode);
    }
});

{% endcode %}

Python

{% code lineNumbers="true" %}

import requests

response = requests.get("https://mora-bot.kr/api/v2/github?username=[μ‘°νšŒν• μœ μ € λ‹‰λ„€μž„]")
result = response.json()

if response.status_code == 200:
  print(result)
else:
  print(f"Error Code: {result['status']}")

{% endcode %}