package com.example.ayudapy import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor import retrofit2.Call import retrofit2.Retrofit import retrofit2.converter.gson.GsonConverterFactory import retrofit2.http.GET import retrofit2.http.Query interface ApiPedidos { companion object{ val instance:ApiService by lazy{ val builder_pedido = Retrofit.Builder() .baseUrl("https://ayudapy.org/api/v1/helprequestsgeo/") .addConverterFactory(GsonConverterFactory.create()) val client = OkHttpClient.Builder() client.addInterceptor(HttpLoggingInterceptor().apply { level = HttpLoggingInterceptor.Level.BODY }) builder_pedido.client(client.build()) builder_pedido.build().create(ApiService::class.java) } } }