Scplist Api
The Scplist Api integration provides easy interaction and data handling with the: https://scplist.kr/api
Usage
All functions for the Scplist Api are located in the io.github.vxrpenter.scplist.ScpList class, and can easily imported with one line:
import io.github.vxrpenter.scplist.ScpListThe ScpList class does not need to be supplied with anything This is a short representation of correct ScpList invocation:
import io.github.vxrpenter.secretlab.SecretLab
val scpList = ScpList() Exceptions
All functions that are contained in the ScpList class throw a CallFailureException inherited from a ScpListException when a call to the api fails for any reason. You can could catch it like this:
try {
val scpList = ScpList().server(ID)
} catch (e: Exception) {
println("An error has occured during an scplist api call")
return
}Examples
Fetching server information through the ScpList Api. This returns a Server object:
import io.github.vxrpenter.scplist.ScpList
fun main() {
// Get players using the ScpListApi
val players = ScpList().serverGet("ID")?.players
}Last updated