API
User
퍼스널스페이스

User API

퍼스널 스페이스 API

퍼스널 스페이스는 게임 내에서 사용자의 개인 공간으로, 사용자가 자신의 방을 꾸미고 관리할 수 있습니다.

마이룸 편집(업데이트)

사용자가 자신의 개인 공간(마이룸)을 편집합니다.

Operation

mutation UpdatePersonalSpace($input: UpdatePersonalSpaceInput!) {
  updatePersonalSpace(input: $input) {
    success
  }
}

Variables

{
  "input": {
    "furnitureProducts": [
      {
        "productId": "가구 상품 ID",
        "uuid": "가구 에셋 유니크 아이디",
        "productFurnitureType": "CHAIR",
        "positionX": 0.5,
        "positionY": 0.5,
        "positionZ": 0.0,
        "flip": 1,
        "layer": 1
      }
    ]
  }
}

마이룸 BGM 업데이트

사용자가 자신의 개인 공간(마이룸)에 배경음악(BGM)을 설정합니다.

Operation

mutation UpdatePersonalSpaceBgm($input: UpdatePersonalSpaceBgmInput!) {
  updatePersonalSpaceBgm(input: $input) {
    success
  }
}

Variables

{
  "input": {
    "isEnabled": true,
    "musicTrack": {
      "productId": "음원 상품 ID",
      "uuid": "음원트랙 고유의 UUID",
      "title": "음원 제목",
      "url": "음원 경로",
      "thumbnailUrl": "앨범 커버 URL",
      "duration": 180
    }
  }
}

유저 개인스페이스 에셋 목록 조회

사용자의 개인스페이스에 사용된 에셋 목록을 조회합니다.

Operation

query PersonalSpace($input: PersonalSpaceInput!) {
  personalSpace(input: $input) {
    wallpaper {
      productId
      uuid
    }
    flooring {
      productId
      uuid
    }
    furnitures {
      productId
      uuid
      productFurnitureType
      positionX
      positionY
      positionZ
      flip
      layer
    }
    decors {
      productId
      uuid
      productFurnitureType
      positionX
      positionY
      positionZ
      flip
      layer
    }
  }
}

Variables

{
  "input": {
    "profileId": "프로필 ID"
  }
}

유저 개인스페이스 BGM 조회

사용자의 개인스페이스 배경음악 정보를 조회합니다.

Operation

query PersonalSpaceBgm($input: PersonalSpaceBgmInput!) {
  personalSpaceBgm(input: $input) {
    isEnabled
    musicTrack {
      productId
      uuid
      title
      thumbnailUrl
      duration
      url
    }
  }
}

Variables

{
  "input": {
    "profileId": "프로필 ID"
  }
}

방명록 목록 조회

특정 유저의 방명록 목록을 조회합니다. 페이지네이션, 정렬, 필터링 옵션을 제공합니다.

Operation

query GuestbookConnection($first: Int, $offset: Int, $orderBy: GuestbookConnectionOrderBy, $filter: GuestbookConnectionFilter!) {
  guestbookConnection(first: $first, offset: $offset, orderBy: $orderBy, filter: $filter) {
    nodes {
      id
      writerUserProfile {
        id
        nickname
        thumbnailUrl
      }
      url
      message
      reaction
      createdAt
      isDeletable
      isReactable
    }
    totalCount
  }
}

Variables

{
  "first": 10,
  "offset": 0,
  "orderBy": {
    "field": "CREATED_AT",
    "direction": "DESC"
  },
  "filter": {
    "ownerUserNo": "유저 번호"
  }
}

방명록 상세 조회

특정 방명록의 상세 정보를 조회합니다.

Operation

query Guestbook($input: GuestBookInput!) {
  guestbook(input: $input) {
    id
    writerUserProfile {
      id
      nickname
      thumbnailUrl
    }
    url
    message
    reaction
    createdAt
    isDeletable
    isReactable
  }
}

Variables

{
  "input": {
    "id": "방명록 ID"
  }
}

방명록 등록

사용자가 다른 사용자의 개인 공간에 방명록을 등록합니다.

Operation

mutation CreateGuestbook($input: CreateGuestbookInput!) {
  createGuestbook(input: $input) {
    success
  }
}

Variables

{
  "input": {
    "ownerUserNo": "방 주인 유저 No",
    "url": "방명록 이미지 URL",
    "message": "방명록 메시지"
  }
}

방명록 삭제

사용자가 자신의 개인 공간에 등록된 방명록을 삭제합니다.

Operation

mutation DeleteGuestbook($input: DeleteGuestbookInput!) {
  deleteGuestbook(input: $input) {
    success
  }
}

Variables

{
  "input": {
    "id": "방명록 ID"
  }
}

방명록 리액션

사용자가 다른 사용자의 개인 공간에 등록된 방명록에 리액션을 합니다.

Operation

mutation ReactGuestbook($input: ReactGuestbookInput!) {
  reactGuestbook(input: $input) {
    success
  }
}

Variables

{
  "input": {
    "id": "방명록 ID",
    "reaction": "LIKE"
  }
}

액자 정보 조회

사용자의 액자 정보를 조회합니다.

Operation

query PhotoFrame($input: PhotoFrameInput!) {
  photoFrame(input: $input) {
    id
    url
  }
}

Variables

{
  "input": {
    "profileId": "프로필 ID"
  }
}

액자 정보 업데이트

사용자가 자신의 액자 정보를 업데이트합니다.

Operation

mutation UpdatePhotoFrame($input: UpdatePhotoFrameInput!) {
  updatePhotoFrame(input: $input) {
    success
  }
}

Variables

{
  "input": {
    "profileId": "프로필 ID",
    "url": "새 액자 이미지 URL"
  }
}