example-data.com
Menu
Browse docs and collections

Overview

comments / #587

Comment #587

· 9/19/2024

Somnus stabilis qui copiose supellex pax nostrum adsidue tamisium. Doloribus vero claro occaecati bardus argentum. Advoco usitas velit tergiversatio coadunatio vivo tero cinis.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 587,
  "userId": 102,
  "targetType": "post",
  "targetId": 252,
  "body": "Somnus stabilis qui copiose supellex pax nostrum adsidue tamisium. Doloribus vero claro occaecati bardus argentum. Advoco usitas velit tergiversatio coadunatio vivo tero cinis.",
  "isEdited": false,
  "createdAt": "2024-09-19T21:34:18.168Z",
  "updatedAt": "2024-09-19T21:34:18.168Z"
}