Skip to content

feat(x): add typed X API v2 client, cached metrics with freshness TTL… - #1114

Merged
Akanimoh12 merged 1 commit into
Akanimoh12:test-implement-dripsfrom
Mikey-222:feat/x-cached-metrics-handle
Jul 25, 2026
Merged

feat(x): add typed X API v2 client, cached metrics with freshness TTL…#1114
Akanimoh12 merged 1 commit into
Akanimoh12:test-implement-dripsfrom
Mikey-222:feat/x-cached-metrics-handle

Conversation

@Mikey-222

Copy link
Copy Markdown
Contributor

SUMMARY

  • Add XApiClient with getUserByHandle and getUserById (X API v2)
  • Add fetchAndRefreshXMetrics with 30-min freshness TTL
  • Update refreshXMetrics to iterate linked handles via Promise.allSettled
  • Add x.types.ts, x.schema.ts, x.controller.ts, x.routes.ts
  • Add x.fixtures.ts for test data
  • Add notifications module with list/get/markRead/markAllRead endpoints
  • Add full OpenAPI path definitions for all new endpoints
  • Wire up routers in app.ts
  • All tests mocked (no real network calls)

Description

Closes #

Type of Change

Please mark the options that are relevant:

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🧪 Tests (adding new tests or updating existing tests)
  • 📝 Documentation (changes to documentation/configs only)
  • 🚀 DevOps & CI/CD (changes to workflows, scripts, or templates)

Changes Made

  • C

How to Test

Checklist

💻 Smart Contract Changes (if applicable)

  • Running cargo fmt -- --check passes successfully.
  • Running cargo clippy -- -D warnings runs without any warnings.
  • All tests pass successfully using cargo test.
  • New unit or integration tests have been written to cover the changes.
  • No hardcoded values are present (e.g. addresses, fees) that should be configurable.

🎨 Frontend Changes (if applicable)

  • TypeScript compiles cleanly with no errors (npm run typecheck or npx tsc --noEmit).
  • Running npm run lint shows no linting errors.
  • The production build compiles successfully via npm run build.
  • Changes verified on local browser environment with Freighter/xBull/Albedo wallet.
  • Responsive design verified (tested on mobile, tablet, and desktop viewport sizes).
  • Keyboard navigation and accessibility (a11y) considerations are addressed.

⚙️ General

…, and notifications API docs

- Add XApiClient with getUserByHandle and getUserById (X API v2)
- Add fetchAndRefreshXMetrics with 30-min freshness TTL
- Update refreshXMetrics to iterate linked handles via Promise.allSettled
- Add x.types.ts, x.schema.ts, x.controller.ts, x.routes.ts
- Add x.fixtures.ts for test data
- Add notifications module with list/get/markRead/markAllRead endpoints
- Add full OpenAPI path definitions for all new endpoints
- Wire up routers in app.ts
- All tests mocked (no real network calls)
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@Mikey-222 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Akanimoh12
Akanimoh12 merged commit 53deced into Akanimoh12:test-implement-drips Jul 25, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

X: X metrics endpoint GET /x/:handle/metrics X: Cache X metrics (XAccount + Redis) X: X API client wrapper Notifications: Notifications API docs

2 participants