scruffy/client/migrations
Requests and response decoders for Scryfall’s Card Migrations endpoints.
Build a request with one of the *_request functions below, send it
with your own HTTP client, then decode its response with the matching
*_response function.
See https://scryfall.com/docs/api/migrations for the upstream reference.
Values
pub fn get_migration_request(
id: String,
) -> request.Request(String)
Build a request for a single card migration by its Scryfall migration
ID. Pair the response with migration_response.
pub fn list_migrations_request(
page: option.Option(Int),
) -> request.Request(String)
Build a request to list Scryfall’s card migrations, paginated and
ordered with the most recently performed migration first. Pair the
response with migration_list_response.
pub fn migration_list_response(
resp: response.Response(String),
) -> Result(
scryfall_list.ScryfallList(migrations.CardMigration),
client.ClientError,
)
Decode a response as a ScryfallList(CardMigration). Pairs with
list_migrations_request.
pub fn migration_response(
resp: response.Response(String),
) -> Result(migrations.CardMigration, client.ClientError)
Decode a response as a single CardMigration. Pairs with
get_migration_request.