🎮 API Escape Room

Documentació de l'API REST

Versió 1.0.0
📌 Informació general

Base URL: http://localhost:5000/api

Protocol: HTTP/REST

Content-Type: application/json

Comunicació backend: MQTT (intern)

📋 Partides

{% for endpoint in endpoints %} {% if endpoint.category == 'Partidas' or endpoint.category == 'Partides' %}
{{ endpoint.method }} {{ endpoint.description }}
{{ endpoint.path }}
{% if endpoint.parameters %}
Paràmetres:
{% for param_name, param_info in endpoint.parameters.items() %} {% endfor %}
Nom Tipus Obligatori Descripció
{{ param_name }} {{ param_info.type }} {% if param_info.required %} {% else %} NO {% endif %} {{ param_info.description or '-' }}
{% endif %}
Exemple de petició:
{% if endpoint.example_request %}
{{ endpoint.example_request | tojson }}
{% else %}
N/A
{% endif %}
Exemple de resposta:
{% if endpoint.example_response %}
{{ endpoint.example_response | tojson }}
{% endif %} {% if endpoint.curl %}
cURL (Linux/Mac):
{{ endpoint.curl }}
{% endif %} {% if endpoint.curl_windows %}
PowerShell (Windows):
{{ endpoint.curl_windows }}
{% endif %}
{% endif %} {% endfor %}

👥 Usuaris

{% for endpoint in endpoints %} {% if endpoint.category == 'Usuaris' %}
{{ endpoint.method }} {{ endpoint.description }}
{{ endpoint.path }}
{% if endpoint.parameters %}
Paràmetres:
{% for param_name, param_info in endpoint.parameters.items() %} {% endfor %}
Nom Tipus Obligatori Descripció
{{ param_name }} {{ param_info.type }} {% if param_info.required %} {% else %} NO {% endif %} {{ param_info.description or '-' }}
{% endif %} {% if endpoint.example_request %}
Exemple de petició:
{{ endpoint.example_request | tojson }}
{% endif %}
{% endif %} {% endfor %}

⭐ Punts

{% for endpoint in endpoints %} {% if endpoint.category == 'Punts' %}
{{ endpoint.method }} {{ endpoint.description }}
{{ endpoint.path }}
{% endif %} {% endfor %}

🔑 Administració

{% for endpoint in endpoints %} {% if endpoint.category == 'Admin' %}
{{ endpoint.method }} {{ endpoint.description }}
{{ endpoint.path }}
{% endif %} {% endfor %}

⚙️ Sistema

{% for endpoint in endpoints %} {% if endpoint.category == 'Sistema' %}
{{ endpoint.method }} {{ endpoint.description }}
{{ endpoint.path }}
{% if endpoint.example_response %}
Exemple de resposta:
{{ endpoint.example_response | tojson }}
{% endif %}
{% endif %} {% endfor %}

Nota: Totes les respostes es publiquen via MQTT amb un temps d'espera de 5 segons.

Broker MQTT: localhost:5009

Base de dades: SQLite (C:\SoftMacros\scaperoom\sr.db)