အသိပေးချက် inbox
သင့်အက်ပလီကေးရှင်းအတွင်း အသုံးပြုသူထံ ပို့ခဲ့သော အသိပေးချက်များကို ပြန်ပေးသည် — အက်ပ်တွင်း “မက်ဆေ့ချ်များ” မျက်နှာပြင်၏ နောက်ကွယ်ရှိ ဒေတာ။
GET /api/push/notifications?externalUserId=operator-497&limit=50&offset=0
X-Push-App-Key: <application key>
Query ပါရာမီတာများ
| ပါရာမီတာ | လိုအပ်မှု | မှတ်ချက် |
|---|---|---|
externalUserId | ဟုတ် | မှတ်ပုံတင်ချိန်တွင် သုံးသော namespace ပါ အသုံးပြုသူ id။ |
limit | မလို | စာမျက်နှာအရွယ်အစား။ |
offset | မလို | စာမျက်နှာခွဲ offset။ |
from | မလို | ISO-8601 ရက်စွဲအပိုင်းအခြား၏ အစ။ |
to | မလို | ISO-8601 ရက်စွဲအပိုင်းအခြား၏ အဆုံး။ |
status | မလို | အသိပေးချက်အခြေအနေအလိုက် စစ်ထုတ်ရန်။ |
မသုံးမီ တုံ့ပြန်မှုကို ပုံမှန်ဖြစ်အောင် လုပ်ပါ
တုံ့ပြန်မှုသည် ရိုးရိုး array သို့မဟုတ် စာမျက်နှာခွဲ envelope ဖြစ်နိုင်သည်။ ယခင်ဗားရှင်းတစ်ခုသည် ကုန်ကြမ်းကိုယ်ထည်ကို .filter သို့ တိုက်ရိုက်ပေးခဲ့ပြီး array မဟုတ်သောအခါ အသိပေးချက်ဗဟိုဌာနတစ်ခုလုံး ပျက်သွားခဲ့သည်။
const toArray = (data: any) =>
Array.isArray(data) ? data
: Array.isArray(data?.items) ? data.items
: Array.isArray(data?.data) ? data.data
: Array.isArray(data?.notifications) ? data.notifications
: Array.isArray(data?.result) ? data.result
: [];