example-data.com
Menu
Browse docs and collections

Overview

comments / #199

Comment #199

· 8/8/2024

Conor carus cado confido crur arcus annus velit ver illum. Tubineus cavus tubineus correptius ancilla conventus dolore vorago.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 199,
  "userId": 56,
  "targetType": "post",
  "targetId": 86,
  "body": "Conor carus cado confido crur arcus annus velit ver illum. Tubineus cavus tubineus correptius ancilla conventus dolore vorago.",
  "isEdited": false,
  "createdAt": "2024-08-08T09:37:57.571Z",
  "updatedAt": "2024-08-08T09:37:57.571Z"
}