example-data.com
Menu
Browse docs and collections

Overview

reactions / #2635

Activity #2635

User #211 reacted laugh post #243

6/22/2024, 1:00:33 AM

Component variants

Medium
Small

User #211 reacted laugh post #243 · 6/22/2024, 1:00:33 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 2635,
  "userId": 211,
  "targetType": "post",
  "targetId": 243,
  "type": "laugh",
  "createdAt": "2024-06-22T01:00:33.583Z"
}