| 
									
										
										
										
											2020-12-01 01:33:57 +01:00
										 |  |  | """API endpoints package.""" | 
					
						
							| 
									
										
										
										
											2022-01-19 18:51:26 +01:00
										 |  |  | from typing import List, Tuple | 
					
						
							| 
									
										
										
										
											2020-12-01 01:51:09 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-18 10:27:53 +02:00
										 |  |  | from flask import Blueprint | 
					
						
							| 
									
										
										
										
											2020-12-01 01:51:09 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-20 02:05:07 +01:00
										 |  |  | from ..models import Seed, Slot | 
					
						
							| 
									
										
										
										
											2020-12-01 01:33:57 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | api_endpoints = Blueprint('api', __name__, url_prefix="/api") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-21 22:55:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-19 18:51:26 +01:00
										 |  |  | def get_players(seed: Seed) -> List[Tuple[str, str]]: | 
					
						
							| 
									
										
										
										
											2025-01-20 02:05:07 +01:00
										 |  |  |     return [(slot.player_name, slot.game) for slot in seed.slots.order_by(Slot.player_id)] | 
					
						
							| 
									
										
										
										
											2022-01-19 18:51:26 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-18 10:27:53 +02:00
										 |  |  | from . import datapackage, generate, room, user  # trigger registration |