نسخه آزمایشی
همه‌ی راهنماها

هر سکوی دیگر (پروتکل)

اگر اتصال را خودتان می‌نویسید، سایت باید به چه چیزی پاسخ دهد.

نشانی‌هایی که صدا می‌زنیم

GET  /api/ve/articles?limit=500   -> { "articles": [ { "title", "slug", "summary" } ] }
GET  /api/ve/news?limit=500       -> { "news": [ ... ] }
GET  /api/ve/languages            -> { "languages": ["nl","en"], "default": "nl" }   (404 = one language)
POST /api/ve/articles             -> { "id": "...", "url": "https://..." }
POST /api/ve/news                 -> { "id": "...", "url": "https://..." }

هر درخواست را بررسی کنید

اگر امضا درست نباشد یا زمان بیش از ۵ دقیقه قدیمی باشد با 401 رد کنید. مقایسه را با زمان ثابت انجام دهید.

X-VE-Timestamp: <unix seconds>
X-VE-Signature: v1=hex( HMAC-SHA256( key, "{timestamp}.{METHOD}.{path and query}.{sha256hex(body)}" ) )
X-VE-Idempotency-Key: <the same for a repeated delivery; store it once>

آنچه می‌رسد

{
  "title": "...", "slug": "a-z-0-9", "metaDescription": "...",   // news: "summary", "region", "category", "sources"
  "bodyMarkdown": "...", "language": "nl", "tags": ["..."], "publish": false,
  "coverImage": { "fileName": "x.png", "contentType": "image/png", "alt": "...", "dataBase64": "..." },
  "languages": ["nl","en"],
  "translations": { "en": { "title", "slug", "metaDescription", "bodyMarkdown", "tags", "coverImageAlt" } }
}