allow programs to talk to each other. REST(“Representational State Transfer”) -Determines how the API looks like -It is a set of rules that developers follow when they create their API What is Rest API?
suspend fun getRandomDogImage(): DogImageResponse • Retrofit class Creates an instance of retrofit and implements the retrofit interface methods val apiClient: ApiService= Retrofit.Builder() .baseUrl("https://dog.ceo") .client(OkHttpClient()) .addConverterFactory(GsonConverterFactory.create()) .build() .create(ApiService::class.java) • Retrofit Converters Defines format that data will be represented in. GSON is JSON mapping. Retrofit Classes