example-data.com
Menu
Browse docs and collections

Overview

comments / #30

Comment #30

· 9/22/2024

Summisse sursum cubo villa omnis adeo ubi verbum magnam sulum. Spero cupio cui uterque subvenio contra vesper depono ante. Auditor solvo defaeco ager defungo nam admitto possimus aliquid.

Component variants

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/comments/30" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/comments/30"
);
const comment = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/comments.d.ts https://example-data.com/types/comments.d.ts
import type { Comment } from "./types/comments";

const res = await fetch(
  "https://example-data.com/api/v1/comments/30"
);
const comment = (await res.json()) as Comment;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/comments/30"
)
comment = res.json()

Response

{
  "id": 30,
  "userId": 9,
  "targetType": "post",
  "targetId": 225,
  "body": "Summisse sursum cubo villa omnis adeo ubi verbum magnam sulum. Spero cupio cui uterque subvenio contra vesper depono ante. Auditor solvo defaeco ager defungo nam admitto possimus aliquid.",
  "isEdited": false,
  "createdAt": "2024-09-22T02:30:11.283Z",
  "updatedAt": "2024-09-22T02:30:11.283Z"
}