# 特殊任務系統 API

## 概述
特殊任務系統API負責管理每日任務、週任務和成就系統，提供用戶學習動機和進度追蹤。

## API 端點

### 獲取今日任務
```http
GET /api/v1/missions/daily
Authorization: Bearer <access_token>

Response 200 OK
{
  "success": true,
  "data": {
    "daily_missions": [
      {
        "mission_id": "MISSION_VOCAB_RECOGNITION",
        "type": "daily",
        "title": "詞彙認識挑戰",
        "description": "成功闖關1次詞彙認識關卡",
        "icon": "🎯",
        "objectives": [
          {
            "objective_id": "OBJ_VOCAB_RECOGNITION",
            "description": "完成詞彙認識關卡通關",
            "target_value": 1,
            "current_value": 0,
            "unit": "次",
            "completion_criteria": "three_star_completion"
          }
        ],
        "rewards": {
          "experience": 50,
          "reward_type": "experience_points",
          "description": "獲得50經驗值"
        },
        "status": "available",
        "deadline": "2024-09-05T23:59:59Z"
      }
    ],
    "daily_summary": {
      "total_missions": 4,
      "completed_missions": 1,
      "available_missions": 3,
      "total_experience_available": 275,
      "experience_earned_today": 75
    }
  }
}
```

### 領取任務獎勵
```http
POST /api/v1/missions/{mission_id}/claim_reward
Authorization: Bearer <access_token>

Response 200 OK
{
  "success": true,
  "data": {
    "mission_id": "MISSION_VOCAB_RECOGNITION",
    "reward_claimed": {
      "experience": 50,
      "reward_type": "experience_points",
      "description": "詞彙認識挑戰完成獎勵"
    },
    "updated_user_stats": {
      "total_experience": 15730,
      "experience_gained_today": 125
    }
  }
}
```

## 錯誤處理
- `MISSION_NOT_AVAILABLE`: 任務不可用或已完成
- `MISSION_REQUIREMENTS_NOT_MET`: 不滿足任務要求
- `MISSION_ALREADY_COMPLETED`: 任務已經完成
- `MISSION_REWARD_ALREADY_CLAIMED`: 任務獎勵已領取

---
**建立日期**: 2025-09-08  
**API版本**: v1