Manage a campaign by API token: read it with its delivery, change it, delete it - #238
Merged
Conversation
… delete it GET/PATCH/DELETE /api/ads/v1/campaigns/[id], by id or ref slug. GET carries the stats view (impressions, clicks, spend, the free halves) plus the visits the tracker attributed to the campaign on the caller's own sites, by day. PATCH takes name, daily_budget_cents, bid_credits and status; going active needs a ready creative, as in the dashboard. DELETE removes it, metering included. The CLI gains ads show|pause|resume|budget|delete. This is what the myna plugin uses so a post's ad can be managed from the terminal it was posted from. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YafYxayh7Gqe5MWNNQMev2
ThreatCrush Security Scan39 finding(s) HIGH/CRITICAL: 2 | MEDIUM: 28 | LOW: 9
Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #235/#237. One campaign, by id or ref slug (
crawlproof-ad-144):/api/ads/v1/campaigns/[id]— the campaign plusstats: thead_campaign_statsview (impressions, clicks, spend, free halves) and the visits the tracker attributed to it (ad:<ref>bucket) on the caller's own projects, by day.name,daily_budget_cents,bid_credits,status(active | paused | draft). Going active needs a ready creative, the dashboard's rule.crawlproof ads show|pause|resume|budget|delete <ref-or-id>(deleteneeds--yes).Tests for the patch parser; typecheck clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YafYxayh7Gqe5MWNNQMev2