Notifications
Lista wszystkich publicznie dostępnych metod interakcji z API.
GET
Get notifications -/user/notifications
Metoda zapytania
GEThttps://api.stableproxy.com/v2/user/notifications
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| mark-as-readNie koniecznie | nullableex-boolean | false |
| searchNie koniecznie | nullablestring | 191 |
| per-pageNie koniecznie | nullableinteger | 13 |
| pageNie koniecznie | nullableinteger | 17 |
| sort-byNie koniecznie | nullablestringapp\_validators\_ex_in_rule | "" |
| sort-orderNie koniecznie | nullablestringin:asc, desc | "asc" |
Przykłady kodu
JavaScript
async function getUserNotifications() {
const baseUrl = 'https://api.stableproxy.com/v2';
const req = await fetch(baseUrl + '/user/notifications?' + Object.entries({
"mark-as-read": false,
"search": 191,
"per-page": 13,
"page": 17,
"sort-by": "",
"sort-order": "asc"
}).map(([key, value]) => key + "=" + value).join('&'), {
method: 'GET',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}