| description | Mora Api κΉνλΈ μ λλ€. |
|---|---|
| slug | github |
-
APIλ λͺ¨λ GET λ©μλλ₯Ό μ¬μ©ν©λλ€
-
GET URL : https://mora-bot.kr/api/v2/github?username=[μ‘°νν μ μ λλ€μ]
| Field | Type | Description |
|---|---|---|
| name | String | νΈμΆλ κ³μ μ μ΄λ¦ |
| nickname | String | νΈμΆλ κ³μ μ λλ€μ |
| url | String | νΈμΆλ κ³μ μ λ§ν¬ |
| company | String | νΈμΆλ κ³μ μ μμνμ¬ |
| area | String | νΈμΆλ κ³μ μ μ§μ |
| String | νΈμΆλ κ³μ μ μ΄λ©μΌ | |
| introduction | String | νΈμΆλ κ³μ μ μκ° |
| id | Number | νΈμΆλ κ³μ μ μμ±μκ° |
| node | String | νΈμΆλ κ³μ μ κ³ μ μ½λ |
| gravatar | String | νΈμΆλ κ³μ μ μλ°ν |
| followers | String | νΈμΆλ κ³μ μ νλ‘μ°ν μ |
| following | String | νΈμΆλ κ³μ μ νλ‘μν μ |
| 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 %}
{% 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 %}
{% 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 %}