-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
34 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.hous.hous_aos.di | ||
|
||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import retrofit2.Retrofit | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
object ApiModule { | ||
@Provides | ||
@Singleton | ||
fun provideHomeService(retrofit: Retrofit): com.hous.data.api.HomeApi = | ||
retrofit.create(com.hous.data.api.HomeApi::class.java) | ||
|
||
@Provides | ||
@Singleton | ||
fun provideRulesService(retrofit: Retrofit): com.hous.data.api.RulesApi = | ||
retrofit.create(com.hous.data.api.RulesApi::class.java) | ||
|
||
@Provides | ||
@Singleton | ||
fun provideProfileService(retrofit: Retrofit): com.hous.data.api.ProfileApi = | ||
retrofit.create(com.hous.data.api.ProfileApi::class.java) | ||
|
||
@Provides | ||
@Singleton | ||
fun provideNewRulesApi(retrofit: Retrofit): com.hous.data.api.NewRulesApi = | ||
retrofit.create(com.hous.data.api.NewRulesApi::class.java) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.