Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 22.2 KB

File metadata and controls

53 lines (35 loc) · 22.2 KB
id comments-controller-create
title Create a new comment
description Add a comment to a post or reply to an existing comment. Supports mentions and notifies the post author.
sidebar_label Create a new comment
hide_title true
hide_table_of_contents true
api
operationId description parameters requestBody responses tags servers method path security securitySchemes jsonRequestBodyExample info postman
CommentsController_create
Add a comment to a post or reply to an existing comment. Supports mentions and notifies the post author.
required description content
true
Comment with postId and optional parentId
application/json
schema
type properties required title
object
comment
description allOf
Comment details for creation
type properties required title
object
body postId isPrivate parentId mentions
type description example maxLength
string
Comment body text
This is a thoughtful comment about the post
8000
type description example
number
ID of the post this comment belongs to
123
type default description example
boolean
false
Whether the comment is private
false
type description example
number
ID of the parent comment (for replies)
456
description type items
User mentions in the comment
array
type properties required title
object
marker userId displayName
type pattern example
string
/{{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}}}/
{{9e639c0f-e02f-c32f-b0ae-e0d8c8d80b2d}}
type
string
type
string
marker
userId
displayName
UserMentionAttributes
body
postId
isPrivate
CreateCommentDto
comment
CreateCommentBody
201 400 401 404
description content
Comment created
application/json
schema
type properties required title
object
comment success
type properties required title
object
id postId authorId parentId isPrivate body createdAt updatedAt toxicityScore repliesCount likesCount reported removed hidden languageId languageName moderationStatus author mentions tags
type
number
type
number
type
string
type
number
type default
boolean
false
type
string
format type
date-time
string
format type
date-time
string
type
number
type default
number
0
type default
number
0
type default
boolean
false
type default
boolean
false
type default
boolean
false
type
number
type
string
type
number
type properties required title
object
postsCount avatarUrls id username verified firstName lastName memberType
type
number
type properties
object
small medium large
required type
true
string
required type
true
string
required type
true
string
type
string
type
string
type default
boolean
false
type
string
type
string
type
number
avatarUrls
id
CommentAuthor
type items
array
type properties required title
object
postsCount avatarUrls id username verified firstName lastName memberType locations followersCount displayName
type
number
type properties
object
small medium large
required type
true
string
required type
true
string
required type
true
string
type
string
type
string
type default
boolean
false
type
string
type
string
type
number
type
object
type
number
type
string
avatarUrls
id
locations
followersCount
UserWithMentionLocations
type items
array
type properties required title
object
language id name commentsCount
type
string
type
number
type
string
type
number
id
CommentTag
id
postId
authorId
parentId
isPrivate
body
createdAt
updatedAt
Comment
type
boolean
comment
success
CreateCommentResponse
description
Invalid comment - empty body or invalid postId
description
User not authenticated
description
Post or parent comment not found
Comments
url description
Pre-production Server
url description
Production Server
post
/v1/comments
x-auth-token x-client-id
x-auth-token x-client-id
type in name description
apiKey
header
x-auth-token
The JWT access token required for accessing the endpoints.
type in name description
apiKey
header
x-client-id
Your client id
comment
body postId isPrivate parentId mentions
This is a thoughtful comment about the post
123
false
456
marker userId displayName
{{9e639c0f-e02f-c32f-b0ae-e0d8c8d80b2d}}
string
string
title version description
User-related APIs
1.0.0
Quran.Foundation user-related APIs enable your app to seamlessly integrate with Quran.Foundation's user-centric features, providing access to personalized notes, bookmarks, goals, streaks, reading sessions, and more. This differentiates them from [content APIs](/docs/category/content-apis) that focus on non-user-specific resources like translations, tafsirs, and verses. ## How to get access We are using OAuth2 flows to authenticate and authorize requests. To get started, you need to [get an access token](/docs/tutorials/oidc/getting-started-with-oauth2#obtaining-oauth-20-client-credentials) to make requests to our APIs. Then follow the steps mentioned [here](/docs/tutorials/oidc/getting-started-with-oauth2). ## Pagination We are using cursor based pagination. The pagination query params consist of `first`,`after`, `before` and `last`. Example - `first: 10` will give you first 10 items - `first: 10, after: xyz` will give you first 10 items after the item with id `xyz` - `last: 10` will give you the last 10 items - `last: 10, before: xyz` will give you the last 10 items before the item with id `xyz` The only possible combinations are `first + after` or `last + before`. They should not be used together
name description url header method body
Create a new comment
content type
Add a comment to a post or reply to an existing comment. Supports mentions and notifies the post author.
text/plain
path host query variable
v1
comments
{{baseUrl}}
key value
Content-Type
application/json
key value
Accept
application/json
POST
mode raw options
raw
""
raw
language
json
sidebar_class_name post api-method
info_path docs/user_related_apis_prelive/user-related-apis
custom_edit_url

import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; import ParamsItem from "@theme/ParamsItem"; import ResponseSamples from "@theme/ResponseSamples"; import SchemaItem from "@theme/SchemaItem"; import SchemaTabs from "@theme/SchemaTabs"; import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import TabItem from "@theme/TabItem";

Create a new comment

Add a comment to a post or reply to an existing comment. Supports mentions and notifies the post author.

<TabItem label={"application/json"} value={"application/json-schema"}>

Details<summary style={{"textAlign":"left"}}>Request Body<strong style={{"fontSize":"var(--ifm-code-font-size)","color":"var(--openapi-required)"}}> required<div style={{"textAlign":"left","marginLeft":"1rem"}}><div style={{"marginTop":"1rem","marginBottom":"1rem"}}>

Comment with postId and optional parentId

    comment object
    mentions object[]

    User mentions in the comment

  • Array [
  • ]

Comment created

Schema
    comment object required
    author object
    avatarUrls object required
    mentions object[]
  • Array [
  • avatarUrls object required
  • ]
  • tags object[]
  • Array [
  • ]

Invalid comment - empty body or invalid postId

User not authenticated

Post or parent comment not found