Get Consultation Data
To retrieve full details for a specific consultation, use the getConsultationInfo method.
Usage Example:
import 'package:altibbi/service/api_service.dart';
ApiService apiService = ApiService();
void fetchConsultation(int id) async {
try {
Consultation consultation = await apiService.getConsultationInfo(id);
print(\"Status: ${consultation.status}\");
print(\"Doctor: ${consultation.doctorName}\");
} catch (e) {
print(\"Error: $e\");
}
}
Response Structure
The getConsultationInfo method returns a single Consultation object.
Success Payload Example (JSON)
{
\"id\": 123,
\"user_id\": 999999999,
\"question\": \"I have symptoms of...\",
\"doctor_name\": \"Altibbi Doctor\",
\"medium\": \"chat\",
\"status\": \"in_progress\",
\"is_fulfilled\": 0,
\"created_at\": \"2024-03-20T10:00:00Z\",
\"pusherChannel\": \"channel_name\",
\"pusherAppKey\": \"key_value\",
\"chatConfig\": { ... },
\"videoConfig\": null
}