import 'package:clean/data/api/request/attr_push_request.dart';
import 'package:clean/data/api/request/event_push_request.dart';
import 'package:dio/dio.dart';
import 'package:retrofit/error_logger.dart';
import 'package:retrofit/http.dart';

import '../../base/base_request.dart';
import '../../base/base_response.dart';
import '../consts/constants.dart';
import 'network_module.dart';

part 'event_api.g.dart';

@RestApi()
abstract class EventApi {
  factory EventApi(Dio dio, {String baseUrl}) = _EventApi;

  @POST("/central/open/v1/event/push")
  Future<BaseResponse> eventPush(
      @Body() EventPushRequest request);

  @POST("/central/open/v1/promotion/attribution/push/airbridge")
  Future<BaseResponse> attrPush(
      @Body() AttrPushRequest request);
}

final eventApi = EventApi(eventDio, baseUrl: Constants.centralUrl);