class Scryfall::Api

Extended Modules

Defined in:

scryfall/api.cr

Constant Summary

SF_HEADERS = HTTP::Headers {"Content-Type" => "application/json; charset=utf-8"}
SF_HOST = "api.scryfall.com"
SF_SCHEME = "https"
SF_SEARCH_PATH = "/cards/search"

Class Method Summary

Instance Method Summary

Class Method Detail

def self.bulk_data #

[View source]
def self.catalog(catalog : String) : Scryfall::Catalog #

https://scryfall.com/docs/api/catalogs


[View source]
def self.configure(options : Options = Options.new, &) #

[View source]
def self.configure(options : Options = Options.new) #

[View source]
def self.fetch_card(id : UUID) : Scryfall::Card #

Look up card in scryfall by id


[View source]
def self.fetch_card(id : String) : Scryfall::Card #

Look up card in scryfall by id


[View source]
def self.fetch_card_by_mv(id : Int32) : Scryfall::Card #

Look up card in scryfall by multiverse id


[View source]
def self.fetch_card_by_set(set_code : String, set_num : String | Int32) : Scryfall::Card #

Look up card in scryfall by set


[View source]
def self.logger #

[View source]
def self.make_request(path : String, params : String | Nil = nil) #

Make a request with a string URI


[View source]
def self.make_request(uri : URI) #

Make a request with a URI object


[View source]
def self.make_request_uri(path : String, params : String | Nil = nil) : URI #

URI helper function


[View source]
def self.query(q : String) : CardList #

Look up cards on query


[View source]
def self.search_card_by_name(name : String, set_code : String | Nil = nil) : CardList #

Look up card in scryfall by name


[View source]
def self.sets : SetList #

Fetch set list


[View source]

Instance Method Detail

def logger #

[View source]