All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 5m57s
87 lines
2.6 KiB
TypeScript
87 lines
2.6 KiB
TypeScript
export const developerScopes = [
|
||
{
|
||
id: "maps:read",
|
||
name: ["Public maps", "Общие карты"],
|
||
description: [
|
||
"Read the published map catalog and map details.",
|
||
"Читать каталог опубликованных карт и сведения о картах.",
|
||
],
|
||
},
|
||
{
|
||
id: "account:read",
|
||
name: ["My profile", "Мой профиль"],
|
||
description: [
|
||
"Read your account profile and username appearance.",
|
||
"Читать профиль вашего аккаунта и оформление имени.",
|
||
],
|
||
},
|
||
{
|
||
id: "account:maps:read",
|
||
name: ["My maps, including private maps", "Мои карты, включая личные"],
|
||
description: [
|
||
"Read your own map records, including unpublished maps.",
|
||
"Читать ваши карты, в том числе неопубликованные.",
|
||
],
|
||
},
|
||
{
|
||
id: "account:games:read",
|
||
name: ["My game history", "Моя история игр"],
|
||
description: ["Read your game history.", "Читать вашу историю игр."],
|
||
},
|
||
] as const;
|
||
|
||
export const developerEndpoints = [
|
||
{
|
||
path: "/maps",
|
||
scope: "maps:read",
|
||
description: [
|
||
"Published maps. Supports q, limit and offset.",
|
||
"Опубликованные карты. Поддерживает q, limit и offset.",
|
||
],
|
||
},
|
||
{
|
||
path: "/maps/{id}",
|
||
scope: "maps:read",
|
||
description: [
|
||
"Details of one published map.",
|
||
"Сведения об одной опубликованной карте.",
|
||
],
|
||
},
|
||
{
|
||
path: "/me",
|
||
scope: "account:read",
|
||
description: [
|
||
"The key owner's profile and username appearance.",
|
||
"Профиль и оформление имени владельца ключа.",
|
||
],
|
||
},
|
||
{
|
||
path: "/me/maps",
|
||
scope: "account:maps:read",
|
||
description: [
|
||
"Your own maps, including private maps. Supports limit and offset.",
|
||
"Ваши карты, включая личные. Поддерживает limit и offset.",
|
||
],
|
||
},
|
||
{
|
||
path: "/me/games",
|
||
scope: "account:games:read",
|
||
description: [
|
||
"Your game history. Supports limit and offset.",
|
||
"Ваша история игр. Поддерживает limit и offset.",
|
||
],
|
||
},
|
||
] as const;
|
||
|
||
export const developerPythonExample = `import os
|
||
import requests
|
||
|
||
response = requests.get(
|
||
"https://minegeo.site/api/dev/v1/maps",
|
||
headers={"Authorization": f"Bearer {os.environ['MINEGEO_API_KEY']}"},
|
||
params={"limit": 20, "offset": 0},
|
||
timeout=20,
|
||
)
|
||
response.raise_for_status()
|
||
print(response.json())`;
|