example-data.com
Menu
Browse docs and collections

Overview

comments / #34

Comment #34

· 8/25/2024

Vorago utpote sophismata curso. Dolore cervus sequi termes appello delibero sunt magnam. Aurum accusantium combibo dignissimos balbus communis voluptas aut. Numquam accendo ipsa similique cado.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 34,
  "userId": 157,
  "targetType": "post",
  "targetId": 254,
  "body": "Vorago utpote sophismata curso. Dolore cervus sequi termes appello delibero sunt magnam. Aurum accusantium combibo dignissimos balbus communis voluptas aut. Numquam accendo ipsa similique cado.",
  "isEdited": true,
  "createdAt": "2024-08-25T17:13:07.140Z",
  "updatedAt": "2024-11-06T16:48:14.651Z"
}