-
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
OsmarICancino
committed
Nov 5, 2021
1 parent
72d7c96
commit 38c0c02
Showing
9 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
app/src/main/java/com/dalvikmx/moviehunter/utilities/Constants.kt
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
package com.dalvikmx.moviehunter.utilities | ||
|
||
import com.dalvikmx.moviehunter.BuildConfig | ||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig | ||
import com.google.firebase.remoteconfig.ktx.get | ||
|
||
object Constants { | ||
const val BASE_URL = BuildConfig.MOVIES_DB_ENDPOINT | ||
const val DEFAULT_REGION = "US" | ||
const val MOVIE_ITEM_KEY = "MOVIE_ITEM_KEY" | ||
const val API_KEY = "api_key" | ||
|
||
val apiKey: String by lazy { FirebaseRemoteConfig.getInstance()[API_KEY].asString()} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
3 changes: 2 additions & 1 deletion
3
...oviehunter/utilities/extensions/String.kt → .../utilities/extensions/StringExtensions.kt
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
package com.dalvikmx.moviehunter.utilities.extensions | ||
|
||
import com.dalvikmx.moviehunter.BuildConfig | ||
import com.dalvikmx.moviehunter.utilities.Constants.apiKey | ||
|
||
fun String.getUrlPosterImage(): String { | ||
return BuildConfig.MOVIE_IMAGE_ENDPOINT + getSizedURL() + this + "?api_key=42f6037782ffa6d0229e74706d3206de" | ||
return BuildConfig.MOVIE_IMAGE_ENDPOINT + getSizedURL() + this + "?api_key=${apiKey}" | ||
} |
File renamed without changes.
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 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