import 'package:dio/dio.dart';
import 'package:qadirneyriz/config/config.dart';
import 'package:qadirneyriz/models/home/home_models.dart';
import 'package:qadirneyriz/setting/setting.dart';

class HomeApi {
  getTodayMeetings() async {
    Map<String, String> headers = {
      'Accept': 'application/json',
    };
    String dataToken = setting.userLocalDb.getUser().token!;
    if (dataToken != '') {
      headers['Authorization'] = "Bearer $dataToken";
    }
    final String link = "${config.network.baseUrl}today-meetings";

    final response = await Dio().get(link,
        options: Options(
          headers: headers,
        ));
    TodayMeetingModel list = TodayMeetingModel.fromJson(response.data);

    return list;
  }
}
