养鱼接口文档
zhengxiaoyu edited this page 6 years ago

接口基本信息

接口地址

http://183.234.61.252:8090/

一、用户接口

1.获取用户信息

  • 参数提交方式:GET
  • 接口地址:/index.php?m=Culture&c=Player&a=getUserInfo
  • 接口参数:
参数名 数据类型 是否必须 说明
iptv_user_id string 电视端用户ID
  • 返回示例
{
    "code": 0,
    "msg": "获取用户成功",
    "data": {
        "user_id": "1",
        "avatar": "",
        "description": null,
        "scene_id": "1",
        "scene_background_id": "1",
        "coins": "123",
        "scene": {
            "scene_id": "1",
            "thumb": "https:\/\/www.expoon.com\/23928\/",
            "decorates": [{
                "decorate_id": "1",
                "decorate_name": "",
                "thumb": "",
                "decorate_type_id": "0",
                "xpoint": "0.00",
                "ypoint": "0.00",
                "scale": "1"
            }]
        },
        "scene_background": {
            "scene_background_id": "1",
            "thumb": ""
        },
        "pets": [{
            "user_pet_id": "1",
            "iptv_user_id": "123456",
            "pet_id": "1",
            "pet_name": "",
            "pet_type_id": "0",
            "pet_type_name": "",
            "thumb": "",
            "grown_value": "0",
            "decorates": [{
                "decorate_id": "1",
                "decorate_name": "",
                "thumb": "",
                "decorate_type_id": "0",
                "decorate_type_name": "",
                "user_pet_id": "1",
                "xpoint": "0.00",
                "ypoint": "0.00",
                "scale": "1"
            }]
        }]
    }
}

2.获取场景信息

  • 参数提交方式:GET
  • 接口地址:/index.php?m=Culture&c=Scene&a=getAllScene
  • 接口参数: 无
  • 返回示例
{
    "code": 0,
    "msg": "获取场景成功",
    "data": [{
        "scene_id": "1",
        "scene_name": "我的海洋",
        "description": "芬",
        "thumb": "https:\/\/www.expoon.com\/23928\/",
        "sale_price": "123"
    }, {
        "scene_id": "2",
        "scene_name": "我的鱼缸",
        "description": "阿斯蒂芬",
        "thumb": "",
        "sale_price": "0"
    }, {
        "scene_id": "3",
        "scene_name": "我的猪栏",
        "description": "啊手动阀手动阀",
        "thumb": "http:\/\/www.thinkphp.cn\/Uploads\/editor\/2016-07-08\/577f852e40237.jpg",
        "sale_price": "0"
    }]
}

2.获取宠物信息

  • 参数提交方式:GET
  • 接口地址:/index.php?m=Culture&c=Pet&a=getPetTypeWithPet
  • 接口参数:
参数名 数据类型 是否必须 说明
iptv_user_id string 电视端用户ID
scene_id int 场景ID
  • 返回示例
{
    "code": 0,
    "msg": "获取宠物类型成功",
    "data": [{
        "pet_type_id": "1",
        "pet_type_name": "鱼",
        "thumb": "",
        "scene_id": "1",
        "description": null,
        "pets": [{
            "pet_id": "1",
            "pet_name": "ces",
            "thumb": "adsf",
            "description": "123213213123",
            "sale_price": "123",
            "grown_value": "0",
            "pet_type_id": "1",
            "pre_user_limit_num": "0",
            "is_lock": "1",
            "pet_count": 0,
            "is_full": 0
        }, {
            "pet_id": "2",
            "pet_name": "测试猪",
            "thumb": "\/Public\/Upload\/Other\/image\/2019\/04\/09\/1554778124139564.png",
            "description": "一只猪",
            "sale_price": "100",
            "grown_value": "300",
            "pet_type_id": "1",
            "pre_user_limit_num": "1",
            "is_lock": "1",
            "pet_count": 0,
            "is_full": 0
        }]
    }]
}

2.获取场景装饰

  • 参数提交方式:GET
  • 接口地址:/index.php?m=Culture&c=Decorate&a=getSceneDecorate
  • 接口参数:
参数名 数据类型 是否必须 说明
iptv_user_id string 电视端用户ID
scene_id int 场景ID
  • 返回示例
{
    "code": 0,
    "msg": "获取场景装饰成功",
    "data": [{
        "decorate_type_id": "3",
        "decorate_type_name": "水草",
        "thumb": "",
        "description": null,
        "decorates": [{
            "decorate_id": "3",
            "decorate_name": "鱼装饰",
            "thumb": "\/Public\/Upload\/Other\/image\/2019\/04\/10\/1554891139162488.png",
            "description": "1231231231",
            "sale_price": "11",
            "decorate_type_id": "3",
            "is_lock": "1"
        }, {
            "decorate_id": "4",
            "decorate_name": "测试装饰",
            "thumb": "\/Public\/Upload\/Other\/image\/2019\/04\/10\/1554894707472015.png",
            "description": "123123123",
            "sale_price": "111",
            "decorate_type_id": "3",
            "is_lock": "1"
        }]
    }]
}

2.获取宠物装饰

  • 参数提交方式:GET
  • 接口地址:/index.php?m=Culture&c=Decorate&a=getPetDecorate
  • 接口参数:
参数名 数据类型 是否必须 说明
iptv_user_id string 电视端用户ID
pet_type_id int 宠物类型ID
pet_id int 宠物ID
  • 返回示例
{
    "code": 0,
    "msg": "获取宠物装饰成功",
    "data": [{
        "decorate_type_id": "1",
        "decorate_type_name": "皮肤",
        "thumb": "",
        "description": null,
        "decorates": [{
            "decorate_id": "1",
            "decorate_name": "测试装饰1",
            "thumb": "https:\/\/www.expoon.com\/23928\/",
            "description": null,
            "sale_price": "0",
            "decorate_type_id": "1",
            "is_lock": "1"
        }, {
            "decorate_id": "2",
            "decorate_name": "测试装饰2",
            "thumb": "https:\/\/www.expoon.com\/23928\/",
            "description": null,
            "sale_price": "0",
            "decorate_type_id": "1",
            "is_lock": "1"
        }]
    }]
}

2.购买宠物食物

  • 参数提交方式:GET
  • 接口地址:/index.php?m=Culture&c=Food&a=getFood
  • 接口参数:
参数名 数据类型 是否必须 说明
iptv_user_id string 电视端用户ID
pet_type_id int 宠物类型ID
pet_id int 宠物ID
  • 返回示例
{
    "code": 0,
    "msg": "购买成功",
    "data": null
}

2.购买装饰

  • 参数提交方式:GET
  • 接口地址:/index.php?m=Culture&c=Decorate&a=buyDecorate
  • 接口参数:
参数名 数据类型 是否必须 说明
iptv_user_id string 电视端用户ID
decorate_id int 装饰ID
  • 返回示例
{
    "code": 0,
    "msg": "购买成功",
    "data": null
}