apps-l7cal6/endpoints/whatsapp.get.py
2025-03-25 13:43:29 +00:00

24 lines
474 B
Python

from fastapi import APIRouter
import random
router = APIRouter()
messages = [
"Hey there! I am using WhatsApp",
"Available",
"In a meeting",
"At work",
"Battery about to die",
"Can't talk WhatsApp only",
"Urgent calls only",
"Sleeping"
]
@router.get("/whatsapp")
async def whatsapp_status():
"""Get random WhatsApp status"""
return {
"message": random.choice(messages),
"method": "GET",
"_verb": "get"
}