Powiadomienia
Lista wszystkich publicznie dostępnych metod interakcji z API.
GET
Otrzymuj powiadomienia -/user/notifications
Metoda zapytania
GEThttp://apilocal.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
1async function getUserNotifications() {
2 const baseUrl = 'http://apilocal.stableproxy.com/v2';
3 const req = await fetch(baseUrl + '/user/notifications?' + Object.entries({
4 "mark-as-read": false,
5 "search": 191,
6 "per-page": 13,
7 "page": 17,
8 "sort-by": "",
9 "sort-order": "asc"
10 }).map(([key, value]) => key + "=" + value).join('&'), {
11 method: 'GET',
12 headers: {
13 'Authorization': 'API-Token [YOUR TOKEN]',
14 'Content-Type': 'application/json'
15 }
16 }
17 );
18
19 const res = await req.json();
20}