example-data.com
Menu
Browse docs and collections

Overview

comments / #451

Comment #451

· 11/3/2024

Inventore tollo xiphias vergo sortitus.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 451,
  "userId": 202,
  "targetType": "post",
  "targetId": 252,
  "body": "Inventore tollo xiphias vergo sortitus.",
  "isEdited": false,
  "createdAt": "2024-11-03T18:51:01.654Z",
  "updatedAt": "2024-11-03T18:51:01.654Z"
}