example-data.com
Menu
Browse docs and collections

Overview

comments / #497

Comment #497

· 11/23/2024

Virgo utor votum derelinquo. Quam textor vacuus thesaurus soluta inventore centum caterva curto. Atque callide statua cras crustulum nesciunt caecus. Absque ratione tergo placeat.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 497,
  "userId": 14,
  "targetType": "post",
  "targetId": 32,
  "body": "Virgo utor votum derelinquo. Quam textor vacuus thesaurus soluta inventore centum caterva curto. Atque callide statua cras crustulum nesciunt caecus. Absque ratione tergo placeat.",
  "isEdited": false,
  "createdAt": "2024-11-23T03:48:32.014Z",
  "updatedAt": "2024-11-23T03:48:32.014Z"
}