Search Service File Structure
DirectorySNAPCASTER-BACKEND
Directoryservices
Directorysearch
Directorydependencies
Directoryroutes
- .gitignore
- Dockerfile
- main.py
- requirements.txt
- …
GET /health
Returns a health
object which makes sure that the search service is able to connect to the Mongo database.
HTTP 200 OK | message: Service is running, num_docs:[#]
HTTP 500 Internal Server Error | message: Service is down, error:[Exception e]
Health Check Object
Property | Type | Details |
---|
message | String | Details about service status |
num_docs | String | Number of documents in the shopify and crystal commerce collections |
GET /sets
Returns a list of Sets
Objects.
HTTP 200 OK | List[Sets Object]
HTTP 500 Internal Server Error | message: sets endpoint is down
Sets Object
Property | Type | Details |
---|
name | String | The set name |
abbreviation | String | The set code abbreviation |
GET /websites
Returns a list of Websites
Objects.
HTTP 200 OK | Websites Object
HTTP 500 Internal Server Error | message: websites endpoint is down
Websites Object
Property | Type | Details |
---|
slug | String | Store Slug |
name | String | Store Name |
url | String | Store URL |
tcgs | List[String] | TCG’s supported |
POST /advanced
Returns a list of Advanced
Objects.
HTTP 200 OK | List[Advanced Object]
HTTP 401 Unauthorized | Subscription Required
Advanced Object
Property | Type | Details |
---|
name | String | The card name |
set | String | The set the card belongs to |
price | Double | The cost of the card |
foil | String | The type of foil of the card (e.g. Regular Foil, Etched Foil, Galaxy Foil, etc). |
condition | String | The card condition |
image | String | The original image URL from the website scraped |
link | String | The link to the product |
website | String | The local game store name |
frame | String | The type of framing of the card (e.g. Extended, Borderless, Full Art, etc.). |
alternate_art | Boolean | Specify if the card is a alternate art card |
alternate_art_japanese | Boolean | Specify if the card is a japanese alternate art card |
showcase | String | The Showcase treatment of the card (e.g. Anime, Sketch, Ring Frame, etc). |
promo | String | Specify if the card is a promo card |
promo_pack | String | Specify if the card is a promo pack card |
promo_prerelease | String | Specify if the card is a promo pre-release card |
art_series | Boolean | Specify if the card is a art series card |
golden_stamped_art_series | Boolean | Specify if the card is a alternate art card |
Advanced Parameters
Property | Type | Mandatory | Details |
---|
cardName | String | Mandatory | The card name |
website | List[String] | | A list of Local Game Stores |
condition | List[String] | | A list of acceptable conditions |
foil | List[String] | | A list of foil treatments |
showcaseTreatment | List[String] | | A list of showcase treatments |
frame | List[String] | | A list of card frame types |
set | List[String] | | A list of different MTG card sets to query based on |
preRelease | Boolean | | Specify if the card is a pre-release card |
promo | Boolean | | Specify if the card is a promo card |
alternate_art | Boolean | | Specify if the card is a alternate art card |
alternate_art_japanese | Boolean | | Specify if the card is a japanese alternate art card |
art_series | Boolean | | Specify if the card is a art series card |
golden_stamped_art_series | Boolean | | Specify if the card is a gold stamped series card (This implies that it’s also an art series card) |