example-data.com
Menu
Browse docs and collections

Overview

comments / #450

Comment #450

· 11/20/2024

Commodi colo alias quas alveus aufero vero acervus corpus. Spectaculum congregatio laudantium desino decens textus. Nihil super surgo trado. Ultra veritas curia surculus suus.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 450,
  "userId": 100,
  "targetType": "post",
  "targetId": 330,
  "body": "Commodi colo alias quas alveus aufero vero acervus corpus. Spectaculum congregatio laudantium desino decens textus. Nihil super surgo trado. Ultra veritas curia surculus suus.",
  "isEdited": false,
  "createdAt": "2024-11-20T23:45:11.989Z",
  "updatedAt": "2024-11-20T23:45:11.989Z"
}