Coder Social home page Coder Social logo

aa335711 / hitokotoapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flyingsky-cn/hitokotoapi

0.0 0.0 0.0 125 KB

基于 PHP 的一言 API (Hitokoto/ヒトコト),非使用数据库(不依赖任何在线API和本地数据库调用一言)。

License: Apache License 2.0

PHP 100.00%

hitokotoapi's Introduction

一言 API (Hitokoto/ヒトコト)

基于 PHP 的一言 API (Hitokoto/ヒトコト),非使用数据库(不依赖任何在线API和本地数据库调用一言)。

什么是一言

动漫也好、小说也好、网络也好,不论在哪里,我们总会看到有那么一两个句子能穿透你的心。「一言」就好似一个公开的摘抄本,我们在此记录那些让人一眼就有所感触的短句,并通过公共 API 的形式使你能够在自己的项目中调用它们。

调用方法

GET

参数说明

参数名 类型 含义 默认
charset string 返回字符集,支持 utf-8 / gbk utf-8
encode string 返回数据格式
time int 值为1时在最后输出运行时间,仅供测试使用

数据格式说明

参数值 含义
json 返回 JSON 格式数据
js 返回函数名为 hitokoto 的 JavaScript 脚本
返回纯文本

响应数据

下面是实际请求一次 index.php?encode=json 的结果:

{
"hitokoto":"扎古不论怎么化妆都不可能变成高达的。"
}

hitokotoapi's People

Contributors

flyingsky-cn avatar owucat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.