SetsApi

class SetsApi(config: ScryfallConfig = ScryfallConfig(), engine: HttpClientEngine? = null, logger: (String) -> Unit? = null) : ScryfallBaseApi

A Set object represents a group of related Magic cards. All Card objects on Scryfall belong to exactly one set. https://scryfall.com/docs/api/sets

Constructors

Link copied to clipboard
constructor(config: ScryfallConfig = ScryfallConfig(), engine: HttpClientEngine? = null, logger: (String) -> Unit? = null)

Functions

Link copied to clipboard
suspend fun all(format: String? = "json", pretty: Boolean? = false): ScryfallList<Set>

Returns a List object of all Sets on Scryfall. https://scryfall.com/docs/api/sets/all

Link copied to clipboard
suspend fun byCode(code: String, format: String? = "json", pretty: Boolean? = false): Set

Returns a Set with the given set code. The code can be either the code or the mtgo_code for the set. https://scryfall.com/docs/api/sets/code

Link copied to clipboard
suspend fun byId(id: String, format: String? = "json", pretty: Boolean? = false): Set

Returns a Set with the given Scryfall id. https://scryfall.com/docs/api/sets/id

Link copied to clipboard
suspend fun byTcgPlayerId(id: String, format: String? = "json", pretty: Boolean? = false): Set

Returns a Set with the given tcgplayer_id, also known as the groupId on TCGplayer’s API. https://scryfall.com/docs/api/sets/tcgplayer