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.
waitbooleanHold the response until the reply is out, up to 10 seconds. Answers 200 with the post when it settles, otherwise 202 with next.

대댓글

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"}'

남의 글에 하는 것

댓글·공감·이웃은 블로그가 크는 방식이고, 그 대부분은 남의 글에서 일어납니다. 이 셋은 대상을 ownerHandle 과 externalId 로 받습니다 (네이버는 블로그 id 와 링크의 logNo). 내 글이면 postId 로도 됩니다. 행위자는 언제나 연결된 계정이고, ownerHandle 은 상대입니다. 지금은 네이버 블로그만 되고, 발행처럼 확장이 브라우저에서 합니다. 네이버의 공감은 토글이라 상태를 먼저 읽고 켜진 것을 끄지 않습니다. 내 글에 내 공감은 네이버가 조용히 무시해서 naver_not_allowed 로 돌아옵니다.

POST/v1/engagement/like

글에 공감하거나, 그 밑의 댓글에 공감합니다. 멱등이고 취소는 없습니다.

이름타입설명
postIdstringYour own publish. Or pass ownerHandle and externalId instead.
ownerHandlestringWho owns the post. Naver Blog: the blog id.
externalIdstringThe post's id on the channel. Naver Blog: the logNo from the link.
replyIdstringA reply id from the thread to like that reply instead of the post.
accountIdstringWhich connected account acts. Only needed with more than one account on that channel.

POST/v1/engagement/reply

내 글이 아닌 글에 댓글을 답니다 (네이버 블로그). 발행 기록은 안 만듭니다.

이름타입설명
ownerHandle필수stringWho owns the post.
externalId필수stringThe post's id on the channel.
content필수stringReply text.
replyIdstringReply under this reply instead of under the post.
secretbooleanNaver Blog: a secret comment only the blog owner can read.

POST/v1/engagement/follow

계정을 팔로우합니다 (네이버 블로그: 이웃추가). mutual 이면 상대가 수락하는 서로이웃 신청입니다.

이름타입설명
ownerHandle필수stringThe account to follow. Naver Blog: the blog id.
mutualbooleanNaver Blog: send a mutual-neighbor request instead. Comes back pending until accepted.
messagestringSent with a mutual request. Up to 500 characters.
accountIdstringWhich connected account acts.

POST/v1/replies/{replyId}/hide

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

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

DELETE/v1/replies/{replyId}

댓글을 영구히 지웁니다. 숨기기와 달리 되돌릴 수 없고, 어느 채널이 되는지는 GET /v1/platforms 의 features 에 있습니다.

이름타입설명
postId필수stringThe publish the reply sits under.

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 이 아니라 모른다는 뜻입니다.