Mosty połączeń

Lista wszystkich publicznie dostępnych metod interakcji z API.

GET

Pobierz pakiet super proxy -/package/super-proxy/{id}

Metoda zapytania

GEThttp://apilocal.stableproxy.com/v2/package/super-proxy/{id}

Parametry zapytania

IdentyfikatorRegulaminPrzykład
with-hiddenNie koniecznienullableex-booleanfalse
countriesNie koniecznienullablearray{"UA": 10, "PL": 20}
searchNie koniecznienullablestring191
per-pageNie koniecznienullableinteger245
pageNie koniecznienullableinteger1
sort-byNie koniecznienullablestringapp\_validators\_ex_in_rule""
sort-orderNie koniecznienullablestringin:asc, desc"asc"
countries.*Nie konieczniedistinctstringcountry_code{"UA": 10, "PL": 20}
id1required64

Przykłady kodu

1async function getPackageSuperProxy() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/package/super-proxy/{id}'
4      .replace("{id}", 64) + '?' + Object.entries({
5         "with-hidden": false,
6         "countries[UA]": 10,
7         "countries[PL]": 20,
8         "search": 191,
9         "per-page": 245,
10         "page": 1,
11         "sort-by": "",
12         "sort-order": "asc",
13         "countries.*[UA]": 10,
14         "countries.*[PL]": 20
15      }).map(([key, value]) => key + "=" + value).join('&'), {
16         method: 'GET',
17         headers: {
18            'Authorization': 'API-Token [YOUR TOKEN]',
19            'Content-Type': 'application/json'
20         }
21      }
22   );
23   
24   const res = await req.json();
25}

Przykłady odpowiedzi

PUT

Pakiet super proxy -/package/super-proxy/{id}/{pid}

Metoda zapytania

PUThttp://apilocal.stableproxy.com/v2/package/super-proxy/{id}/{pid}

Parametry zapytania

IdentyfikatorRegulaminPrzykład
with-hiddenNie koniecznienullableex-booleanfalse
countriesNie koniecznienullablearray{"UA": 10, "PL": 20}
searchNie koniecznienullablestring14
per-pageNie koniecznienullableinteger130
pageNie koniecznienullableinteger32
sort-byNie koniecznienullablestringapp\_validators\_ex_in_rule""
sort-orderNie koniecznienullablestringin:asc, desc"asc"
countries.*Nie konieczniedistinctstringcountry_code{"UA": 10, "PL": 20}
id1required86
pid1required57

Przykłady kodu

1async function putPackageSuperProxy() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/package/super-proxy/{id}/{pid}'
4      .replace("{id}", 86)
5      .replace("{pid}", 57), {
6         method: 'PUT',
7         headers: {
8            'Authorization': 'API-Token [YOUR TOKEN]',
9            'Content-Type': 'application/json'
10         },
11         body: JSON.stringify({
12            "with-hidden": false,
13            "countries": {"UA": 10, "PL": 20},
14            "search": 14,
15            "per-page": 130,
16            "page": 32,
17            "sort-by": "",
18            "sort-order": "asc",
19            "countries.*": {"UA": 10, "PL": 20}
20         }),
21      }
22   );
23   
24   const res = await req.json();
25}

Przykłady odpowiedzi