example-data.com
Menu
Browse docs and collections

Overview

comments / #815

Comment #815

· 12/13/2024

Cumque verbum depulso. Victoria aedificium sursum vis coadunatio aperiam somnus sortitus vulnus. Vere temeritas vito.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 815,
  "userId": 172,
  "targetType": "post",
  "targetId": 201,
  "body": "Cumque verbum depulso. Victoria aedificium sursum vis coadunatio aperiam somnus sortitus vulnus. Vere temeritas vito.",
  "isEdited": false,
  "createdAt": "2024-12-13T02:22:15.436Z",
  "updatedAt": "2024-12-13T02:22:15.436Z"
}