Now get up to 100 mods in mod list (up from 30) - kudos @ravignir for noticing there were missing mods!

This commit is contained in:
Yair Morgenstern 2021-02-07 21:04:12 +02:00
parent a55cea110e
commit d7379508f0

View File

@ -179,7 +179,8 @@ object Github {
fun tryGetGithubReposWithTopic(): ArrayList<Repo> {
val inputStream = download("https://api.github.com/search/repositories?q=topic:unciv-mod")
// Default per-page is 30 - when we get to above 100 mods, we'll need to start search-queries
val inputStream = download("https://api.github.com/search/repositories?q=topic:unciv-mod&per_page=100")
if (inputStream == null) return ArrayList()
return GameSaver.json().fromJson(RepoSearch::class.java, inputStream.bufferedReader().readText()).items
}