Skip to content

Commit

Permalink
delete function: remove API
Browse files Browse the repository at this point in the history
  • Loading branch information
pwxcoo committed Dec 16, 2018
1 parent 2d2392b commit dd68328
Showing 1 changed file with 5 additions and 60 deletions.
65 changes: 5 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

中华新华字典数据库和 API 。收录包括 14032 条歇后语,16142 个汉字,264434 个词语,31648 个成语。

对性能没需求的话,可以用我的新华字典 API 。所有的数据放在 `data/` 目录。

## Project Structure

```
Expand Down Expand Up @@ -93,70 +91,17 @@ chinese-xinhua/
]
```

## API Interfaces

`GET``POST` 均可。用 `GET` 做示例,`POST` 同理。返回数据格式为 `JSON`

### 成语

<details><summary>示例1(直接请求成语) </summary>

需要两个参数
- `type=idiom` 表示需要请求成语
- `word=兴高采烈 ` 表示请求的成语
```
https://www.pwxcoo.com/dictionary?type=idiom&word=兴高采烈
```
[示例一](https://www.pwxcoo.com/dictionary?type=idiom&word=%E5%85%B4%E9%AB%98%E9%87%87%E7%83%88)

</details>


<details><summary>示例2 (请求拼音首字母缩写) </summary>

需要两个参数
- `type=idiom` 表示需要请求成语
- `abbreviation=xgcl` 表示请求的成语拼音首字母缩写
```
https://www.pwxcoo.com/dictionary?type=idiom&abbreviation=xgcl
```
[示例二](https://www.pwxcoo.com/dictionary?type=idiom&abbreviation=xgcl)

</details>

### 歇后语
## Changelog

<details><summary>示例1(请求歇后语) </summary>

需要两个参数
- `type=xiehouyu` 表示需要请求歇后语
- `riddle=王婆 ` 表示请求的歇后语的语面。可以模糊匹配
```
https://www.pwxcoo.com/dictionary?type=xiehouyu&riddle=王婆
```
<details><summary>查看更新日志 </summary>

[示例一](https://www.pwxcoo.com/dictionary?type=xiehouyu&riddle=%E7%8E%8B%E5%A9%86)
- 20181216: API 功能下线。
- 20180803: 添加词语数据集
- 20180206: 添加成语,歇后语,汉字数据集

</details>



### 汉字

<details><summary>示例1 (直接请求汉字) </summary>

需要两个参数
- `type=word` 表示需要请求汉字
- `word=吴` 表示请求的汉字
```
https://www.pwxcoo.com/dictionary?type=word&word=吴
```
[示例一](https://www.pwxcoo.com/dictionary?type=word&word=%E5%90%B4)

</details>



## Copyright

本仓库的所有的数据都是我从网上收集整理的。仓库本来的目的是因为我以前想做一个成语接龙的东西,但是苦于没有现成可用的数据库,自己就从各个网站抓取整理了一份。放在 Github 是为了方便自己的使用,同时也能方便有类似需求的人不用去做这些 trival 的工作。所有抓取数据的脚本都在仓库里。
Expand Down

0 comments on commit dd68328

Please sign in to comment.