example-data.com
Menu
Browse docs and collections

Overview

reactions / #211

Activity #211

User #235 reacted angry post #398

11/28/2024, 5:52:38 AM

Component variants

Medium
Small

User #235 reacted angry post #398 · 11/28/2024, 5:52:38 AM

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/reactions/211"
);
const reaction = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/reactions.d.ts https://example-data.com/types/reactions.d.ts
import type { Reaction } from "./types/reactions";

const res = await fetch(
  "https://example-data.com/api/v1/reactions/211"
);
const reaction = (await res.json()) as Reaction;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/reactions/211"
)
reaction = res.json()

Response

{
  "id": 211,
  "userId": 235,
  "targetType": "post",
  "targetId": 398,
  "type": "angry",
  "createdAt": "2024-11-28T05:52:38.386Z"
}