package com.github.nullptroma.wallenc.domain.vault.network.yandexuserinfo

import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import retrofit2.Retrofit
import retrofit2.converter.jackson.JacksonConverterFactory

object YandexUserInfoApiFactory {
    fun create(): YandexUserInfoApi {
        val retrofit = Retrofit.Builder()
            .baseUrl("https://login.yandex.ru/")
            .addConverterFactory(
                JacksonConverterFactory.create(jacksonObjectMapper().findAndRegisterModules()),
            )
            .build()
        return retrofit.create(YandexUserInfoApi::class.java)
    }
}
