# 使用方法

### 接口地址

```
https://api.8i5.net/yan
```

### 返回格式

```
JSON
```

### 请求方式

```
GET/POST
```

### 调用参数

#### 响应参数

| 参数名         | 类型  | 描述                               |
| ----------- | --- | -------------------------------- |
| content     | 字符串 | 随机获取的一句话                         |
| created\_at | 字符串 | 句子创建时间，格式为 `YYYY-MM-DD HH:MM:SS` |
| updated\_at | 字符串 | 句子更新时间，格式为 `YYYY-MM-DD HH:MM:SS` |

### 示例请求

```
GET https://api.8i5.net/yan/ HTTP/1.1
Host: api.8i5.net
```

### 返回实例

```
{"data":{"content":{"id":null,"content":"抛弃时间的人时间抛弃他。","created_at":"2024-05-09 01:35:07","updated_at":"2024-05-09 01:35:07"}},"status":1,"msg":"Oaklee Api数据获取成功！"}
```

### 使用方法

PHP:

```php
<?php
$url = "https://api.8i5.net/yan";

// 发起 GET 请求
$response = file_get_contents($url);

// 解析 JSON 响应
$data = json_decode($response, true);

// 提取句子内容
$content = $data['data']['content']['content'];
echo $content;
?>

```

Java Script:

```
<div id="quote"></div>

    <script>
        function fetchQuote() {
            fetch('https://api.8i5.net/yan')
            .then(response => response.json())
            .then(data => {
                const quote = data.data.content.content;
                document.getElementById('quote').textContent = quote;
            })
            .catch(error => console.error('Error fetching quote:', error));
        }

        // 初次加载页面时获取句子
        fetchQuote();
    </script>
```


---

# 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/zhong-guo-shi-ci/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.
