example-data.com
Menu
Browse docs and collections

Overview

comments / #1049

Comment #1049

· 7/23/2024

Titulus minima blanditiis. Spoliatio assentator vomer triduana verus demitto cito atrocitas pax. Hic abbas audentia balbus desino denuo tondeo tepidus verbum defendo. Conitor adfero adsidue usitas adflicto adhaero solus argumentum surgo clarus.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 1049,
  "userId": 248,
  "targetType": "post",
  "targetId": 349,
  "body": "Titulus minima blanditiis. Spoliatio assentator vomer triduana verus demitto cito atrocitas pax. Hic abbas audentia balbus desino denuo tondeo tepidus verbum defendo. Conitor adfero adsidue usitas adflicto adhaero solus argumentum surgo clarus.",
  "isEdited": false,
  "createdAt": "2024-07-23T02:35:59.090Z",
  "updatedAt": "2024-07-23T02:35:59.090Z"
}