猫眼的api

96
sherlock221b
2015.06.05 00:25* 字数 686

猫眼的api协议
http://m.maoyan.com/

<p>

查询出首页电影列表

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": "http://p0.meituan.net/165.220/movie/7f32684e28253f39fe2002868a1f3c95373851.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
}
]
}
}
</pre>

查出电影详情(包含评论)

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
<pre>
{
"control": {
"expires": 300
},
"status": 0,
"data": {
"CommentResponseModel": {
"total": 5147,
"cmts": [
{
"nick": "ToyoGu李学栋",
"approve": 0,
"oppose": 0,
"reply": 0,
"avatarurl": "http://p1.meituan.net/avatar/15beaf1aafc1571890808171618e552741843.jpg",
"userId": 62209126,
"score": 5,
"id": 17178527,
"content": "不错,好看,",
"time": "2015-06-05 00:20"
},
{
"nick": "死生成说",
"approve": 0,
"oppose": 0,
"reply": 0,
"avatarurl": "http://p0.meituan.net/avatar/__47448219__1684116.jpg",
"userId": 15946769,
"score": 5,
"id": 17178526,
"content": "VIP很爽的",
"time": "2015-06-05 00:20"
},
{
"nick": "彩虹天边的雨云",
"approve": 0,
"oppose": 0,
"reply": 0,
"avatarurl": "http://p0.meituan.net/movie/__40465654__9539763.png",
"userId": 137865391,
"score": 4,
"id": 17178518,
"content": "场面震撼,衔接完美,美国式英雄主义,主角家不死光环,但是结尾有点简洁普通点",
"time": "2015-06-05 00:20"
},
{
"nick": "春春的嘛",
"approve": 0,
"oppose": 0,
"reply": 0,
"avatarurl": "http://p1.meituan.net/avatar/a3ad3970104ede947f65d7a2d5685cdb12829.jpg",
"userId": 1698060,
"score": 4,
"id": 17178511,
"content": "强老大的电影要支持,灾难效果比之前几部灾难片好的多,强老大女儿身材棒棒哒!",
"time": "2015-06-05 00:20"
},
{
"nick": "XxV543764616",
"approve": 0,
"oppose": 0,
"reply": 0,
"avatarurl": "http://p0.meituan.net/movie/__40465654__9539763.png",
"userId": 201943883,
"score": 5,
"id": 17178494,
"content": "不错啊,好几年没看灾难片了,感觉有点像2010",
"time": "2015-06-05 00:20"
}
]
},
"hasNext": true,
"movieid": 246363,
"offset": 5,
"limit": 5
}
}
</pre>

查出影院

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

react-native
Web note ad 1