Możesz przeczytać notatkę dla pełnomocnika.
Lista wszystkich publicznie dostępnych metod interakcji z API.
Pakiet pełnomocnictw -/package/proxy-list/{id}
Metoda zapytania
GEThttp://apilocal.stableproxy.com/v2/package/proxy-list/{id}
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| with-hiddenNie koniecznie | nullableex-boolean | false |
| countriesNie koniecznie | nullablearray | {"UA": 10, "PL": 20} |
| searchNie koniecznie | nullablestring | 49 |
| per-pageNie koniecznie | nullableinteger | 40 |
| pageNie koniecznie | nullableinteger | 94 |
| sort-byNie koniecznie | nullablestringapp\_validators\_ex_in_rule | "" |
| sort-orderNie koniecznie | nullablestringin:asc, desc | "asc" |
| countries.*Nie koniecznie | distinctstringcountry_code | {"UA": 10, "PL": 20} |
| id | 1required | 97 |
Przykłady kodu
JavaScript
async function getPackageProxyList() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/proxy-list/{id}'
.replace("{id}", 97) + '?' + Object.entries({
"with-hidden": false,
"countries[UA]": 10,
"countries[PL]": 20,
"search": 49,
"per-page": 40,
"page": 94,
"sort-by": "",
"sort-order": "asc",
"countries.*[UA]": 10,
"countries.*[PL]": 20
}).map(([key, value]) => key + "=" + value).join('&'), {
method: 'GET',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}Przykłady odpowiedzi
Success response
Pakiet pełnomocnictw -/package/proxy/{id}/cities
Metoda zapytania
GEThttp://apilocal.stableproxy.com/v2/package/proxy/{id}/cities
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| regionsNie koniecznie | arraydistinct | [] |
| country | stringrequiredcountry_code | "" |
| regions.*Nie koniecznie | string | "" |
| id | 1required | 93 |
Przykłady kodu
JavaScript
async function getPackageProxyCities() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/proxy/{id}/cities'
.replace("{id}", 93) + '?' + Object.entries({
"regions": [],
"country": "",
"regions.*": ""
}).map(([key, value]) => key + "=" + value).join('&'), {
method: 'GET',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}Przykłady odpowiedzi
Success response
Pakiet pełnomocnictw -/package/proxy/{id}/regions
Metoda zapytania
GEThttp://apilocal.stableproxy.com/v2/package/proxy/{id}/regions
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| country | stringrequiredcountry_code | "" |
| id | 1required | 16 |
Przykłady kodu
JavaScript
async function getPackageProxyRegions() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/proxy/{id}/regions'
.replace("{id}", 16) + '?' + Object.entries({
"country": ""
}).map(([key, value]) => key + "=" + value).join('&'), {
method: 'GET',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}Przykłady odpowiedzi
Success response
Pakiet pełnomocnictw -/package/proxy/{id}/{proxyIndex}
Metoda zapytania
GEThttp://apilocal.stableproxy.com/v2/package/proxy/{id}/{proxyIndex}
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| id | 1required | 56 |
| proxyIndex | 1required | 46 |
Przykłady kodu
JavaScript
async function getPackageProxy() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/proxy/{id}/{proxyIndex}'
.replace("{id}", 56)
.replace("{proxyIndex}", 46), {
method: 'GET',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}Przykłady odpowiedzi
Success response
Pakiet pełnomocnictw -/package/hide/{id}/{proxyIndex}
Metoda zapytania
PUThttp://apilocal.stableproxy.com/v2/package/hide/{id}/{proxyIndex}
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| id | 1required | 58 |
| proxyIndex | 1required | 72 |
Przykłady kodu
JavaScript
async function putPackageHide() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/hide/{id}/{proxyIndex}'
.replace("{id}", 58)
.replace("{proxyIndex}", 72), {
method: 'PUT',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}Przykłady odpowiedzi
Success response
Pakiet pełnomocnictw -/package/note/{id}/{proxyIndex}
Metoda zapytania
GEThttp://apilocal.stableproxy.com/v2/package/note/{id}/{proxyIndex}
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| noteNie koniecznie | nullablestring | 98 |
| id | 1required | 6 |
| proxyIndex | 1required | 95 |
Przykłady kodu
JavaScript
async function getPackageNote() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/note/{id}/{proxyIndex}'
.replace("{id}", 6)
.replace("{proxyIndex}", 95) + '?' + Object.entries({
"note": 98
}).map(([key, value]) => key + "=" + value).join('&'), {
method: 'GET',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}Przykłady odpowiedzi
Success response
Pakiet pełnomocnictw -/package/note/{id}/{proxyIndex}
Metoda zapytania
PUThttp://apilocal.stableproxy.com/v2/package/note/{id}/{proxyIndex}
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| noteNie koniecznie | nullablestring | 98 |
| id | 1required | 6 |
| proxyIndex | 1required | 95 |
Przykłady kodu
JavaScript
async function putPackageNote() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/note/{id}/{proxyIndex}'
.replace("{id}", 6)
.replace("{proxyIndex}", 95), {
method: 'PUT',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"note": 98
}),
}
);
const res = await req.json();
}Przykłady odpowiedzi
Success response
Pakiet pełnomocnictw -/package/proxy-rotate/{id}/{proxyIndex}
Metoda zapytania
GEThttp://apilocal.stableproxy.com/v2/package/proxy-rotate/{id}/{proxyIndex}
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| id | 1required | 82 |
| proxyIndex | 1required | 72 |
Przykłady kodu
JavaScript
async function getPackageProxyRotate() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/proxy-rotate/{id}/{proxyIndex}'
.replace("{id}", 82)
.replace("{proxyIndex}", 72), {
method: 'GET',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}Przykłady odpowiedzi
Success response
Pakiet pełnomocnictw -/package/proxy/{id}
Metoda zapytania
POSThttp://apilocal.stableproxy.com/v2/package/proxy/{id}
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| fixed | requiredex-boolean | false |
| interval | requiredinteger | 49 |
| count | requiredinteger | 30 |
| countriesNie koniecznie | nullablearray | {"UA": 10, "PL": 20} |
| countries.*Nie koniecznie | distinctstringcountry_code | {"UA": 10, "PL": 20} |
| id | 1required | 99 |
Przykłady kodu
JavaScript
async function postPackageProxy() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/proxy/{id}'
.replace("{id}", 99), {
method: 'POST',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"fixed": false,
"interval": 49,
"count": 30,
"countries": {"UA": 10, "PL": 20},
"countries.*": {"UA": 10, "PL": 20}
}),
}
);
const res = await req.json();
}Przykłady odpowiedzi
Success response
Usuń pakiet proxy Proxies -/package/proxy/{id}/{proxyIndex}
Metoda zapytania
DELETEhttp://apilocal.stableproxy.com/v2/package/proxy/{id}/{proxyIndex}
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| id | 1required | 56 |
| proxyIndex | 1required | 46 |
Przykłady kodu
JavaScript
async function deletePackageProxy() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/proxy/{id}/{proxyIndex}'
.replace("{id}", 56)
.replace("{proxyIndex}", 46), {
method: 'DELETE',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}Przykłady odpowiedzi
Success response
Pakiet pełnomocnictw -/package/replace/{id}/{type}
Metoda zapytania
PUThttp://apilocal.stableproxy.com/v2/package/replace/{id}/{type}
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| type | 1in:non-workingrequired | "non-working" |
| id | 1required | 56 |
Przykłady kodu
JavaScript
async function putPackageReplace() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/package/replace/{id}/{type}'
.replace("{id}", 56)
.replace("{type}", "non-working"), {
method: 'PUT',
headers: {
'Authorization': 'API-Token [YOUR TOKEN]',
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}