example-data.com
Menu
Browse docs and collections

Overview

comments / #59

Comment #59

· 5/30/2024

Aeneus vehemens desipio cervus arbitro abbas crur. Architecto dapifer subseco venustas solum hic carmen considero textor adulescens. Defero defungo iure quam cura creta ulciscor tam argumentum damnatio. Placeat antepono spiritus benevolentia tactus.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 59,
  "userId": 3,
  "targetType": "post",
  "targetId": 313,
  "body": "Aeneus vehemens desipio cervus arbitro abbas crur. Architecto dapifer subseco venustas solum hic carmen considero textor adulescens. Defero defungo iure quam cura creta ulciscor tam argumentum damnatio. Placeat antepono spiritus benevolentia tactus.",
  "isEdited": false,
  "createdAt": "2024-05-30T21:24:47.890Z",
  "updatedAt": "2024-05-30T21:24:47.890Z"
}