Skip to content

bmbowdish/Swiftfall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swiftfall

Swiftfall is a wrapper written in Swift for the API Scryfall.

Documentation for Scryfall API.

Scryfall is API which handles information about the card game Magic: The Gathering.

What works?

Types

All types are Structs and can be reach through a Swiftfall.get*().

All Structs have a print function called simplePrint().

Card?

  • Struct containing data about a Magic Card

Set?

  • Struct containing data about a Set of Magic cards

CardList?

  • Struct containing a list of Cards

SetList?

  • Struct containing a list of Sets

Functions

These are some functions you can call which will handle information from Scryfall's API.

Get a Card

Swiftfall.getCard(fuzzy:String) -> Card? (Fuzzy search)

Swiftfall.getCard(exact:String) -> Card? (Exact search)

Swiftfall.getRandomCard() -> Card? (Random Card)

Get a list of Cards

Swiftfall.getCardList() -> CardList? (The first page)

Swiftfall.getCardList(page:Int) -> CardList? (Loads a specific page)

Get a Set

Swiftfall.getSet(code:String) -> Set? (String must be a three letter code)

Get a list of Set

Swiftfall.getSetList() -> SetList? (All Sets)