example-data.com
Menu
Browse docs and collections

Overview

comments / #274

Comment #274

· 12/17/2024

Vitae coma canis ciminatio incidunt quod articulus tutamen tribuo solus. Cupiditas aperiam auctus cometes utique placeat alius cohaero quisquam. Cognatus culpo tum utpote beneficium tristis strues.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 274,
  "userId": 225,
  "targetType": "post",
  "targetId": 308,
  "body": "Vitae coma canis ciminatio incidunt quod articulus tutamen tribuo solus. Cupiditas aperiam auctus cometes utique placeat alius cohaero quisquam. Cognatus culpo tum utpote beneficium tristis strues.",
  "isEdited": false,
  "createdAt": "2024-12-17T01:49:53.921Z",
  "updatedAt": "2024-12-17T01:49:53.921Z"
}