How david-fernando/medium-posts-api works
Medium Posts API exposes a GET endpoint that accepts a Medium username and returns post metadata as JSON. The handler fetches RSS-converted data through rss2json, then formats post fields, sanitizes descriptions, and extracts thumbnails before responding. The README documents the endpoint and placeholder-image behavior; the graph follows the sampled implementation and does not infer the external service’s internal fetching behavior.
Main entry points: [usermedium].ts Username endpoint · returnJsonPosts.tsx Post formatter · returnJsonData.tsx RSS data fetch · editText.tsx Description cleaner
Components 7
API
- Username endpoint
pages/api/[usermedium].ts - RSS data fetch
utils/returnJsonData.tsx
Post formatting
- Post formatter
utils/returnJsonPosts.tsx - Description cleaner
utils/editText.tsx - Thumbnail extractor
utils/returnThumbnail.tsx
Other components
- API client
- rss2json API
Connections 7
- API client → Username endpoint: requests GET
README.md - Username endpoint → RSS data fetch: fetches posts
pages/api/[usermedium].ts - RSS data fetch → rss2json API: requests conversion
utils/returnJsonData.tsx - Username endpoint → Post formatter: formats response
pages/api/[usermedium].ts - Post formatter → Description cleaner: cleans descriptions
utils/returnJsonPosts.tsx - Post formatter → Thumbnail extractor: extracts images
utils/returnJsonPosts.tsx - Username endpoint → API client: returns JSON
pages/api/[usermedium].ts