io.github.pidoveproject.showdown.protocol.server.query.ChatRooms.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala-showdown-api_3 Show documentation
Show all versions of scala-showdown-api_3 Show documentation
A Scala wrapper of Pokemon Showdown's API
The newest version!
package io.github.pidoveproject.showdown.protocol.server.query
import io.github.iltotore.iron.zioJson.given
import io.github.pidoveproject.showdown.Count
import io.github.pidoveproject.showdown.protocol.MessageDecoder
import zio.json.*
/**
* Informations about the available chat rooms.
*
* @param rooms the list of available chat rooms
* @param sectionTitles the room sections
* @param userCount the number of connected users in a room
* @param battleCount the number of currently-running battles
*/
case class ChatRooms(
@jsonField("chat") rooms: List[ChatRoomInfo],
sectionTitles: List[String],
userCount: Count,
battleCount: Count
) derives JsonDecoder
object ChatRooms:
given MessageDecoder[ChatRooms] = MessageDecoder.fromJson