fix: correct remaining 5 API issues from codex review
- meta-ads: use empty array for special_ad_categories (not ['NONE']) - ahrefs: add --target validation to all 5 site-explorer commands - wistia: read SRT file contents from disk for captions create - tiktok-ads: use URLSearchParams for cleaner URL construction - mixpanel: require --from-date/--to-date for retention, add --event filter for export Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -221,7 +221,10 @@ async function main() {
|
||||
if (!id) { result = { error: '--id required (media hashed ID)' }; break }
|
||||
if (!language) { result = { error: '--language required (e.g. eng)' }; break }
|
||||
const body = { language }
|
||||
if (args['srt-file']) body.caption_file = args['srt-file']
|
||||
if (args['srt-file']) {
|
||||
const fs = require('fs')
|
||||
body.caption_file = fs.readFileSync(args['srt-file'], 'utf8')
|
||||
}
|
||||
result = await api('POST', `/medias/${id}/captions.json`, body)
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user