Skip to content

Node.js based forum software built for the modern web

2.8 KB
Raw Blame
get:
  tags:
     - topics
  summary: get topic crossposts
  description: This operation retrieves a list of crossposts for the requested topic
  parameters:
    - in: path
      name: tid
      schema:
        type: string
      required: true
      description: a valid topic id
      example: 1
  responses:
    '200':
      description: Topic crossposts retrieved
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: ../../../components/schemas/Status.yaml#/Status
              response:
                type: object
                properties:
                  crossposts:
                    $ref: ../../../components/schemas/CrosspostObject.yaml#/CrosspostsArray
post:
  tags:
    - topics
  summary: crosspost a topic
  description: This operation crossposts a topic to another category.
  parameters:
    - in: path
      name: tid
      schema:
        type: string
      required: true
      description: a valid topic id
      example: 1
  requestBody:
    required: true
    content:
      application/json:
        schema:
          type: object
          properties:
            cid:
              type: number
              example: 1
  responses:
    '200':
      description: Topic successfully crossposted
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: ../../../components/schemas/Status.yaml#/Status
              response:
                type: object
                properties:
                  crossposts:
                    $ref: ../../../components/schemas/CrosspostObject.yaml#/CrosspostsArray
delete:
  tags:
    - topics
  summary: uncrossposts a topic
  description: This operation uncrossposts a topic from a category.
  parameters:
    - in: path
      name: tid
      schema:
        type: string
      required: true
      description: a valid topic id
      example: 1
    - in: query
      name: cid
      schema:
        type: integer
      required: false
      description: Category ID of the crosspost to remove (alternative to request body)
      example: 1
  requestBody:
    required: false
    content:
      application/json:
        schema:
          type: object
          properties:
            cid:
              type: number
              example: 1
  responses:
    '200':
      description: Topic successfully uncrossposted
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: ../../../components/schemas/Status.yaml#/Status
              response:
                type: object
                properties:
                  crossposts:
                    $ref: ../../../components/schemas/CrosspostObject.yaml#/CrosspostsArray