mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
Convert wikidata/mwapi to kotlin (part 2) (#5999)
* Convert DepictSearchResponse to kotlin * Convert Entities to kotlin * Convert WikiSite to kotlin --------- Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
parent
f8d519e8eb
commit
ae52267a27
8 changed files with 348 additions and 427 deletions
|
|
@ -44,7 +44,6 @@ import okhttp3.logging.HttpLoggingInterceptor
|
|||
import okhttp3.logging.HttpLoggingInterceptor.Level
|
||||
import timber.log.Timber
|
||||
import java.io.File
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Named
|
||||
import javax.inject.Singleton
|
||||
|
|
@ -293,9 +292,8 @@ class NetworkingModule {
|
|||
@Provides
|
||||
@Singleton
|
||||
@Named(NAMED_LANGUAGE_WIKI_PEDIA_WIKI_SITE)
|
||||
fun provideLanguageWikipediaSite(): WikiSite {
|
||||
return WikiSite.forLanguageCode(Locale.getDefault().language)
|
||||
}
|
||||
fun provideLanguageWikipediaSite(): WikiSite =
|
||||
WikiSite.forDefaultLocaleLanguageCode()
|
||||
|
||||
companion object {
|
||||
private const val WIKIDATA_SPARQL_QUERY_URL = "https://query.wikidata.org/sparql"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue