Skip to content

Commit 3dd9e46

Browse files
committed
Formatted kotlin
1 parent dc2bd2e commit 3dd9e46

21 files changed

+424
-468
lines changed

GeneratorScripts/src/main/kotlin/MapperGenerator0x19x11.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
@file:Suppress("unused", "INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
22

3-
import io.mcarle.konvert.api.Konfig
4-
import io.mcarle.konvert.api.Konverter
53
import it.vercruysse.lemmyapi.v0.x19.x11.datatypes.*
64

7-
//@Konverter(
5+
// @Konverter(
86
// options = [
97
// Konfig(key = "konvert.konverter.generate-class", value = "true"),
108
// Konfig(key = "konvert.enable-converters", value = "FloatToIntConverter"),
119
// Konfig(key = "konvert.add-generated-konverter-annotation", value = "false"),
1210
// ],
13-
//)
11+
// )
1412
internal interface MapperGenerator0x19x11 {
1513

1614
fun toUni(d: AddAdminResponse): it.vercruysse.lemmyapi.datatypes.AddAdminResponse
@@ -150,6 +148,7 @@ internal interface MapperGenerator0x19x11 {
150148
fun toUni(d: Tagline): it.vercruysse.lemmyapi.datatypes.Tagline
151149
fun toUni(d: UpdateTotpResponse): it.vercruysse.lemmyapi.datatypes.UpdateTotpResponse
152150
fun toUni(d: VoteView): it.vercruysse.lemmyapi.datatypes.VoteView
151+
153152
// body mappings
154153
fun fromUni(d: it.vercruysse.lemmyapi.datatypes.AddAdmin): AddAdmin
155154
fun fromUni(d: it.vercruysse.lemmyapi.datatypes.AddModToCommunity): AddModToCommunity

app/src/commonMain/kotlin/it/vercruysse/lemmyapi/FeatureFlags.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,5 @@ class FeatureFlags(val version: Version) {
103103
/**
104104
* Mark donation dialog as shown, feature added in 0.19.11
105105
*/
106-
fun donation_dialog_shown(): Boolean = v0x19x11Plus
106+
fun donationDialogShown(): Boolean = v0x19x11Plus
107107
}

app/src/commonMain/kotlin/it/vercruysse/lemmyapi/LemmyApiBaseController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ abstract class LemmyApiBaseController(client: HttpClient, actualVersion: Version
543543
*
544544
* @POST("user/donation_dialog_shown")
545545
*/
546-
abstract suspend fun donation_dialog_shown(): Result<Unit>
546+
abstract suspend fun donationDialogShown(): Result<Unit>
547547

548548
/**
549549
* Add an admin to your site.

app/src/commonMain/kotlin/it/vercruysse/lemmyapi/v0/x18/x5/LemmyApiUniWrapper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ internal class LemmyApiUniWrapper(client: HttpClient, actualVersion: Version, ba
742742
*
743743
* @POST("user/donation_dialog_shown")
744744
*/
745-
override suspend fun donation_dialog_shown(): Result<Unit> = notSupported()
745+
override suspend fun donationDialogShown(): Result<Unit> = notSupported()
746746

747747
/**
748748
* Add an admin to your site.

app/src/commonMain/kotlin/it/vercruysse/lemmyapi/v0/x19/x0/LemmyApiUniWrapper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ internal class LemmyApiUniWrapper(client: HttpClient, actualVersion: Version, ba
727727
*
728728
* @POST("user/donation_dialog_shown")
729729
*/
730-
override suspend fun donation_dialog_shown(): Result<Unit> = notSupported()
730+
override suspend fun donationDialogShown(): Result<Unit> = notSupported()
731731

732732
/**
733733
* Add an admin to your site.

app/src/commonMain/kotlin/it/vercruysse/lemmyapi/v0/x19/x11/LemmyApiController.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ internal class LemmyApiController(client: HttpClient, auth: String?) :
619619
*
620620
* @POST("user/donation_dialog_shown")
621621
*/
622-
override suspend fun donation_dialog_shown(): Result<Unit> =
622+
override suspend fun donationDialogShown(): Result<Unit> =
623623
client.postResult("user/donation_dialog_shown")
624624

625625
/**
@@ -720,7 +720,7 @@ internal class LemmyApiController(client: HttpClient, auth: String?) :
720720

721721
/**
722722
* Generate a TOTP / two-factor secret.
723-
*
723+
*
724724
* Afterwards you need to call `/user/totp/update` with a valid token to enable it.
725725
*
726726
* @POST("user/totp/generate")
@@ -730,9 +730,9 @@ internal class LemmyApiController(client: HttpClient, auth: String?) :
730730

731731
/**
732732
* Enable / Disable TOTP / two-factor authentication.
733-
*
733+
*
734734
* To enable, you need to first call `/user/totp/generate` and then pass a valid token to this.
735-
*
735+
*
736736
* Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
737737
*
738738
* @POST("user/totp/update")
@@ -828,5 +828,4 @@ internal class LemmyApiController(client: HttpClient, auth: String?) :
828828
*/
829829
override suspend fun getRegistrationApplication(form: GetRegistrationApplication): Result<RegistrationApplicationResponse> =
830830
client.getResult("admin/registration_application", form)
831-
832831
}

app/src/commonMain/kotlin/it/vercruysse/lemmyapi/v0/x19/x11/LemmyApiRouter.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ internal abstract class LemmyApiRouter(client: HttpClient, auth: String?) : Auth
538538
*
539539
* @POST("user/donation_dialog_shown")
540540
*/
541-
abstract suspend fun donation_dialog_shown(): Result<Unit>
541+
abstract suspend fun donationDialogShown(): Result<Unit>
542542

543543
/**
544544
* Add an admin to your site.
@@ -626,7 +626,7 @@ internal abstract class LemmyApiRouter(client: HttpClient, auth: String?) : Auth
626626

627627
/**
628628
* Generate a TOTP / two-factor secret.
629-
*
629+
*
630630
* Afterwards you need to call `/user/totp/update` with a valid token to enable it.
631631
*
632632
* @POST("user/totp/generate")
@@ -635,9 +635,9 @@ internal abstract class LemmyApiRouter(client: HttpClient, auth: String?) : Auth
635635

636636
/**
637637
* Enable / Disable TOTP / two-factor authentication.
638-
*
638+
*
639639
* To enable, you need to first call `/user/totp/generate` and then pass a valid token to this.
640-
*
640+
*
641641
* Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
642642
*
643643
* @POST("user/totp/update")
@@ -721,5 +721,4 @@ internal abstract class LemmyApiRouter(client: HttpClient, auth: String?) : Auth
721721
* @GET("admin/registration_application")
722722
*/
723723
abstract suspend fun getRegistrationApplication(form: GetRegistrationApplication): Result<RegistrationApplicationResponse>
724-
725724
}

app/src/commonMain/kotlin/it/vercruysse/lemmyapi/v0/x19/x11/LemmyApiUniWrapper.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,8 +727,8 @@ internal class LemmyApiUniWrapper(client: HttpClient, actualVersion: Version, ba
727727
*
728728
* @POST("user/donation_dialog_shown")
729729
*/
730-
override suspend fun donation_dialog_shown(): Result<Unit> =
731-
api.donation_dialog_shown()
730+
override suspend fun donationDialogShown(): Result<Unit> =
731+
api.donationDialogShown()
732732

733733
/**
734734
* Add an admin to your site.

app/src/commonMain/kotlin/it/vercruysse/lemmyapi/v0/x19/x11/MapperGenerator.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ internal interface MapperGenerator {
141141
fun toUni(d: Tagline): it.vercruysse.lemmyapi.datatypes.Tagline
142142
fun toUni(d: UpdateTotpResponse): it.vercruysse.lemmyapi.datatypes.UpdateTotpResponse
143143
fun toUni(d: VoteView): it.vercruysse.lemmyapi.datatypes.VoteView
144+
144145
// body mappings
145146
fun fromUni(d: it.vercruysse.lemmyapi.datatypes.AddAdmin): AddAdmin
146147
fun fromUni(d: it.vercruysse.lemmyapi.datatypes.AddModToCommunity): AddModToCommunity

0 commit comments

Comments
 (0)