✔메인 정보 - SangleProject/Sangle GitHub Wiki

메소드 경로 설명
GET /main/info 메인 정보

home_main_increase (1)

Request Header

{
    "Content-Type": "application/json",
    "token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJTQU5HTEUiLCJ1c2VySWR4IjoyLCJleHAiOjE2MDQxMjgyMzJ9.ZIyE8yKyMZyxdE1QBMPYGlllPvWjVyWNosX-r4H7iDo"
}

Response

< Success >

  1. 좋아요 3개 받은 경우 (100개일 경우 배지 내용만 달라짐)
{
    "nickName": "hyo",
    "profileImg": "https://outsopt26.s3.ap-northeast-2.amazonaws.com/profile6%403x.png",
    "postCount": 6,
    "week": 3,
    "compare": "same",
    "remaining": 3,
    "percentage": 0,
    "badge": [
        {
            "badgeName": "사랑받는 글",
            "badgeInfo": "가장 솔직한 글이 가장 나다운 글이라는 말처럼 당신의 솔직한 글이 주는 울림은 오래도록 기억될 거에요.",
            "badgeImg": "https://outsopt26.s3.ap-northeast-2.amazonaws.com/badge/img_badge04_xl.png"
        }
    ],
   "declarations": [
        {
            "topic": "빨래",
            "postIdx": 17,
            "result": "기타,불편,그냥"
        },
        {
            "topic": "",
            "postIdx": 19,
            "result": "그냥,불편,기타"
        },
        {
            "topic": "후회",
            "postIdx": 20,
            "result": "그냥,기타,불편"
        }
    ]
}
  1. 좋아요 배지 기준이 아닐 때
{
    "nickName": "hyo",
    "profileImg": "https://outsopt26.s3.ap-northeast-2.amazonaws.com/profile6%403x.png",
    "postCount": 6,
    "week": 3,
    "compare": "same",
    "remaining": 3,
    "percentage": 0,
    "badge": [],
    "declarations": [
        {
            "topic": "빨래",
            "postIdx": 17,
            "result": "기타,불편,그냥"
        },
        {
            "topic": "",
            "postIdx": 19,
            "result": "그냥,불편,기타"
        },
        {
            "topic": "후회",
            "postIdx": 20,
            "result": "그냥,기타,불편"
        }
    ]
}
  • nickName : 사용자 닉네임
  • profileImg : 사용자 프로필 이미지
  • postCount : 해당 유저의 전체 글 작성 수
  • week : 해당 유저의 이번주 작성 글 수
  • compare : 저번주 글 작성 수와 비교 ("increase"->증가, "same"-> 같음, "decrease"->감소)
  • remaining : 오늘 글감 중 쓰지 않은 갯수
  • percentage : 오늘 글감 중 쓴 갯수
  • badge : 좋아요 3개일 때와 100개일 때
  • declarations : 신고 알림 팝업

< Fail >

  • 토큰값이 없을 때 (400)
{
    "data": null
}
  • 권한 에러 (401)
{
    "data": null
}
  • 데이터베이스 에러 (600)
{
    "data": null
}
  • 서버 내부 에러 (500)
{
    "data": null
}
  • 메소드 에러 (405)
  • 경로 에러 (404 or 400)

⚠️ **GitHub.com Fallback** ⚠️