{"openapi":"3.1.0","info":{"title":"GatheRs API","version":"0.1.0"},"paths":{"/mtg/cards/search":{"post":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":10,"minimum":0},"style":"form"},{"in":"query","name":"skip","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"}],"requestBody":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APICardSearchFilters"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APICard"}}}}}}}},"/mtg/cards":{"get":{"parameters":[{"in":"query","name":"ids","schema":{"type":"array","default":[],"items":{"type":"string"}},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/APICard"}}}}}}}},"/mtg/sets":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}}}},"/mtg/update":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/riftbound/cards/search":{"post":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":10,"minimum":0},"style":"form"},{"in":"query","name":"skip","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"}],"requestBody":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APICardSearchFilters"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIRiftboundCard"}}}}}}}},"/riftbound/cards":{"get":{"parameters":[{"in":"query","name":"ids","schema":{"type":"array","default":[],"items":{"type":"string"}},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/APIRiftboundCard"}}}}}}}},"/riftbound/sets":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}}}},"/riftbound/update":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/pokemon/cards/search":{"post":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":24,"minimum":0},"style":"form"},{"in":"query","name":"skip","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"}],"requestBody":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APICardSearchFilters"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIPokemonCard"}}}}}}}},"/pokemon/cards":{"get":{"parameters":[{"in":"query","name":"ids","schema":{"type":"array","default":[],"items":{"type":"string"}},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/APIPokemonCard"}}}}}}}},"/pokemon/sets":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}}}},"/collection/list":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}}}}}}}},"/collection/add":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionAddResponse"}}}}}}},"/collection/remove/{id}":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionRemoveResponse"}}}}}}},"/collection/move/{id}":{"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCard"}}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/collection/cards/{id}/list":{"get":{"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","format":"uint","default":24,"minimum":0},"style":"form"},{"in":"query","name":"offset","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCard"}}}}}}}},"/collection/cards/{id}/count":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"integer","format":"uint","minimum":0}}}}}}},"/collection/search":{"post":{"parameters":[{"in":"query","name":"offset","schema":{"type":"integer","format":"uint","default":0,"minimum":0},"style":"form"},{"in":"query","name":"page_size","schema":{"type":"integer","format":"uint","default":24,"minimum":0},"style":"form"}],"requestBody":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APICardSearchFilters"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResultCard"}}}}}}}},"/collection/cards/{id}/add":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardToAdd"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCard"}}}}}}}},"/collection/cards/{id}/delete":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardToAdd"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionCard"}}}}}}}},"/system":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemInfo"}}}}}}}},"components":{"schemas":{"APICard":{"type":"object","properties":{"artist":{"type":"string"},"cardIdentifiers":{"$ref":"#/components/schemas/APICardIdentifiers"},"colorIdentity":{"type":"array","items":{"$ref":"#/components/schemas/APICardColour"}},"id":{"type":"string"},"name":{"type":"string"},"rarity":{"$ref":"#/components/schemas/APIRarity"},"setCode":{"type":"string"},"text":{"type":"string"}},"required":["id","name","setCode","rarity","artist","colorIdentity","text","cardIdentifiers"]},"APICardColour":{"type":"string","enum":["White","Blue","Black","Red","Green","Colourless","Multicoloured"]},"APICardDomain":{"type":"string","enum":["Calm","Chaos","Fury","Mind","Body","Order","Colorless"]},"APICardIdentifiers":{"type":"object","properties":{"id":{"type":"string"},"scryfallId":{"type":"string"}},"required":["id","scryfallId"]},"APICardSearchFilters":{"description":"Server-local version of `models::filters::CardSearchFilters` with `JsonSchema`.","type":"object","properties":{"artist":{"type":["string","null"]},"collector_number":{"type":["string","null"]},"color_identities":{"type":["array","null"],"items":{"$ref":"#/components/schemas/APICardColour"}},"domains":{"type":["array","null"],"items":{"$ref":"#/components/schemas/APICardDomain"}},"energy_types":{"type":["array","null"],"items":{"$ref":"#/components/schemas/APIEnergyType"}},"name":{"type":["string","null"]},"rarity":{"anyOf":[{"$ref":"#/components/schemas/APIRarity"},{"type":"null"}],"default":null},"set_code":{"type":["string","null"]},"subtypes":{"type":["array","null"],"items":{"type":"string"}},"supertypes":{"type":["string","null"]},"text":{"type":["string","null"]},"types":{"type":["array","null"],"items":{"type":"string"}}}},"APIEnergyType":{"type":"string","enum":["Fire","Water","Grass","Lightning","Psychic","Fighting","Darkness","Metal","Dragon","Fairy","Colorless","Energy"]},"APIPokemonCard":{"type":"object","properties":{"cardType":{"type":"string"},"collectorNumber":{"type":"string"},"energyTypes":{"type":"array","items":{"$ref":"#/components/schemas/APIEnergyType"}},"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"},"rarity":{"$ref":"#/components/schemas/APIPokemonRarity"},"setCode":{"type":"string"}},"required":["id","name","setCode","rarity","image","energyTypes","cardType","collectorNumber"]},"APIPokemonRarity":{"type":"string","enum":["Common","DoubleRare","Uncommon","Rare","RadiantRare","UltraRare","SecretRare","HoloRare","Promo","ClassicCollection","AmazingRare","ShinyHoloRare","PrismRare","RareBreak","RareAce","SpecialIllustrationRare","IllustrationRare","HyperRare","CodeCard","ShinyRare","ShinyUltraRare","AceSpecRare","BlackWhiteRare","MegaHyperRare","MegaAttackRare"]},"APIRarity":{"type":"string","enum":["Common","Uncommon","Rare","Mythic","Special","Bonus"]},"APIRiftboundCard":{"type":"object","properties":{"artists":{"type":"array","items":{"type":"string"}},"domains":{"type":"array","items":{"$ref":"#/components/schemas/APICardDomain"}},"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"},"rarity":{"$ref":"#/components/schemas/RBRarity"},"setCode":{"type":"string"},"text":{"type":"string"}},"required":["id","name","setCode","rarity","artists","domains","text","image"]},"CardIdentInner":{"type":"object","properties":{"scryfallId":{"type":"string"}},"required":["scryfallId"]},"CardToAdd":{"type":"object","properties":{"foilQuantity":{"type":"integer","format":"int32"},"id":{"type":"string"},"quantity":{"type":"integer","format":"int32"}},"required":["id","quantity","foilQuantity"]},"Collection":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"CollectionAddResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"CollectionCard":{"type":"object","properties":{"collectionId":{"type":"string"},"foilQuantity":{"type":"integer","format":"int32"},"id":{"type":"string"},"provider":{"type":"string","default":""},"quantity":{"type":"integer","format":"int32"},"timeAdded":{"type":"string","format":"date-time"}},"required":["id","quantity","foilQuantity","collectionId","timeAdded"]},"CollectionCardsQuery":{"type":"object","properties":{"limit":{"type":"integer","format":"uint","default":24,"minimum":0},"offset":{"type":"integer","format":"uint","default":0,"minimum":0}}},"CollectionRemoveResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"CollectionsSearchQuery":{"type":"object","properties":{"offset":{"type":"integer","format":"uint","default":0,"minimum":0},"page_size":{"type":"integer","format":"uint","default":24,"minimum":0}}},"DownloadProgressInfo":{"type":"object","properties":{"downloaded":{"type":"integer","format":"uint64","minimum":0},"phase":{"type":"string"},"total":{"type":"integer","format":"uint64","minimum":0}},"required":["downloaded","total","phase"]},"MagicRetrieveQuery":{"type":"object","properties":{"ids":{"type":"array","default":[],"items":{"type":"string"}}}},"MagicSearchQuery":{"type":"object","properties":{"limit":{"type":"integer","format":"uint","default":10,"minimum":0},"skip":{"type":"integer","format":"uint","default":0,"minimum":0}}},"PokemonRetrieveQuery":{"type":"object","properties":{"ids":{"type":"array","default":[],"items":{"type":"string"}}}},"PokemonSearchQuery":{"type":"object","properties":{"limit":{"type":"integer","format":"uint","default":24,"minimum":0},"skip":{"type":"integer","format":"uint","default":0,"minimum":0}}},"RBRarity":{"type":"string","enum":["Common","Uncommon","Rare","Epic","Showcase"]},"ResultCard":{"type":"object","properties":{"mtGCard":{"$ref":"#/components/schemas/ResultCardInner"}},"required":["mtGCard"]},"ResultCardInner":{"type":"object","properties":{"cardIdentifiers":{"$ref":"#/components/schemas/CardIdentInner"},"id":{"type":"string"},"name":{"type":"string"},"setCode":{"type":"string"}},"required":["id","name","setCode","cardIdentifiers"]},"RiftboundRetrieveQuery":{"type":"object","properties":{"ids":{"type":"array","default":[],"items":{"type":"string"}}}},"RiftboundSearchQuery":{"type":"object","properties":{"limit":{"type":"integer","format":"uint","default":10,"minimum":0},"skip":{"type":"integer","format":"uint","default":0,"minimum":0}}},"SystemInfo":{"type":"object","properties":{"downloading":{"description":"Systems whose databases are currently being downloaded, with progress info.","type":"object","additionalProperties":{"$ref":"#/components/schemas/DownloadProgressInfo"}},"system":{"description":"Primary active system, identified by NamedRetrievalSystem::name().","type":"string"},"systems":{"description":"All active systems, identified by NamedRetrievalSystem::name().\nThese strings also match the `provider` field stored on collection cards.","type":"array","items":{"type":"string"}}},"required":["system","systems","downloading"]}}}}