这篇文章主要介绍“猫眼电影小程序api的实现方法”,在日常操作中,相信很多人在猫眼电影小程序api的实现方法问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”猫眼电影小程序api的实现方法”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
查询出首页电影列表
http://m.maoyan.com/movie/list.json?type=hot&offset=0&limit=1000
request :
type=hot 类型
offset : 数据开始位置
limit :偏移量
response :
<pre>
{
"control": {
"expires": 1800
},
"status": 0,
"data": {
"hasNext": true,
"movies": [
{
"late": true,
"cnms": 31,
"sn": 436,
"showDate": "",
"dur": 115,
"img": "https://file.lsjlt.com/upload/202306/25/ce1mvukoppo.jpg",
"sc": 9.1,
"ver": "3D/IMAX 3D",
"rt": "本周二上映",
"nm": "末日崩塌",
"scm": "史无前例超级地震撕裂一切",
"imax": true,
"snum": 20129,
"src": "美国",
"pn": 74,
"preSale": 0,
"vd": "",
"dir": "布拉德·佩顿",
"star": "巨石强森,等",
"cat": "剧情,动作,惊悚",
"wish": 65386,
"3d": true,
"time": "",
"id": 246363
}
]
}
}
查出电影详情(包含评论)
http://m.maoyan.com/movie/xxxx.json
request:
这里直接在将xxxx换成movieid 例子 246363.json
加载更多评论
http://m.maoyan.com/comments.json?movieid=246363&limit=5&offset=5
request
movieid : 电影id
limit : 同上
offset :同上
response
{
"control": {
"expires": 300
},
"status": 0,
"data": {
"CommentResponseModel": {
"total": 5147,
"cmts": [
{
"nick": "ToyoGu李学栋",
"approve": 0,
"oppose": 0,
"reply": 0,
"avatarurl": "https://file.lsjlt.com/upload/202306/25/ehm5yycg1sc.jpg",
"userId": 62209126,
"score": 5,
"id": 17178527,
"content": "不错,好看,",
"time": "2015-06-05 00:20"
},
{
"nick": "死生成说",
"approve": 0,
"oppose": 0,
"reply": 0,
"avatarurl": "https://file.lsjlt.com/upload/202306/25/51wuelvp4lf.jpg",
"userId": 15946769,
"score": 5,
"id": 17178526,
"content": "VIP很爽的",
"time": "2015-06-05 00:20"
},
{
"nick": "彩虹天边的雨云",
"approve": 0,
"oppose": 0,
"reply": 0,
"avatarurl": "https://file.lsjlt.com/upload/202306/25/alardypfhk1.png",
"userId": 137865391,
"score": 4,
"id": 17178518,
"content": "场面震撼,衔接完美,美国式英雄主义,主角家不死光环,但是结尾有点简洁普通点",
"time": "2015-06-05 00:20"
},
{
"nick": "春春的嘛",
"approve": 0,
"oppose": 0,
"reply": 0,
"avatarurl": "https://file.lsjlt.com/upload/202306/25/q1tohspm0sl.jpg",
"userId": 1698060,
"score": 4,
"id": 17178511,
"content": "强老大的电影要支持,灾难效果比之前几部灾难片好的多,强老大女儿身材棒棒哒!",
"time": "2015-06-05 00:20"
},
{
"nick": "XxV543764616",
"approve": 0,
"oppose": 0,
"reply": 0,
"avatarurl": "https://file.lsjlt.com/upload/202306/25/alardypfhk1.png",
"userId": 201943883,
"score": 5,
"id": 17178494,
"content": "不错啊,好几年没看灾难片了,感觉有点像2010",
"time": "2015-06-05 00:20"
}
]
},
"hasNext": true,
"movieid": 246363,
"offset": 5,
"limit": 5
}
}
查出影院
http://m.maoyan.com/cinemas.json
猫眼的服务器会根据你的ip段加载出你本地的影院
查询出影院详情
http://m.maoyan.com/showtime/wrap.json?cinemaid=11533&movieid=
request
cinemaid : 影院id
movieid : 电影id
选座
http://m.maoyan.com/show/seats?showId=76304&showDate=2015-06-05
到此,关于“猫眼电影小程序api的实现方法”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注编程网网站,小编会继续努力为大家带来更多实用的文章!