example-data.com
Menu
Browse docs and collections

Overview

comments / #121

Comment #121

· 10/17/2024

Crinis beneficium nisi civis necessitatibus delectus. Vorago astrum curriculum tibi amita vehemens deleniti altus torqueo.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 121,
  "userId": 227,
  "targetType": "post",
  "targetId": 69,
  "body": "Crinis beneficium nisi civis necessitatibus delectus. Vorago astrum curriculum tibi amita vehemens deleniti altus torqueo.",
  "isEdited": true,
  "createdAt": "2024-10-17T22:05:18.961Z",
  "updatedAt": "2024-10-28T05:06:32.894Z"
}