Fix TikTok sync payload to match Arbiter API

- Use platform_post_id + metrics object for sync endpoint
- Use total_followers for snapshot endpoint

Chronicler #76
This commit is contained in:
Claude
2026-04-10 22:15:24 +00:00
parent 942335156f
commit 21b6fa9788

View File

@@ -65,7 +65,7 @@ sync_account_stats() {
curl -s -X POST "$ARBITER_URL/snapshot" \
-H "Authorization: Bearer $ARBITER_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"platform\":\"tiktok\",\"handle\":\"playfirefrost\",\"followers\":$FOLLOWERS,\"following\":$FOLLOWING,\"posts\":$VIDEOS}" > /dev/null
-d "{\"platform\":\"tiktok\",\"total_followers\":$FOLLOWERS}" > /dev/null
echo " Account snapshot synced"
}
@@ -94,7 +94,7 @@ sync_videos() {
curl -s -X POST "$ARBITER_URL/sync" \
-H "Authorization: Bearer $ARBITER_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"platform\":\"tiktok\",\"post_url\":\"$POST_URL\",\"views\":$VIEWS,\"likes\":$LIKES,\"comments\":$COMMENTS,\"shares\":$SHARES}" > /dev/null
-d "{\"platform\":\"tiktok\",\"platform_post_id\":\"$VID\",\"post_url\":\"$POST_URL\",\"metrics\":{\"views\":$VIEWS,\"likes\":$LIKES,\"comments\":$COMMENTS,\"shares\":$SHARES}}" > /dev/null
echo " $VID: $VIEWS views, $LIKES likes"
done