example-data.com
Menu
Browse docs and collections

Overview

comments / #478

Comment #478

· 10/6/2024

Thalassinus balbus angelus vix carbo officia. Eos angelus volubilis nostrum caelestis occaecati fugit cura cogo degusto. Desino cibo avaritia cogito cursus caelum cervus tenus quisquam.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 478,
  "userId": 147,
  "targetType": "post",
  "targetId": 106,
  "body": "Thalassinus balbus angelus vix carbo officia. Eos angelus volubilis nostrum caelestis occaecati fugit cura cogo degusto. Desino cibo avaritia cogito cursus caelum cervus tenus quisquam.",
  "isEdited": false,
  "createdAt": "2024-10-06T02:41:14.025Z",
  "updatedAt": "2024-10-06T02:41:14.025Z"
}