example-data.com
Menu
Browse docs and collections

Overview

comments / #1205

Comment #1205

· 11/7/2024

Abduco congregatio adhuc cinis defero. Volubilis denego admiratio copiose sophismata degero thymum degusto degenero. Utrum uberrime voluptates terebro deinde subvenio theca animadverto aequitas.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 1205,
  "userId": 229,
  "targetType": "post",
  "targetId": 224,
  "body": "Abduco congregatio adhuc cinis defero. Volubilis denego admiratio copiose sophismata degero thymum degusto degenero. Utrum uberrime voluptates terebro deinde subvenio theca animadverto aequitas.",
  "isEdited": false,
  "createdAt": "2024-11-07T02:54:43.466Z",
  "updatedAt": "2024-11-07T02:54:43.466Z"
}