Magic The Gathering AI Duelist

Magic The Gathering AI Duelist · GPT 작업

Magic The Gathering API

API for accessing Magic The Gathering card and set information.

  • GET /cardsRetrieve a list of Magic The Gathering cards.
원본 API 스키마
{
  "openapi": "3.0.0",
  "info": {
    "title": "Magic The Gathering API",
    "description": "API for accessing Magic The Gathering card and set information.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.magicthegathering.io/v1",
      "description": "Magic The Gathering API Server"
    }
  ],
  "paths": {
    "/cards": {
      "get": {
        "operationId": "getAllCards",
        "summary": "Retrieve a list of Magic The Gathering cards.",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Page number of the card list."
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100
            },
            "description": "Number of cards per page."
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated array of cards.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cards": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Card"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Card": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "rarity": {
            "type": "string"
          }
        }
      }
    }
  }
}