Skip to content

Commit 1cddf26

Browse files
committed
mv object, fix doc, update readme
1 parent 369a601 commit 1cddf26

16 files changed

Lines changed: 13 additions & 48 deletions

File tree

README.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,3 @@ This library uses [semver] for versioning. These versions only describe this lib
1111
All exported types are prefixed with `Scryfall`, so that we can declare e.g. `ScryfallSet`, `ScryfallObject`, and `ScryfallError` without clashing with the built-in `Set`, `Object`, and `Error` types.
1212

1313
Enum fields are always defined in two ways: as the Enum, and as an Enum-like string. This permits you to interact with this system using our enums, just strings, or your own enums—whatever you'd prefer.
14-
15-
## Using this as a dependency for your library
16-
17-
There's essentially two main ways you might use this project:
18-
19-
- Your own independent project that nobody will be installing as a dependency.
20-
- Your own library that requires this as a dependency, and which others will install.
21-
22-
In the first case, install this as a dependency or a dev dependency.
23-
24-
In the second case, consider whether you are forwarding Scryfall types on to consumers of your library.
25-
26-
- Are you converting our data to your own system of types, and supplying those to consumers? (e.g. you're writing a Scryfall API that has its own rigorous way of describing cards)
27-
- Are you supplying these objects as-is to consumers? (e.g. you're writing a Scryfall API that just fetches cards and returns them as-is using our typing)
28-
29-
In the first of these cases, we advise you install this as a dev dependency.
30-
31-
In the second case however, we advise you require a given major version of this library **as a peer dependency, not a dependency**, so that consumers of your library can continue to update their reference to the Scryfall API without requiring you to do so as well, as follows:
32-
33-
```js
34-
// in package.json
35-
{
36-
name: "mylibrary",
37-
peerDependencies: {
38-
// The major version others should use.
39-
// Optionally include a minor version minimum.
40-
"@scryfall/api-types": "1.x >=1.2",
41-
},
42-
devDependencies: {
43-
// The version you use for your work.
44-
"@scryfall/api-types": "1.2.3",
45-
}
46-
}
47-
```

index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/objects/Card/Card.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ScryfallObject } from "../../ScryfallObject";
1+
import { ScryfallObject } from "../ScryfallObject";
22
import { ScryfallCardLayout } from "./values/CardLayout";
33
import { ScryfallCardFace } from "./CardFace";
44
import { ScryfallCardFields } from "./CardFields";

src/objects/Card/CardFace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ScryfallObject } from "../../ScryfallObject";
1+
import { ScryfallObject } from "../ScryfallObject";
22
import { ScryfallCardFields } from "./CardFields";
33

44
export namespace ScryfallCardFace {

src/objects/Card/CardFields.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export namespace ScryfallCardFields.Print {
282282
promo: boolean;
283283
/** An array of strings describing what categories of promo cards this card falls into. */
284284
promo_types?: ScryfallPromoType[];
285-
/** An object providing URIs to this card’s listing on major marketplaces. Omitted if the card is unpurchaseable. */
285+
/** An object providing URIs to this card’s listing on major marketplaces. Omitted if the card is unpurchaseable. */
286286
purchase_uris?: PurchaseUris;
287287
/** This card’s rarity. */
288288
rarity: ScryfallRarityLike;

src/objects/Card/RelatedCard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ScryfallObject } from "../../ScryfallObject";
1+
import { ScryfallObject } from "../ScryfallObject";
22
import { Uri, Uuid } from "../../internal/values";
33

44
export type ScryfallRelatedCard = ScryfallObject.Object<ScryfallObject.ObjectType.RelatedCard> & {

src/objects/Catalog/Catalog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ScryfallObject } from "../../ScryfallObject";
1+
import { ScryfallObject } from "../ScryfallObject";
22
import { Uri, Integer } from "../../internal/values";
33

44
export type ScryfallCatalog = ScryfallObject.Object<ScryfallObject.ObjectType.Catalog> & {

src/objects/Error/Error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ScryfallObject } from "../../ScryfallObject";
1+
import { ScryfallObject } from "../ScryfallObject";
22
import { Integer } from "../../internal/values";
33

44
export type ScryfallError = ScryfallObject.Object<ScryfallObject.ObjectType.Error> & {

src/objects/List/List.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ScryfallObject } from "../../ScryfallObject";
1+
import { ScryfallObject } from "../ScryfallObject";
22
import { Integer, Uri } from "../../internal/values";
33
import { ScryfallCard } from "../Card";
44
import { ScryfallMigration } from "../Migration";

src/objects/Migration/Migration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ScryfallObject } from "../../ScryfallObject";
1+
import { ScryfallObject } from "../ScryfallObject";
22
import { Uri, Uuid, IsoDate } from "../../internal/values";
33

44
export enum ScryfallMigrationStrategy {

0 commit comments

Comments
 (0)