REST API

답글과 지표

글 밑의 스레드를 읽고, 답하고, 원치 않는 것을 숨기고, 숫자를 봅니다.

답글은 워크스페이스가 아니라 발행에 붙습니다. 여기 모든 호출이 POST /v1/posts 로 받은 발행 id 를 받습니다.

GET/v1/posts/{id}/replies

발행한 글 밑의 답글 스레드.

POST/v1/posts/{id}/replies

글에 답하거나, 그 밑의 답글에 답합니다.

이름타입설명
content필수stringReply text.
replyTostringA reply id from the thread. Omit to answer the post itself.

대댓글

replyTo 를 빼면 원글에 답합니다. 답글 id 를 주면 그 답글에 한 단계 더 깊이 답합니다. 따로 엔드포인트가 있는 게 아니라 같은 호출이 둘 다 합니다.

# answer the post
curl -X POST https://api.uplika.com/v1/posts/post_01H.../replies \
  -H "authorization: Bearer $UPLIKA_KEY" \
  -H "content-type: application/json" \
  -d '{"content":"Thanks for reading"}'

# answer a reply — one level deeper
curl -X POST https://api.uplika.com/v1/posts/post_01H.../replies \
  -H "authorization: Bearer $UPLIKA_KEY" \
  -H "content-type: application/json" \
  -d '{"content":"Good question","replyTo":"17901234567890123"}'

POST/v1/replies/{replyId}/hide

채널에서 답글을 숨기거나 다시 보이게 합니다.

이름타입설명
postId필수stringThe publish the reply sits under.
hidebooleantrue hides it, false shows it again. Default true.

GET/v1/posts/{id}/insights

조회·좋아요·답글·리포스트·인용·공유.

{
  "views": 1240,
  "likes": 38,
  "replies": 6,
  "reposts": 2,
  "quotes": 1,
  "shares": null
}

자주 묻는 것

내 글에 답글을 달려면요?

발행 id 로 reply 를 부르고 replyTo 는 비워 둡니다. 그러면 원글에 답하는 것이고, 스레드가 그렇게 시작됩니다.

답글에 답글을 달려면요?

같은 호출에 그 답글의 id 를 replyTo 로 넘깁니다. 따로 엔드포인트가 있는 게 아니라 호출 하나가 두 깊이를 다 합니다.

어떤 숫자를 볼 수 있나요?

조회·좋아요·답글·리포스트·인용·공유입니다. 플랫폼이 아직 세는 중이면 null 로 오는데, null 은 0 이 아니라 모른다는 뜻입니다.