example-data.com
Menu
Browse docs and collections

Overview

reactions / #1555

Activity #1555

User #208 reacted angry post #47

8/22/2024, 8:41:36 PM

Component variants

Medium
Small

User #208 reacted angry post #47 · 8/22/2024, 8:41:36 PM

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/reactions/1555"
);
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/1555"
);
const reaction = (await res.json()) as Reaction;

Python example

import requests

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

Response

{
  "id": 1555,
  "userId": 208,
  "targetType": "post",
  "targetId": 47,
  "type": "angry",
  "createdAt": "2024-08-22T20:41:36.711Z"
}