import 'package:boilerplate/data/data_source/remote/api_provider.dart';
import 'package:boilerplate/data/repositories/base_repository.dart';
import 'package:injectable/injectable.dart';

import '../models/master/banner_res_model.dart';

@injectable
class MasterRepository extends BaseRepository {
  final ApiProvider _api;

  MasterRepository(this._api);

  Future<BannerResModel> getBanners() async {
    final response = await _api.get('/api/banner')
      ..responseHandler();

    return BannerResModel.fromJson(response.data);
  }
}
