Skip to content

feat: cut scrapeSocial caller to /api/socials/{id}/scrape with x-api-key#144

Merged
sweetmantech merged 1 commit intomainfrom
feat/migrate-social-scrape-caller
Apr 21, 2026
Merged

feat: cut scrapeSocial caller to /api/socials/{id}/scrape with x-api-key#144
sweetmantech merged 1 commit intomainfrom
feat/migrate-social-scrape-caller

Conversation

@arpitgupta1214
Copy link
Copy Markdown
Collaborator

@arpitgupta1214 arpitgupta1214 commented Apr 20, 2026

Cuts scrapeSocial over to ${NEW_API_BASE_URL}/api/socials/{id}/scrape with x-api-key: RECOUP_API_KEY auth; drops social_id from the body (now in the path). Response schema unchanged.

Test plan

  • Smoke: scrapeAndPollSocials against a known-scrapable social_id round-trips a valid runId/datasetId through pollScraperResults
  • Smoke: non-existent social_id yields 404 and scrapeSocial returns undefined; batch continues
  • Smoke: unsupported platform yields 400 and batch continues

- Repoint URL from https://api.recoupable.com/api/social/scrape to
  `${NEW_API_BASE_URL}/api/socials/${socialId}/scrape` (nested RESTful path).
- Send `x-api-key: RECOUP_API_KEY` auth header; guard undefined key.
- Drop `social_id` from request body (id now lives in the path).

Response schema `{ runId, datasetId }` unchanged — parity holds with the
mono-hosted handler at `api/lib/socials/postSocialScrapeHandler.ts`.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Warning

Rate limit exceeded

@arpitgupta1214 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 15 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 15 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4c5d4bac-7f96-4ccc-b5e4-b7b79da2cc45

📥 Commits

Reviewing files that changed from the base of the PR and between da35314 and 7ac82ae.

📒 Files selected for processing (1)
  • src/recoup/scrapeSocial.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/migrate-social-scrape-caller

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@arpitgupta1214 arpitgupta1214 marked this pull request as ready for review April 20, 2026 23:49
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@sweetmantech sweetmantech merged commit 242d1b5 into main Apr 21, 2026
3 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.

2 participants