StudioApi constructor

StudioApi({
  1. String? apiKey,
  2. bool enableLogging = false,
  3. String baseUrl = 'https://studio.fuse.io/api',
  4. List<Interceptor> interceptors = const [],
})

Implementation

StudioApi({
  String? apiKey,
  bool enableLogging = false,
  String baseUrl = 'https://studio.fuse.io/api',
  List<Interceptor> interceptors = const [],
}) {
  _dio = Dio(
    BaseOptions(
      baseUrl: baseUrl,
      queryParameters: apiKey != null
          ? {
              'apiKey': apiKey,
            }
          : null,
      headers: {"Content-Type": 'application/json'},
    ),
  );
  if (enableLogging) {
    _dio.interceptors.addAll(interceptors);
  }
}