# 使用方法

### 概述

本API提供了获取驾考题目的功能，用户可以通过发送HTTP请求获取相关题目信息

### 请求URL

```
GET https://api.8i5.net/drving/
```

### 请求参数

| 参数名       | 类型  | 必须 | 描述                     |
| --------- | --- | -- | ---------------------- |
| `subject` | 数字  | 是  | 考试科目类型，1：科目一；4：科目四     |
| `type`    | 字符串 | 否  | 题目类型，默认为C1             |
| `sort`    | 数字  | 否  | 1.随机测试 2.顺序测试，默认2.顺序测试 |
| `page`    | 数字  | 否  | 页码，默认为1                |
| `maxSize` | 数字  | 否  | 每页返回的数据条数，最大值为15       |

### 示例

#### 请求

```http
GET https://api.8i5.net/drving/questions?subject=1&type=C1&sort=2&page=1&maxSize=5
```

#### 响应

```

{
  "code": 200,
  "data": [
    {
      "question": "驾驶机动车在道路上违反道路交通安全法规行为构成什么行为？",
      "opt1": "A、违法行为",
      "opt2": "B、违章行为",
      "opt3": "C、违纪行为",
      "opt4": "D、违法违章行为",
      "answer": "D",
      "explain": "违法违章行为是指驾驶机动车在道路上违反道路交通安全法规的行为。",
      "pic": ""
    },
    // 其他题目...
  ]
}

```

### 响应状态码

| 状态码 | 描述      |
| --- | ------- |
| 200 | 请求成功    |
| 400 | 缺少必要的参数 |
| 500 | 服务器内部错误 |

### 注意事项

* 请确保提供有效的 `subject`、`type`、`sort`、`page`、`maxSize` 参数。
* 返回的题目信息在 `data` 字段中，每个题目包含 `question`、`opt1`、`opt2`、`opt3`、`opt4`、`answer`、`explain`、`pic` 等信息。
* 详细的错误信息在 `msg` 字段中，如果请求成功，`msg` 为空。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-doc.8i5.net/driving-test-questions/shi-yong-fang-fa.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
