example-data.com
Menu
Browse docs and collections

Overview

comments / #957

Comment #957

· 12/11/2024

Corroboro cibo commodo vehemens decens aeger tres quisquam conturbo templum. Bibo hic volubilis omnis blanditiis sponte aut cursus artificiose tripudio. Spoliatio conitor terebro cur somniculosus cattus adicio vis caries harum.

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 957,
  "userId": 204,
  "targetType": "post",
  "targetId": 266,
  "body": "Corroboro cibo commodo vehemens decens aeger tres quisquam conturbo templum. Bibo hic volubilis omnis blanditiis sponte aut cursus artificiose tripudio. Spoliatio conitor terebro cur somniculosus cattus adicio vis caries harum.",
  "isEdited": false,
  "createdAt": "2024-12-11T09:57:47.594Z",
  "updatedAt": "2024-12-11T09:57:47.594Z"
}