📚post

Get information about published contents

Request Object

In a post action (not to be confused with HTTP POST method !) there must be two object:

  • filter : an object that describes the characteristics of the desired contents

  • select : an array containing content properties.

filter object

you can filter your content based of various options, these options will be applied together..

keyword
type
description

id

number

post unique id

it will be useful for selecting single content.

type

string

content type can only accepts sims OR videos don't send it if you want all content types.

class

string

content Scientific field options:ریاضی , فیزیک , زیست , علوم , شیمی

category

number

category id

relatedto

number

contents related to a post id

search

string

text based search in content

sort

string

sort content (DESC) can only accepts posts (default, based on posts id) , views , likes

limit

number

number of contents default is 20

offset

number

number of skipping contents

select array

you can choose which content properties should be returned in respond object.

keyword
description
respond object example

id

post unique id

title

post title

views

post views

likes

post likes

poster

Featured image for post in webp format

class

content Scientific field

category

content category id and name

date

post date

author

post author

tags

an array of tag objects

points

an array of education points of post

description

post description in HTML format

iframe

post iframe link

Import css files! description needs to be styled so you need to have these files on your page, also we don't hardcoded any fonts so feel free to use your own!

https://byazma.ir/res/css/quill2.min.css https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css

Respond Object

Similar to request object there is filter and select in respond object.

filter object

This contains useful information about filtered content.

keyword
type
description

count

number

number of total selectable contents

class

string[]

all unique class names in selectable contents

limit

number

number of contents default is 20

offset

number

number of skipping contents

category

object[]

array of all selectable contents category objects

select object

an array of post objects containing selected properties.

Example Request

request object
respond object

Last updated