易经占卜师(Divination with I Ching周易)

易经占卜师(Divination with I Ching周易) · GPT 작업

Hexagram API

通过三个参数获取易经卦象信息。

  • GET /hexagram获取易经卦象信息

    根据index1, index2和index3参数返回对应的易经卦象信息。

원본 API 스키마
{
  "openapi": "3.1.0",
  "info": {
    "title": "Hexagram API",
    "description": "通过三个参数获取易经卦象信息。",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://luckypepe.fun/api/jfqbal",
      "description": "主服务器"
    }
  ],
  "paths": {
    "/hexagram": {
      "get": {
        "operationId": "getHexagramInfo",
        "summary": "获取易经卦象信息",
        "description": "根据index1, index2和index3参数返回对应的易经卦象信息。",
        "parameters": [
          {
            "name": "index1",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 100,
              "maximum": 999
            },
            "description": "三位数的数字参数"
          },
          {
            "name": "index2",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 100,
              "maximum": 999
            },
            "description": "三位数的数字参数"
          },
          {
            "name": "index3",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 100,
              "maximum": 999
            },
            "description": "三位数的数字参数"
          }
        ],
        "responses": {
          "200": {
            "description": "返回对应的易经卦象信息",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HexagramResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求参数无效"
          },
          "401": {
            "description": "未授权,缺少或无效的令牌"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "HexagramResponse": {
        "type": "object",
        "properties": {
          "hexagramName": {
            "type": "string",
            "description": "卦名",
            "example": "升卦"
          },
          "hexagramSymbol": {
            "type": "string",
            "description": "符号",
            "example": "䷭"
          },
          "hexagramJudgement": {
            "type": "string",
            "description": "卦辞",
            "example": "升:元亨 ,用见大人,勿恤,南征吉。"
          },
          "hexagramImage": {
            "type": "string",
            "description": "卦象",
            "example": "地中生木,升;君子以顺德,积小以高大。"
          },
          "beijingTime": {
            "type": "string",
            "format": "date-time",
            "description": "北京时间",
            "example": "2024-06-12T10:18:51"
          },
          "lineText": {
            "type": "string",
            "description": "爻辞",
            "example": "初六:允升,大吉。"
          },
          "lineJudgement": {
            "type": "string",
            "description": "结果",
            "example": "吉"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}