首页 教育亲子 鬼谷子
鬼谷子

鬼谷子

  • 1547
  • 1265
战国“鬼谷子”王诩所作,侧重于权谋策略及言谈辩论技巧。
免费
https://api.jisuapi.com/guiguzi/chapter
JSON,JSONP
GET
https://api.jisuapi.com/guiguzi/chapter?appkey=yourappkey

请求参数:

API在线测试
参数名称类型必填说明

返回参数:

参数名称类型说明
chapterid int 章节ID
chaptername string 章节名称
parentid int 上级ID
detailid int 详情ID
name string 名称

请求代码:

查看代码
<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$url = "https://api.jisuapi.com/guiguzi/chapter?appkey=$appkey";
$result = curlOpen($url, ['ssl'=>true]);
$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));

if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}

$result = $jsonarr['result'];
foreach($result as $val)
{
    echo $val['chapterid'].' '.$val['chaptername'].' '.$val['parentid'].'
'; if(is_array($val['list'])) { foreach($val['list'] as $k=>$v) { echo $v['detailid'].' '.$v['name'].'
'; } } }

JSON返回示例 :

{
    "status": 0,
    "msg": "ok",
    "result": [
        {
            "chapterid": "1",
            "chaptername": "鬼谷子",
            "parentid": "0",
            "list": [
                {
                    "detailid": "1",
                    "name": "捭阖"
                },
                {
                    "detailid": "2",
                    "name": "反应"
                },
                {
                    "detailid": "3",
                    "name": "内楗"
                },
                {
                    "detailid": "4",
                    "name": "抵戏"
                },
                {
                    "detailid": "5",
                    "name": "飞箝"
                },
                {
                    "detailid": "6",
                    "name": "忤合"
                },
                {
                    "detailid": "7",
                    "name": "揣篇"
                },
                {
                    "detailid": "8",
                    "name": "摩篇"
                },
                {
                    "detailid": "9",
                    "name": "权篇"
                },
                {
                    "detailid": "10",
                    "name": "谋篇"
                },
                {
                    "detailid": "11",
                    "name": "决篇"
                },
                {
                    "detailid": "12",
                    "name": "符言"
                },
                {
                    "detailid": "13",
                    "name": "转丸(亡)"
                },
                {
                    "detailid": "14",
                    "name": "却乱(亡)"
                }
            ]
        }
    ]
}
                    

API错误码:

代号说明
201 关键词为空
202 详情ID为空
203 没有信息

系统错误码:

代号说明
101 APPKEY为空或不存在
102 APPKEY已过期
103 APPKEY无请求此数据权限
104 请求超过次数限制
105 IP被禁止
106 IP请求超过限制
107 接口维护中
108 接口已停用

活动推荐ACTIVITY 更多

  • orc活动

其它推荐RECOMMENDED DATA 更多