Introduction
funciona alg
Documentación general de la API .
Authenticating requests
This API is not authenticated.
Autenticación
Iniciar sesión
Este endpoint permite autenticar a un usuario mediante correo y contraseña. Si las credenciales son correctas, devuelve un token que se utilizará para autenticar las siguientes peticiones.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"qkunze@example.com\",
\"password\": \"O[2UZ5ij-e\\/dl4m{o,\"
}"
const url = new URL(
"https://www.nexasplay.com/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "qkunze@example.com",
"password": "O[2UZ5ij-e\/dl4m{o,"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"token_type": "bearer",
"expires_in": 60
}
Example response (401):
{
"error": "Unauthorized"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Registrar un nuevo usuario.
Permite crear un nuevo usuario en el sistema proporcionando los datos personales requeridos. Retorna un token JWT para autenticación posterior.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"consequatur\",
\"last_name\": \"consequatur\",
\"email\": \"qkunze@example.com\",
\"password\": \"O[2UZ5ij-e\\/dl4m{o,\",
\"phone\": \"consequatur\",
\"password_confirmation\": \"consequatur\",
\"birthdate\": \"consequatur\",
\"gender\": \"consequatur\",
\"current_city\": \"consequatur\"
}"
const url = new URL(
"https://www.nexasplay.com/api/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "consequatur",
"last_name": "consequatur",
"email": "qkunze@example.com",
"password": "O[2UZ5ij-e\/dl4m{o,",
"phone": "consequatur",
"password_confirmation": "consequatur",
"birthdate": "consequatur",
"gender": "consequatur",
"current_city": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"token_type": "bearer",
"expires_in": 60
}
Example response (422):
{
"email": [
"The email has already been taken."
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cerrar sesión
Este endpoint cierra la sesión del usuario autenticado invalidando su token JWT. Después de cerrar sesión, el token ya no será válido para futuras peticiones.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Successfully logged out"
}
Example response (401):
{
"message": "Token inválido o expirado"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Refrescar token JWT
Este endpoint permite renovar el token JWT del usuario autenticado cuando está próximo a expirar. Devuelve un nuevo token válido que debe reemplazar al anterior en las siguientes peticiones.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/refresh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/refresh"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"token_type": "bearer",
"expires_in": 60
}
Example response (401):
{
"message": "Token inválido o expirado"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener token de acceso desde una API Key
Este endpoint genera un token JWT válido para el usuario asociado a una API Key. Se usa cuando un sistema externo necesita autenticarse sin usar usuario y contraseña.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"key\": \"consequatur\"
}"
const url = new URL(
"https://www.nexasplay.com/api/token"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"key": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
Example response (400):
{
"message": "Invalid Api Key"
}
Example response (401):
{
"message": "Unauthorized"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
POST api/match/join
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/join" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/match/join"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/match/playcard/{room_name}
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/playcard/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/match/playcard/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/rooms/{room_id}
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/rooms/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/rooms/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Devuelve los saldos actuales del usuario autenticado.
Corresponde al endpoint GET /api/user/balances
Example request:
curl --request POST \
"https://www.nexasplay.com/api/user/balances" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/user/balances"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/user
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/user" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/user"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Inicia una partida para el usuario autenticado.
Corresponde al endpoint: POST /api/minigames/{minigame}/play
Example request:
curl --request POST \
"https://www.nexasplay.com/api/minigames/1/play" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"payment_method\": \"consequatur\",
\"event_id\": \"consequatur\"
}"
const url = new URL(
"https://www.nexasplay.com/api/minigames/1/play"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"payment_method": "consequatur",
"event_id": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Guarda la puntuación del usuario al finalizar una partida.
Corresponde al endpoint: POST /api/scores
Example request:
curl --request POST \
"https://www.nexasplay.com/api/scores" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"minigame_id\": \"consequatur\",
\"event_id\": \"consequatur\",
\"score\": 45
}"
const url = new URL(
"https://www.nexasplay.com/api/scores"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"minigame_id": "consequatur",
"event_id": "consequatur",
"score": 45
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/{datatype}
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/{datatype}/{id}
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/consequatur/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/consequatur/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/{datatype}/{id}
Example request:
curl --request PUT \
"https://www.nexasplay.com/api/consequatur/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/consequatur/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/{datatype}
Example request:
curl --request POST \
"https://www.nexasplay.com/api/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE api/{datatype}/{id}
Example request:
curl --request DELETE \
"https://www.nexasplay.com/api/consequatur/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/consequatur/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Filtros
Listar y Filtrar Compañías
Muestra una lista paginada de compañías. Permite múltiples filtros y opciones de ordenamiento para descubrir compañías.
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/companies-filters?label=Restaurante&has_active_events=1&sort_by=rating" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/companies-filters"
);
const params = {
"label": "Restaurante",
"has_active_events": "1",
"sort_by": "rating",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"name": "Company 1",
"logoUrl": null,
"description": "This company.",
"phone": "3121231230",
"catalogUrl": null,
"schedule": null,
"address": null,
"city": "Pasto",
"location": "1.2136,-77.2793",
"gameRoomUrl": null
}
]
}
Example response (404):
{
"message": "No query results for model [App\\Models\\Company] 99"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Buscar compañías cercanas
Este endpoint permite buscar compañías cercanas a una ubicación geográfica utilizando latitud, longitud y un radio (en km).
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/companies-filters/nearby?lat=-12.0464&lng=-77.0428&radius=10" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"lat\": -89,
\"lng\": -180,
\"radius\": 16
}"
const url = new URL(
"https://www.nexasplay.com/api/companies-filters/nearby"
);
const params = {
"lat": "-12.0464",
"lng": "-77.0428",
"radius": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"lat": -89,
"lng": -180,
"radius": 16
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"name": "Arcade Central Pasto",
"logoUrl": null,
"description": "La mejor sala de juegos de Nariño.",
"phone": null,
"catalogUrl": null,
"schedule": null,
"address": null,
"city": "Pasto",
"location": "1.213615,-77.279343",
"gameRoomUrl": null,
"distance": 0.01
},
]}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener calificación compañia
Calcula y devuelve la calificación promedio (de 1 a 5) y el número total de reseñas para una compañía específica.
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/companies-filters/1/average-rating" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/companies-filters/1/average-rating"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"company_id": 1,
"average_rating": "4.3",
"review_count": 15
}
}
Example response (404):
{
"message": "No query results for model [App\\Models\\Company] 99"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Listar y filtrar Eventos
Muestra una lista paginada de todos los eventos que están actualmente activos. Permite filtrar por ciudad, compañía o por los minijuegos incluidos en el evento. Los eventos se ordenan por los más recientes primero.
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/events-filters?city=Pasto&company_id=1&minigame_id=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/events-filters"
);
const params = {
"city": "Pasto",
"company_id": "1",
"minigame_id": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"description": "Gran Torneo de Verano",
"duration": "7 days",
"isActive": true,
"city": "Pasto",
"company": {
"id": 1,
"name": "Arcade Central Pasto"
},
"minigames": [
{
"id": 1,
"name": "Space Invaders"
},
{
"id": 2,
"name": "Tetris Challenge"
}
]
}
],
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rooms
Crear una nueva sala de juego.
requires authentication
Este endpoint permite crear una sala automáticamente con un nombre único y asignar al usuario autenticado como propietario. La sala puede ser pública o privada según el parámetro enviado.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"privacidad\": \"publica\"
}"
const url = new URL(
"https://www.nexasplay.com/api/match/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"privacidad": "publica"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"status": "success",
"data": {
"id": 1,
"name": "Room-ABCD12",
"owner_id": 5,
"status": "creada",
"privacidad": "publica",
"created_at": "2025-10-08T16:41:12.000000Z",
"updated_at": "2025-10-08T16:41:12.000000Z"
}
} "La respuesta incluye los datos completos de la sala creada, mostrando su estado inicial, privacidad y propietario."
Example response (401):
{
"message": "Unauthenticated."
} "Se retorna cuando el usuario no está autenticado y no puede crear la sala."
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Unirse a una sala privada.
requires authentication
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/join/Room-ABCD12" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/match/join/Room-ABCD12"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"status": "success",
"data": {
"room_name": "Room-ABCD12",
"users": [
{
"id": 1,
"name": "Harvey"
},
{
"id": 2,
"name": "Pablo"
}
],
"user_count": 2
}
}
Example response (403):
{
"status": "error",
"message": "La sala ya está completa."
}
Example response (404):
{
"status": "error",
"message": "Sala no encontrada."
}
Example response (423):
{
"status": "error",
"message": "Otro usuario está uniéndose a la sala, intenta de nuevo."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Unirse a una sala pública de forma aleatoria.
requires authentication
Busca una sala pública con espacio disponible (máximo 2 jugadores). Si existe, el usuario se une a ella. Si no existe, se crea una nueva sala pública y el usuario se convierte en su propietario.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/joinramdon" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/match/joinramdon"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"status": "success",
"message": "Te uniste a una sala pública existente.",
"data": {
"room_name": "Room-XYZ123",
"users": [
{
"id": 5,
"first_name": "Harvey"
},
{
"id": 7,
"first_name": "Carlos"
}
],
"user_count": 2
}
}
Example response (201):
{
"status": "created",
"message": "No había sala disponible, se creó una nueva pública.",
"data": {
"room_name": "Room-ABCD12",
"users": [
{
"id": 5,
"first_name": "Harvey"
}
],
"user_count": 1
}
}
Example response (423):
{
"status": "error",
"message": "Otro usuario está uniéndose a una sala, intenta de nuevo."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Iniciar una partida.
requires authentication
Verifica si el usuario pertenece a la sala y si hay al menos 2 jugadores para poder iniciar la partida , la idea general es que cuando se cree la sala o se una a la sala ramdon o privada lo pase al star para ver el contrincante.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/start/Room-ABCD12" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/match/start/Room-ABCD12"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"status": "incompleto",
"users": [
{
"id": 5,
"first_name": "Carlos"
}
],
"message": "Esperando jugadores."
}
Example response (200):
{
"status": "success",
"message": "Partida iniciada.",
"data": {
"room_name": "Room-ABCD12",
"users": [
{
"id": 5,
"first_name": "Carlos"
},
{
"id": 6,
"first_name": "Ana"
}
]
}
}
Example response (403):
{
"status": "error",
"message": "No tienes acceso a esta sala."
}
Example response (404):
{
"status": "error",
"message": "Sala no encontrada."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Repartir cartas a un jugador en la sala.
requires authentication
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/deal/Room-ABCD12" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/match/deal/Room-ABCD12"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"status": "success",
"message": "Cartas asignadas.",
"cards": [
{
"id": 12,
"name": "Fuego Básico",
"element": "fire",
"power": 3,
"sprite_key": "fire_basic",
"win_effect": "fire_blast",
"lose_effect": "smoke"
},
{
"id": 20,
"name": "Agua Básica",
"element": "water",
"power": 2,
"sprite_key": "water_basic",
"win_effect": "water_splash",
"lose_effect": "drowned"
}
]
}
Example response (403):
{
"status": "error",
"message": "No tienes acceso a esta sala."
}
Example response (404):
{
"status": "error",
"message": "Sala no encontrada."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.