example-data.com
Menu
Browse docs and collections

Overview

comments / #545

Comment #545

· 11/12/2024

Quod cur substantia demonstro validus sunt usitas clam voluptatibus. Cilicium aeternus acies ceno cometes abstergo. Reiciendis creator tibi voluptatum despecto adimpleo argentum urbanus texo. Delego deleniti aliquam verbera charisma stipes aptus theologus tres strues.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 545,
  "userId": 68,
  "targetType": "post",
  "targetId": 219,
  "body": "Quod cur substantia demonstro validus sunt usitas clam voluptatibus. Cilicium aeternus acies ceno cometes abstergo. Reiciendis creator tibi voluptatum despecto adimpleo argentum urbanus texo. Delego deleniti aliquam verbera charisma stipes aptus theologus tres strues.",
  "isEdited": false,
  "createdAt": "2024-11-12T15:08:24.292Z",
  "updatedAt": "2024-11-12T15:08:24.292Z"
}