example-data.com
Menu
Browse docs and collections

Overview

comments / #746

Comment #746

· 8/13/2024

Surculus consequuntur calamitas theca demulceo vulgivagus crur. Arma deputo argentum tamdiu cibo absque tui. Atqui eligendi tubineus toties. Vox ubi tergo adulescens constans ascit velum attonbitus.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 746,
  "userId": 102,
  "targetType": "post",
  "targetId": 155,
  "body": "Surculus consequuntur calamitas theca demulceo vulgivagus crur. Arma deputo argentum tamdiu cibo absque tui. Atqui eligendi tubineus toties. Vox ubi tergo adulescens constans ascit velum attonbitus.",
  "isEdited": false,
  "createdAt": "2024-08-13T07:09:18.143Z",
  "updatedAt": "2024-08-13T07:09:18.143Z"
}