واجهة برمجة التطبيقات (API) لنماذج التدريب¶
حوّل سلوك المستخدم ودوافعه إلى نموذج عملي ومقترح استراتيجي للبرمجة.
نقطة النهاية (Endpoint)¶
GET /api/v1/fitness/training-archetypePOST /api/v1/fitness/training-archetype/post
المعلمات¶
| الاسم | النوع | مطلوب | في | الوصف |
|---|---|---|---|---|
preferred_training_style | سلسلة نصية | نعم | استعلام/جسم | strength, endurance, hybrid, functional, mind_body. |
recovery_rate | رقم (1-10) | نعم | استعلام/جسم | درجة الاسترداد التي يقيّمها المستخدم. |
motivation_type | سلسلة نصية | نعم | استعلام/جسم | intrinsic, competitive, social, data_driven, habit_based. |
goal | سلسلة نصية | نعم | استعلام/جسم | fat_loss, muscle_gain, performance, maintenance, recomposition. |
lang | سلسلة نصية | لا | استعلام | لغة الاستجابة (en, es, de, fr, pt, ja, hi, ar). |
لماذا استخدام هذه نقطة النهاية¶
- تخصيص تجربة المستخدم للتدريب تتجاوز القوالب العامة للأهداف.
- إضافة ذكاء بشأن مخاطر الإرهاق إلى قرارات البرمجة.
- زيادة الامتثال من خلال أنماط خطط متوافقة مع النموذج.
مثال على الطلب¶
curl -X GET "https://api.hefitapi.com/api/v1/fitness/training-archetype?preferred_training_style=hybrid&recovery_rate=6.8&motivation_type=data_driven&goal=recomposition&lang=en" \
-H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.hefitapi.com/api/v1/fitness/training-archetype/post?lang=en" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"preferred_training_style":"strength","recovery_rate":5.4,"motivation_type":"competitive","goal":"performance"}'
مثال على الاستجابة¶
معلومات
مثال الاستجابة أدناه مخصص للأغراض التوضيحية فقط. للحصول على هيكل JSON الكامل والواقعي وفي الوقت الفعلي، وربما أكثر ثراءً، قم بإرسال طلب مباشر إلى هذه نقطة النهاية.
{
"preferred_training_style": "hybrid",
"preferred_training_style_label": "Hybrid",
"recovery_rate": 6.8,
"motivation_type": "data_driven",
"motivation_type_label": "Data Driven",
"goal": "recomposition",
"goal_label": "Recomposition",
"athlete_archetype": {"type": "adaptive_hybrid", "type_label": "Adaptive Hybrid", "insight": "You respond well to varied stimulus with structure."},
"ideal_program_style": {"type": "dual_focus_rotation", "type_label": "Dual Focus Rotation", "insight": "Alternate emphasis while maintaining total consistency."},
"burnout_risk_pattern": {"score": 55, "level": "moderate", "level_label": "Moderate", "insight": "Manage intensity clustering to avoid cumulative fatigue."},
"strategic_recommendation": ["Use planned intensity waves and recovery anchors"],
"next_review_window_days": 21,
"summary": "Hybrid profile with moderate burnout risk and strong adaptability.",
"language": "en",
"_enterprise": {"client": "Acme Health", "plan": "pro", "request_id": "1582fd58511dbe57", "quota": 120, "usage_tracking": true},
"_api_metadata_": {"endpoint_name": "fitness_training_archetype", "response_language": "en"}
}
وضع المنتج¶
نقطة نهاية تخصيص عالية التأثير لتدريب الشركات والمنتجات التدريبية المتميزة.
ملاحظة
يجب أن تكون قيمة recovery_rate بين 1 و 10.
نقاط النهاية الموصى بها¶
GET /api/v1/fitness/adaptive-training-load- واجهة برمجة التطبيقات (API) لتحميل التدريب التكيفيGET /api/v1/fitness/fasted-training-risk- واجهة برمجة التطبيقات (API) لمخاطر التدريب في الصيامGET /api/v1/bmi- واجهة برمجة التطبيقات (API) لـ BMIGET /api/v1/tdee- واجهة برمجة التطبيقات (API) لـ TDEEGET /api/v1/bmr- واجهة برمجة التطبيقات (API) لـ BMRGET /api/v1/protein-calculator- واجهة برمجة التطبيقات (API) لحساب البروتين