example-data.com
Menu
Browse docs and collections

Overview

comments / #1440

Comment #1440

· 6/8/2024

Ver magni volva commodi quo. Appositus ventus abundans venio sub harum pauci vacuus corona volaticus. Vespillo cursim terebro pariatur. Talis defendo umbra trans autus decens vetus.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 1440,
  "userId": 1,
  "targetType": "post",
  "targetId": 55,
  "body": "Ver magni volva commodi quo. Appositus ventus abundans venio sub harum pauci vacuus corona volaticus. Vespillo cursim terebro pariatur. Talis defendo umbra trans autus decens vetus.",
  "isEdited": false,
  "createdAt": "2024-06-08T05:59:03.567Z",
  "updatedAt": "2024-06-08T05:59:03.567Z"
}