Get Mafia Data
curl --request GET \
--url https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"page": 1,
"total": 1,
"mafias": [
{
"id": "2KH2WQEO",
"name": "UKpanik",
"leader_id": "1104388035199639585",
"leader_name": "forziknerves",
"role_id": "1473315569175625811",
"role_name": "Состоит в ОПГ \"UKpanik\"",
"leader_role_id": "1473315758783201354",
"leader_role_name": "Лидер ОПГ \"UKpanik\"",
"channel_id": "1473316097032716381",
"channel_name": "💬┃ukpanik",
"color": "#060568",
"created_at": 1776881763,
"bank": 0
}
]
}GET-Ендпоінти API Економіки
Отримання даних мафій
Retrieve information about mafia organizations on the server.
Available actions:
list- list of all mafias (page, limit)info- mafia information (mafiaId or mafiaName)balance- mafia balance (mafiaId)members- mafia members (mafiaId, page, limit)transfers- mafia transfers (mafiaId, page, limit)logs- mafia logs (mafiaId, limit)
GET
/
moscowroleplay
/
civops
/
mafias
Get Mafia Data
curl --request GET \
--url https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erlcrussia.com/v2/moscowroleplay/civops/mafias")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"page": 1,
"total": 1,
"mafias": [
{
"id": "2KH2WQEO",
"name": "UKpanik",
"leader_id": "1104388035199639585",
"leader_name": "forziknerves",
"role_id": "1473315569175625811",
"role_name": "Состоит в ОПГ \"UKpanik\"",
"leader_role_id": "1473315758783201354",
"leader_role_name": "Лидер ОПГ \"UKpanik\"",
"channel_id": "1473316097032716381",
"channel_name": "💬┃ukpanik",
"color": "#060568",
"created_at": 1776881763,
"bank": 0
}
]
}Авторизації
API key for accessing CivOps endpoints.
Passed in the Authorization: Bearer <key> header.
REQUIRED FOR ALL CIVOPS ENDPOINTS (except /health).
Параметри запиту
Action type for retrieving data.
Доступні опції:
list, info, balance, members, transfers, logs Mafia ID (for info, balance, members, transfers, logs).
Mafia name (for info).
Record limit (default 10).
Page number (default 1).
Відповідь
Successful response with mafia data.
The response is of type object.
Чи була ця сторінка корисною?