example-data.com
Menu
Browse docs and collections

Overview

comments / #926

Comment #926

· 8/6/2024

Unus cito vulgaris confido tenuis audentia tersus amor recusandae tabesco. Caelum solutio casso thema solitudo arto tredecim terreo adiuvo. Admitto cattus angustus voluntarius.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 926,
  "userId": 168,
  "targetType": "post",
  "targetId": 483,
  "body": "Unus cito vulgaris confido tenuis audentia tersus amor recusandae tabesco. Caelum solutio casso thema solitudo arto tredecim terreo adiuvo. Admitto cattus angustus voluntarius.",
  "isEdited": false,
  "createdAt": "2024-08-06T09:34:37.225Z",
  "updatedAt": "2024-08-06T09:34:37.225Z"
}