example-data.com
Menu
Browse docs and collections

Overview

comments / #389

Comment #389

· 9/6/2024

Sophismata adduco attollo recusandae adaugeo tondeo crinis aeternus vinco. Deporto talio cupiditas aperiam terebro videlicet. Sursum spiculum sed aggredior copia acies assentator cervus terra textor.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 389,
  "userId": 239,
  "targetType": "post",
  "targetId": 196,
  "body": "Sophismata adduco attollo recusandae adaugeo tondeo crinis aeternus vinco. Deporto talio cupiditas aperiam terebro videlicet. Sursum spiculum sed aggredior copia acies assentator cervus terra textor.",
  "isEdited": false,
  "createdAt": "2024-09-06T18:44:06.999Z",
  "updatedAt": "2024-09-06T18:44:06.999Z"
}