example-data.com
Menu
Browse docs and collections

Overview

comments / #798

Comment #798

· 1/7/2025

Coma sophismata adiuvo adsuesco centum conculco. Vulgaris arcus tabella depromo pariatur ratione neque. Auctus reiciendis alioqui spiritus articulus vulgo cauda audax facere civis.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 798,
  "userId": 173,
  "targetType": "post",
  "targetId": 307,
  "body": "Coma sophismata adiuvo adsuesco centum conculco. Vulgaris arcus tabella depromo pariatur ratione neque. Auctus reiciendis alioqui spiritus articulus vulgo cauda audax facere civis.",
  "isEdited": false,
  "createdAt": "2025-01-07T14:46:28.115Z",
  "updatedAt": "2025-01-07T14:46:28.115Z"
}