package com.test.questionnairesdk.library

import retrofit2.Call
import retrofit2.Retrofit
import retrofit2.converter.jackson.JacksonConverterFactory
import retrofit2.http.Body
import retrofit2.http.POST


class RetrofitNetworking {
    companion object {

        val ASKRIBE_BASE_URL = "https://questionnaire-pwsrg3dzoq-el.a.run.app/api/v1/"
        val ASKRIBE_CONSUMER_BASE_URL = "https://qConsumer.fashtag.info"
        val converterFactory = JacksonConverterFactory.create()

        val client = Retrofit.Builder()
            .addConverterFactory(converterFactory)
            .baseUrl(ASKRIBE_BASE_URL)
            .build()

        var apiService: EndPointInterface = client.create(EndPointInterface::class.java)

    }
}

interface EndPointInterface {
//    @Multipart
//    @POST("/utility/upload/{bucket-name}")
//    fun uploadAudioFile(
//        @Path("bucket-name") bucketName: String,
//        @Part createMultipartBody: MultipartBody.Part
//    ): Call<FileUploadResponse>

    @POST("consumer/app-embed-config")
    fun getQuestionnaireEmbed(
        @Body sessionDTO: QuestionnaireEmbedSessionDTO
    ): Call<QuestionResponse>

}
