Current scope: tibiakt-core| all classes
|
com.galarzaa.tibiakt.core.section.charactertrade.bazaar.model
Coverage Summary for Class: CharacterBazaar (com.galarzaa.tibiakt.core.section.charactertrade.bazaar.model)
| Class | Method, % | Branch, % | Line, % | Instruction, % |
|---|---|---|---|---|
| CharacterBazaar | 50% (2/4) | 0% (0/8) | 77.8% (7/9) | 69.2% (162/234) |
| CharacterBazaar$Companion | 0% (0/1) | 0% (0/1) | 0% (0/2) | |
| Total | 40% (2/5) | 0% (0/8) | 70% (7/10) | 68.6% (162/236) |
/*
* Copyright © 2025 Allan Galarza
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.galarzaa.tibiakt.core.section.charactertrade.bazaar.model
import com.galarzaa.tibiakt.core.pagination.PaginatedWithUrl
import com.galarzaa.tibiakt.core.section.charactertrade.urls.bazaarUrl
import kotlinx.serialization.Serializable
/**
* The Character Bazaar.
*
* @property type The type of bazaar, current auctions or auction history.
* @property filters The currently active filters for the bazaar.
*/
@Serializable
public data class CharacterBazaar(
val type: BazaarType,
val filters: BazaarFilters = BazaarFilters(),
override val currentPage: Int,
override val totalPages: Int,
override val resultsCount: Int,
override val entries: List<Auction>,
) : PaginatedWithUrl<Auction> {
/**
* The URL to the bazaar with the current filters and page.
*/
val url: String get() = bazaarUrl(type, filters, currentPage)
override fun getPageUrl(page: Int): String = bazaarUrl(type, filters, page)
}