example-data.com
Menu
Browse docs and collections

Overview

comments / #361

Comment #361

· 6/23/2024

Tubineus thema caute vestigium advoco crux contra pecco. Placeat venio arcesso deinde constans thymbra. Totus valeo sursum.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 361,
  "userId": 81,
  "targetType": "post",
  "targetId": 425,
  "body": "Tubineus thema caute vestigium advoco crux contra pecco. Placeat venio arcesso deinde constans thymbra. Totus valeo sursum.",
  "isEdited": false,
  "createdAt": "2024-06-23T05:17:10.080Z",
  "updatedAt": "2024-06-23T05:17:10.080Z"
}