gateer.blogg.se

Retrofit kotlin example github
Retrofit kotlin example github













We will then pass in the parameter at that point. Then pass in the value after the query annotation. Inside the parenthesis, we pass in the name of the query Object containing data which is in the form of PopulaMovies object of the PopulaMoviesĭata class we created.Here is where we pass our api_key as query parameter. This is the path that is defined in the TMDB api for getting popular movies.Īfter that we create a function called getmovies that we will return a call Inside the brackets of it is the endpoint we will use to make the call. This call is of the type GET, that gets data back as a response from the server. TmdbEndpoints, Then add the code as show below. Will run the api using the specified endpoints. This interface will contain methods which when called Now we are going to create an interface to define the various endpoints This app uses MVVM (Model View View-Model) architecture.Enter fullscreen mode Exit fullscreen mode Glide - An image loading and caching library for Android focused on smooth scrolling.Jetpack Navigation - Navigation refers to the interactions that allow users to navigate across, into, and back out from the different pieces of content within your app.

retrofit kotlin example github

ViewBinding - Generates a binding class for each XML layout file present in that module and allows you to more easily write code that interacts with views.ViewModel - Stores UI-related data that isn't destroyed on UI changes.

retrofit kotlin example github

  • LiveData - Data objects that notify views when the underlying database changes.
  • retrofit kotlin example github

    Retrofit - A type-safe HTTP client for Android and Java.Hilt-Dagger - Standard library to incorporate Dagger dependency injection into an Android application.Kotlin - Programming language for Android.The App is using the News Api to searching news. News App ✔️ A simple News App 📱 built to demonstrate the use of modern android architecture component with MVVM Architecture 🏗















    Retrofit kotlin example github