💬
کامنتها
۵۰۰ کامنت فارسی با اسامی واقعی ایرانی
۵۰۰
تعداد کل
4
فیلد
ساختار داده
| فیلد | نوع | توضیح | الزامی |
|---|---|---|---|
postId | number | postId | ✓ الزامی |
name | string | نام | ✓ الزامی |
email | string | ایمیل | ✓ الزامی |
body | string | متن | ✓ الزامی |
Endpoints
روی هر endpoint کلیک کن تا تست کنی
مثال استفاده
// دریافت کامنتهای یک پست
const res = await fetch('https://api.codeloop.ir/api/fake/posts/1/comments')
const { data } = await res.json()
console.log(data[0])
// { id: 1, postId: 1, name: "علی رضایی", email: "ali@mail.ir", body: "..." }
// فیلتر بر اساس postId
const res2 = await fetch('https://api.codeloop.ir/api/fake/comments?postId=1')
// ایجاد کامنت (شبیهسازی)
const res3 = await fetch('https://api.codeloop.ir/api/fake/comments', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ postId: 1, name: 'زهرا', email: 'z@mail.ir', body: 'عالی!' })
})دادههای واقعی
فیلتر: