-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #575 from DimensionDev/feature/update_server_list
update server list order
- Loading branch information
Showing
4 changed files
with
154 additions
and
12 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
6 changes: 6 additions & 0 deletions
6
...ed/src/commonMain/kotlin/dev/dimension/flare/data/network/mastodon/JoinMastodonService.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,8 +1,14 @@ | ||
package dev.dimension.flare.data.network.mastodon | ||
|
||
import dev.dimension.flare.data.network.ktorfit | ||
import dev.dimension.flare.data.network.mastodon.api.InstanceResources | ||
import dev.dimension.flare.data.network.mastodon.api.JoinMastodonResources | ||
import dev.dimension.flare.data.network.mastodon.api.createInstanceResources | ||
import dev.dimension.flare.data.network.mastodon.api.createJoinMastodonResources | ||
|
||
internal object JoinMastodonService : | ||
JoinMastodonResources by ktorfit("https://api.joinmastodon.org/").createJoinMastodonResources() | ||
|
||
internal class MastodonInstanceService( | ||
val baseUrl: String, | ||
) : InstanceResources by ktorfit(baseUrl).createInstanceResources() |
9 changes: 9 additions & 0 deletions
9
.../src/commonMain/kotlin/dev/dimension/flare/data/network/mastodon/api/InstanceResources.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package dev.dimension.flare.data.network.mastodon.api | ||
|
||
import de.jensklingenberg.ktorfit.http.GET | ||
import dev.dimension.flare.data.network.mastodon.api.model.InstanceData | ||
|
||
internal interface InstanceResources { | ||
@GET("api/v2/instance") | ||
suspend fun instance(): InstanceData | ||
} |
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