- Fixed missing
hybrid
field in card symbols.
- Add the potentiality of colourless mana (
"C"
) toCard.produced_mana
.
- Added support for setting the agent name due to Scryfall's new requirements via
Scry.setAgent(name, version)
(./DOCUMENTATION.md#scrysetagent-agent-string-version-string-void-). All applications using scryfall-sdk that are not running on clientside in the browser must provide an agent name & version.
- Fixed
MagicEmitters
(IE, what's returned byCards.search()
) erroring if not every possible event has a listener registered, thanks to #69 by lordnox.
- Fixed Cards.search not working with an explicit page number, thanks to thejoecode via #68.
- Workaround some bundlers doing dumb things still
- Added many missing or modified fields returned by Scryfall.
- Added support for Catalog.supertypes
- Workaround some bundlers doing dumb things
- Scryfall-sdk is now once again compatible with older node versions. If you install axios alongside scryfall-sdk, it will automatically use it. Trying to use scryfall-sdk with an older node version without having axios installed will throw an error.
- Thanks to Kevin Lowe via #62, added full-text query support to the
Scry.Cards.random
function.
- Wrote a lil polyfill for node:events when it doesn't exist, should make the module work in browser with no fancy rollup type stuff needed.
Was a bit too fast on the draw with the 4.0.0 release, did not build it locally and just ended up publishing 3.3.0 as 4.0.0 instead. Whoops.
- Removed axios dependency in favour of native
fetch
, thanks to mlavina via #59. This requires at least node v18, hence a major bump!
- Added support for Scryfall's new "migrations" endpoint. Note that this endpoint is still in beta, so something might break in the future with it.
- Added support for querying cards by their Cardmarket IDs.
- Bumped axios dependency up to v1.3.1. Updates and fixes provided by furgin — thank you!
- Added missing
svg_uri
field to CardSymbol interface. - Updated
compressed_size
field tosize
. - Both strings and numbers are now accepted in all places requiring a collector number.
- Fixed tests. (Scryfall's returned card images uri changed.)
- Undid that last fix and replaced with one that actually works how it was originally intended.
- Removed "homepage links" support as the API doesn't work for them anymore.
- Fixed
.cancelAfterPage().waitForAll()
never resolving.
Scry.Sets.all
is now cached.- Added
Scry.Sets.byName
andScry.setFuzzySearch
.
Scry.error()
has been removed. When queries error, it now rejects the promise they return rather than returningundefined
or{ data: [], not_found: [] }
- Cards and sets now come with helper methods to make consuming the data a little bit more convenient.
- You can now configure the request timeout with
Scry.setTimeout
- Many (not all) query functions now have cached results. You can configure the cache duration with
Scry.setCacheDuration
, and the max objects cached withScry.setCacheLimit
- Some Scryfall field updates provided by sili3011. Thanks!
- Updated axios to fix a security vulnerability
- Now compiled in strict mode, which catches a bunch of issues for consumers of the module
- Fixed other misc issues caught by enabling strict mode
- Removed
Cards.all
method as Scryfall has removed the endpoint from their API. Cards.search
now supports passing a page number in place ofSearchOptions
.- Added better support for downloading bulk data from Scryfall, accessible via
Scry.BulkData
Misc.bulkData()
is nowBulkData.definitions()
- Added
BulkData.definitionById
,BulkData.definitionByType
. - Added
BulkData.downloadById
,BulkData.downloadByType
, both of which take alastDownload
time and, if the bulk data has been updated since the last download, return aStream
for the download to be consumed as you see fit.
Note: In cases where you have a proper reason for paginating through every single card in Scryfall's database, such as displaying a paginated list to the user of your application, you can use any query which matches all cards, such as Cards.search("year>0")
. Please respect Scryfall and only do this if you need to, though. If you just need to download all the cards, use the new and improved bulk data support!
- Added
not_found
array property toMagicEmitter.waitForAll()
return. AddedMagicEmitter.notFound()
. Based on a PR by aSlug
- Changed
set_type
on Card objects to the type of Set objects'set_type
.
- Added some missing properties to the Card object.
- Thanks to a contribution from codetheweb, added support for the
bulk-data
endpoint.
- Updated all data interfaces to those described in Scryfall's Docs.
- Including two updates by kasorin. Thanks!
- Added support for getting
CardIdentifier
s by their oracle and illustration IDs. - Normalised all "null or missing" properties to actually be
null
or missing.
- Updated axios to fix a security issue.
- Thanks to a contribution from somkun, the Scryfall SDK now uses Axios instead of Request Promise
- Added
Scry.setRetry
- There was heavy refactoring in this update. You may notice some d.ts changes, most of that is updating interfaces as per the Scryfall documentation and not exporting some interfaces/enums.
- Added
Cards.collection(...identifiers: CardIdentifier[])
- Added
Cards.byTcgPlayerId(id: number)
- Added
Sets.byId(id: string)
- Added
Sets.byTcgPlayerId(id: number)
- Added
Rulings.byArenaId(id: number)
- Added
Catalog.artistNames()
- Added
"done"
event to theMagicEmitter
, which is fired when the emitter ends, errors, or is cancelled. - Fixed a potential security issue (low severity; Scryfall would have to intentionally have served corrupted data or an attacker would have to intercept the data from Scryfall).
- Fixed
RelatedUris
andPurchaseUris
throwing errors in some configurations.
- Added support for filtering
Cards.byName()
by set. #10 Thanks dantolini!
- Added an optional
page
parameter toCards.all()
, defaulting to1
. To get only the one page, you can callcancelAfterPage()
on the resultingMagicEmitter
. - Added an optional
lang
parameter toCards.bySet()
. See the Scryfall Documentation for a list of valid languages. - Added support for
/cards/arena/:id
Fixed waitForAll
throwing an uncatchable promise rejection error.
Misc updates. Now using a Typescript Gulp file and Gulp@4.0
New features:
- Search options
MagicEmitter.all()
- Updated
IScry.ts
with new/updated card fields.
New features:
Fixed an issue that caused the first page of results to be duplicated. How did I miss that for so long?
Fixed broken tests, some code cleanup
Initial release