Hub/docs/serverAPI/friends other

 

friends/other

Description

  • Hub 상 친구인데 해당 게임을 하지 않는 친구 목록을 조회한다.


Parameters

  • N/A(로그인된 쿠키로 사용자 인증)
  • 또는
    • paging : paging 기능을 사용. 친구 리스트를 페이지 단위로 받고자 할 때. (없으면 사용 안함.)
      • page : 몇번째 페이지를 받을지.(0부터 시작)
      • length : page 당 받을 친구 수.
{
  "paging":{
    "page":2,
    "length":5
  }
}

출력 JSON

  • friend_list : 친구 목록 (objects array)
  • 각 object 내 property
    • uid : 허브 UID (string)
    • id : 로그인 ID (string)
  • name : 사용자가 입력한 이름 또는 facebook name (string, 설정 안되었으면 null)
    • fbid : 페이스북 계정이 연결된 경우 페이스북 ID (string, 없으면 null)
    • picture : 프로필 이미지 URL
      • 업로드된 이미지의 경우 URL 끝에 ?1234567 형태로 업로드된 시각의 unix timestamp 가 붙음. 이를 가지고 마지막 업로드 시간을 확인할 수 있음
    • country : 국가 정보 (string)
    • game_friend : 지금 실행중인 게임을 같이 하는 친구 여부 (boolean)
{
    "type":"friends/other",
    "error_code":0,
    "friend_list":[
        {
            "uid":"27881283",
            "id":"Sugo1",
            "name":"Ti Chang",
            "fbid": "127181681",
            "picture": "http://image.com2us.com/hubweb/avatar_img/public/default2.png",
            "country":"KR"
        },
        {
            "uid":"27881508",
            "id":"wowgg92",
            "name":null,
            "fbid": "127261811",
            "picture": "http://image.com2us.com/hubweb/avatar_img/000a4/00066a/000402b/0e593153c4ff0076e1c4e438a7e49b84_public_s.jpg?1320855927",
            "country":"US"
        }
    ]
}


에러 메시지

  • 로그인 쿠키 내 gameindex 로 어떤 게임인지 찾을 수 없을 경우
{
     "type":"friends",
     "error_code":1100,
     "reason":"Unknown error occured."
}
  • 친구 목록 조회 실패
{
     "type":"friends",
     "error_code":1101,
     "reason":"Database error occured."
}
  • 친구가 없음
{
     "type":"friends",
     "error_code":1101,
     "reason":"Database error occured."
}


Related Method