example-data.com
Menu
Browse docs and collections

Overview

comments / #1002

Comment #1002

· 9/25/2024

Ater utor truculenter thymbra magnam amor. Caecus repellendus maiores denego tertius. Sollicito vulgus temeritas vallum crur angulus theologus validus ventus. Bos comptus creptio termes dolor vinco sui verumtamen varius vado.

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/comments/1002"
);
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/1002"
);
const comment = (await res.json()) as Comment;

Python example

import requests

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

Response

{
  "id": 1002,
  "userId": 236,
  "targetType": "post",
  "targetId": 447,
  "body": "Ater utor truculenter thymbra magnam amor. Caecus repellendus maiores denego tertius. Sollicito vulgus temeritas vallum crur angulus theologus validus ventus. Bos comptus creptio termes dolor vinco sui verumtamen varius vado.",
  "isEdited": false,
  "createdAt": "2024-09-25T04:38:44.576Z",
  "updatedAt": "2024-09-25T04:38:44.576Z"
}