Update linter
This commit is contained in:
@@ -43,7 +43,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|
||||
| status
|
||||
|}
|
||||
|}
|
||||
|""".trimMargin()
|
||||
|
|
||||
""".trimMargin()
|
||||
val payload = buildJsonObject {
|
||||
put("query", query)
|
||||
putJsonObject("variables") {
|
||||
@@ -84,7 +85,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|
||||
|progress
|
||||
|}
|
||||
|}
|
||||
|""".trimMargin()
|
||||
|
|
||||
""".trimMargin()
|
||||
val payload = buildJsonObject {
|
||||
put("query", query)
|
||||
putJsonObject("variables") {
|
||||
@@ -127,7 +129,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|
||||
|}
|
||||
|}
|
||||
|}
|
||||
|""".trimMargin()
|
||||
|
|
||||
""".trimMargin()
|
||||
val payload = buildJsonObject {
|
||||
put("query", query)
|
||||
putJsonObject("variables") {
|
||||
@@ -193,7 +196,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|
||||
|}
|
||||
|}
|
||||
|}
|
||||
|""".trimMargin()
|
||||
|
|
||||
""".trimMargin()
|
||||
val payload = buildJsonObject {
|
||||
put("query", query)
|
||||
putJsonObject("variables") {
|
||||
@@ -238,7 +242,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|
||||
|}
|
||||
|}
|
||||
|}
|
||||
|""".trimMargin()
|
||||
|
|
||||
""".trimMargin()
|
||||
val payload = buildJsonObject {
|
||||
put("query", query)
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ data class ALManga(
|
||||
val format: String,
|
||||
val publishing_status: String,
|
||||
val start_date_fuzzy: Long,
|
||||
val total_chapters: Int
|
||||
val total_chapters: Int,
|
||||
) {
|
||||
|
||||
fun toTrack() = TrackSearch.create(TrackManager.ANILIST).apply {
|
||||
@@ -46,7 +46,7 @@ data class ALUserManga(
|
||||
val chapters_read: Int,
|
||||
val start_date_fuzzy: Long,
|
||||
val completed_date_fuzzy: Long,
|
||||
val manga: ALManga
|
||||
val manga: ALManga,
|
||||
) {
|
||||
|
||||
fun toTrack() = Track.create(TrackManager.ANILIST).apply {
|
||||
|
||||
@@ -7,7 +7,7 @@ data class OAuth(
|
||||
val access_token: String,
|
||||
val token_type: String,
|
||||
val expires: Long,
|
||||
val expires_in: Long
|
||||
val expires_in: Long,
|
||||
) {
|
||||
|
||||
fun isExpired() = System.currentTimeMillis() > expires
|
||||
|
||||
@@ -6,5 +6,5 @@ import kotlinx.serialization.Serializable
|
||||
data class Avatar(
|
||||
val large: String? = "",
|
||||
val medium: String? = "",
|
||||
val small: String? = ""
|
||||
val small: String? = "",
|
||||
)
|
||||
|
||||
@@ -12,5 +12,5 @@ data class Collection(
|
||||
val status: Status? = Status(),
|
||||
val tag: List<String?>? = listOf(),
|
||||
val user: User? = User(),
|
||||
val vol_status: Int? = 0
|
||||
val vol_status: Int? = 0,
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@ data class OAuth(
|
||||
val created_at: Long = System.currentTimeMillis() / 1000,
|
||||
val expires_in: Long,
|
||||
val refresh_token: String?,
|
||||
val user_id: Long?
|
||||
val user_id: Long?,
|
||||
) {
|
||||
|
||||
// Access token refresh before expired
|
||||
|
||||
@@ -6,5 +6,5 @@ import kotlinx.serialization.Serializable
|
||||
data class Status(
|
||||
val id: Int? = 0,
|
||||
val name: String? = "",
|
||||
val type: String? = ""
|
||||
val type: String? = "",
|
||||
)
|
||||
|
||||
@@ -10,5 +10,5 @@ data class User(
|
||||
val sign: String? = "",
|
||||
val url: String? = "",
|
||||
val usergroup: Int? = 0,
|
||||
val username: String? = ""
|
||||
val username: String? = "",
|
||||
)
|
||||
|
||||
@@ -39,7 +39,7 @@ class DelayedTrackingStore(context: Context) {
|
||||
DelayedTrackingItem(
|
||||
trackId = it.key.toLong(),
|
||||
mangaId = mangaId.toLong(),
|
||||
lastChapterRead = lastChapterRead.toFloat(),
|
||||
lastChapterRead = lastChapterRead.toFloat()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor)
|
||||
"X-Algolia-Application-Id",
|
||||
algoliaAppId,
|
||||
"X-Algolia-API-Key",
|
||||
key,
|
||||
key
|
||||
),
|
||||
body = jsonObject.toString().toRequestBody(jsonMime)
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ data class OAuth(
|
||||
val token_type: String,
|
||||
val created_at: Long,
|
||||
val expires_in: Long,
|
||||
val refresh_token: String?
|
||||
val refresh_token: String?,
|
||||
) {
|
||||
|
||||
fun isExpired() = (System.currentTimeMillis() / 1000) > (created_at + expires_in - 3600)
|
||||
|
||||
@@ -15,7 +15,7 @@ data class SeriesDto(
|
||||
val booksUnreadCount: Int,
|
||||
val booksInProgressCount: Int,
|
||||
val metadata: SeriesMetadataDto,
|
||||
val booksMetadata: BookMetadataAggregationDto
|
||||
val booksMetadata: BookMetadataAggregationDto,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
@@ -38,7 +38,7 @@ data class SeriesMetadataDto(
|
||||
val genres: Set<String>,
|
||||
val genresLock: Boolean,
|
||||
val tags: Set<String>,
|
||||
val tagsLock: Boolean
|
||||
val tagsLock: Boolean,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
@@ -49,13 +49,13 @@ data class BookMetadataAggregationDto(
|
||||
val summaryNumber: String,
|
||||
|
||||
val created: String,
|
||||
val lastModified: String
|
||||
val lastModified: String,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class AuthorDto(
|
||||
val name: String,
|
||||
val role: String
|
||||
val role: String,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
@@ -75,7 +75,7 @@ data class ReadListDto(
|
||||
val bookIds: List<String>,
|
||||
val createdDate: String,
|
||||
val lastModifiedDate: String,
|
||||
val filtered: Boolean
|
||||
val filtered: Boolean,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
@@ -92,7 +92,7 @@ data class ReadProgressDto(
|
||||
booksUnreadCount,
|
||||
booksInProgressCount,
|
||||
lastReadContinuousIndex.toFloat(),
|
||||
booksCount.toFloat(),
|
||||
booksCount.toFloat()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ data class OAuth(
|
||||
val access_token: String,
|
||||
val token_type: String,
|
||||
val created_at: Long = System.currentTimeMillis(),
|
||||
val expires_in: Long
|
||||
val expires_in: Long,
|
||||
) {
|
||||
|
||||
fun isExpired() = System.currentTimeMillis() > created_at + (expires_in * 1000)
|
||||
|
||||
@@ -8,7 +8,7 @@ data class OAuth(
|
||||
val token_type: String,
|
||||
val created_at: Long,
|
||||
val expires_in: Long,
|
||||
val refresh_token: String?
|
||||
val refresh_token: String?,
|
||||
) {
|
||||
|
||||
// Access token lives 1 day
|
||||
|
||||
Reference in New Issue
Block a user