Skip to main content

API

Less than 1 minute...

Comment

Comment List

Get comment list for article

GET /api/comment

Parameters:

ParameterTypeDescription
pathstringArticle id for comment
pagenumberComment page
pageSizenumberComment list page size
sortBystringWhich sort type for comment list, default descending sort by create time, also you can ascending sort by create_time, or descending sort by comment like.

Comment Count

Get comment count for article

GET /api/comment?type=count

Parameters:

ParameterTypeDescription
urlstringArticle id for comment, return site comment count if it empty

Recent Comment

Get recent comment

GET /api/comment?type=recent

Parameters:

ParameterTypeDescription
countnumbercomment count return

Submit comment

POST /api/comment

Parameters:

ParameterTypeDescription
commentstringcomment content
linkstringcommentator site
mailstringcommentator email
nickstringcommentator nick
pidstringcomment id which one replied
ridstringroot comment id which one owned
uastringcommentator's user agent
urlstringArticle id for comment
atstringcomment nick name which one replied

Reading statistics

Get reading statistics

Get the number of readings corresponding to an article or multiple articles.

GET /api/article

Parameters:

ParameterTypeDescription
pathstringArticle id for comment,multiple ids should be spliced with commas.

Update reading statistics

Update the reading count of an article.

POST /api/article

Parameters:

ParameterTypeDescription
pathstringArticle id for comment
TIPS: The comment area is only for demo. If you have any questions, please go to Github Discussion to ask.
What do you think?
  • 0
  • 0
  • 0
  • 0
  • 0
  • 0
Comments
  • Latest
  • Oldest
  • Hottest
Powered by Waline v3.1.3