example-data.com
Menu
Browse docs and collections

Overview

comments / #660

Comment #660

· 7/5/2024

Civitas tyrannus iusto patior desparatus impedit crapula totus sortitus. Undique viridis pauci expedita surculus neque excepturi suffragium. Iste substantia theca abbas. Quia quibusdam aegrus.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 660,
  "userId": 89,
  "targetType": "post",
  "targetId": 127,
  "body": "Civitas tyrannus iusto patior desparatus impedit crapula totus sortitus. Undique viridis pauci expedita surculus neque excepturi suffragium. Iste substantia theca abbas. Quia quibusdam aegrus.",
  "isEdited": false,
  "createdAt": "2024-07-05T12:12:40.369Z",
  "updatedAt": "2024-07-05T12:12:40.369Z"
}