站点工具

Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
Hotfix release available: 2018-04-22a "Greebo". upgrade now! [50.1] (what's this?)
New release available: 2018-04-22 "Greebo". upgrade now! [50] (what's this?)
Hotfix release available: 2017-02-19g "Frusterick Manners". upgrade now! [49.7] (what's this?)
Hotfix release available: 2017-02-19f "Frusterick Manners". upgrade now! [49.6] (what's this?)
Hotfix release available: 2017-02-19e "Frusterick Manners". upgrade now! [49.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2017-02-19d "Frusterick Manners". upgrade now! [49.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2017-02-19c "Frusterick Manners". upgrade now! [49.3] (what's this?)
Hotfix release available fixing security token and media manager: 2017-02-19b "Frusterick Manners". upgrade now! [49.2] (what's this?)
Hotfix release available fixing install and media manager issues: 2017-02-19a "Frusterick Manners". upgrade now! [49.1] (what's this?)
New release available: 2017-02-19 "Frusterick Manners". upgrade now! [49] (what's this?)
Hotfix release available: 2016-06-26e "Elenor of Tsort". upgrade now! [48.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2016-06-26d "Elenor of Tsort". upgrade now! [48.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2016-06-26c "Elenor of Tsort". upgrade now! [48.3] (what's this?)
Hotfix release available fixing security token: 2016-06-26b "Elenor of Tsort". upgrade now! [48.2] (what's this?)
Hotfix release available fixing authad issues: 2016-06-26a "Elenor of Tsort". upgrade now! [48.1] (what's this?)
New release available: 2016-06-26 "Elenor of Tsort". upgrade now! [48] (what's this?)
Hotfix release available: 2015-08-10a "Detritus". upgrade now! [47.1] (what's this?)
New release available: 2015-08-10 "Detritus". upgrade now! [47] (what's this?)
Hotfix release available: 2014-09-29d "Hrun". upgrade now! [46.4] (what's this?)
Hotfix release available: 2014-09-29c "Hrun". upgrade now! [46.3] (what's this?)
Hotfix release available to prevent XSS attack via SWF uploads: 2014-09-29b "Hrun". upgrade now! [46.2] (what's this?)
Hotfix release available: 2014-09-29a "Hrun". upgrade now! [46.1] (what's this?)
New release available: 2014-09-29 "Hrun". upgrade now! [46] (what's this?)
Hotfix release available: 2014-05-05e "Ponder Stibbons". upgrade now! [44.5] (what's this?)
Hotfix release available: 2014-05-05d "Ponder Stibbons". upgrade now! [44.4] (what's this?)
Hotfix release available to prevent XSS attack via SWF uploads: 2014-05-05c "Ponder Stibbons". upgrade now! [44.3] (what's this?)
Security Hotfix 2014-05-05b to prevent zero byte attacks on external auth systems is available. upgrade now! [44.2] (what's this?)
Security Hotfix 2014-05-05a for Issue 765 available. upgrade now! [44.1] (what's this?)

story_single_get

这是本文档旧的修订版!


http://m.repai.com/story/story_single_get_api/story_id/162

故事读取接口(单篇故事)

1、故事读取接口(单篇故事,客户端调用)

输入参数说明:

  • story_id 【故事编号】
  • appkey 【热拍事业部买家版HTML5为100001,iOS为100002,Android为100003】
  • appoid 【设备的唯一ID,iOS手机取OpenUDID(下载地址:https://github.com/ylechelle/OpenUDID)作为唯一ID;#import “OpenUDID.h” 然后 NSLog(@“%@”,[OpenUDID value]); 打印出来的值即为OpenUDID,然后对OpenUDID做md5加密后的值,作为appoid】

输出参数说明:

{
"current_count": 1,
"data": [
	{
		"avatar": "http://pic.repaiapp.com/pic/57/e6/4a/57e64aadeea9fd84b96eeac9a85116984e4e0f91.jpg@0e_120w_120h_0c_0i_1o_90Q_1x.jpg",
		"love": [
			{
				"appoid": "",
				"avatar": "http://pic.repaiapp.com/pic/46/d6/47/46d647aa7293f4886a5e9691696724e16d4f94ae.jpg@0e_60w_60h_0c_0i_1o_90Q_1x.jpg",
				"nick": "一定有个你",
				"rp_sex": "0",
				"rp_uid": "49546"
			},
			{
				"appoid": "",
				"avatar": "http://pic.repaiapp.com/pic/4a/d2/ee/4ad2ee5ea28bc198db5d4e6e13220d647439a1b8.jpg@0e_60w_60h_0c_0i_1o_90Q_1x.jpg",
				"nick": "小汐MM",
				"rp_sex": "2",
				"rp_uid": "107"
			},
			{
				"appoid": "",
				"avatar": "http://pic.repaiapp.com/pic/2c/44/03/2c440340353060ed99ddf237c96c3757a9daa60c.jpg@0e_60w_60h_0c_0i_1o_90Q_1x.jpg",
				"nick": "那一抹红",
				"rp_sex": "2",
				"rp_uid": "62"
			},
			{
				"appoid": "",
				"avatar": "http://pic.repaiapp.com/pic/27/84/cf/2784cf0754af5aa5515482df6c29a5ab010cc54a.jpg@0e_60w_60h_0c_0i_1o_90Q_1x.jpg",
				"nick": "扫我头像有红包哦",
				"rp_sex": "0",
				"rp_uid": "49142"
			},
			{
				"appoid": "",
				"avatar": "http://pic.repaiapp.com/image/other/avatar.png",
				"nick": "188****1227",
				"rp_sex": "0",
				"rp_uid": "48999"
			},
			{
				"appoid": "",
				"avatar": "http://pic.repaiapp.com/image/other/avatar.png",
				"nick": "136****4520",
				"rp_sex": "0",
				"rp_uid": "48928"
			},
			{
				"appoid": "",
				"avatar": "http://pic.repaiapp.com/image/other/avatar.png",
				"nick": "182****8239",
				"rp_sex": "0",
				"rp_uid": "48723"
			},
			{
				"appoid": "",
				"avatar": "http://pic.repaiapp.com/image/other/avatar.png",
				"nick": "189****7717",
				"rp_sex": "0",
				"rp_uid": "48742"
			},
			{
				"appoid": "",
				"avatar": "http://pic.repaiapp.com/image/other/avatar.png",
				"nick": "185****7444",
				"rp_sex": "0",
				"rp_uid": "48655"
			},
			{
				"appoid": "",
				"avatar": "http://pic.repaiapp.com/pic/57/e6/4a/57e64aadeea9fd84b96eeac9a85116984e4e0f91.jpg@0e_60w_60h_0c_0i_1o_90Q_1x.jpg",
				"nick": "45的傻笑",
				"rp_sex": "0",
				"rp_uid": "48424"
			}
		],
		"love_total_up": "10",
		"love_up": false,
		"message": "柠檬蜂蜜水一款非常棒的饮品,蜂蜜能起到滋润和营养作用,大家行动起来吧!来一杯亲手制作的柠檬蜂蜜水,让自己美美哒~~",
		"photos": [
			{
				"pic_url": "http://pic.repaiapp.com/pic/31/cb/b4/31cbb479167b3d1f1c05fc63138c16d43580030d.jpg",
				"pic_url_120x120": "http://pic.repaiapp.com/pic/31/cb/b4/31cbb479167b3d1f1c05fc63138c16d43580030d.jpg@0e_120w_120h_0c_0i_1o_90Q_1x.jpg",
				"pic_url_thum": "http://pic.repaiapp.com/pic/31/cb/b4/31cbb479167b3d1f1c05fc63138c16d43580030d.jpg@320w_90Q_1x.jpg"
			},
			{
				"pic_url": "http://pic.repaiapp.com/pic/52/95/97/529597a3ed7b0e4a06f7dba5d07f078b65d17299.jpg",
				"pic_url_120x120": "http://pic.repaiapp.com/pic/52/95/97/529597a3ed7b0e4a06f7dba5d07f078b65d17299.jpg@0e_120w_120h_0c_0i_1o_90Q_1x.jpg",
				"pic_url_thum": "http://pic.repaiapp.com/pic/52/95/97/529597a3ed7b0e4a06f7dba5d07f078b65d17299.jpg@320w_90Q_1x.jpg"
			}
		],
		"publish_time": "1418205446",
		"rp_city": "安阳",
		"rp_iids": [
			{
				"rp_iid": "1100949446613715",
				"rp_item_url": "http://m.repai.com/item/view/id/1100949446613715/?appkey=",
				"rp_pic_url": "http://gw.alicdn.com/bao/uploaded/i4/TB1Y9LpGVXXXXcnXFXXXXXXXXXX_!!0-item_pic.jpg_320x320q90.jpg",
				"rp_pic_url_120x120": "http://gw.alicdn.com/bao/uploaded/i4/TB1Y9LpGVXXXXcnXFXXXXXXXXXX_!!0-item_pic.jpg_120x120.jpg",
				"rp_pic_url_small": "http://gw.alicdn.com/bao/uploaded/i4/TB1Y9LpGVXXXXcnXFXXXXXXXXXX_!!0-item_pic.jpg_120x120.jpg",
				"rp_pic_url_thum": "http://gw.alicdn.com/bao/uploaded/i4/TB1Y9LpGVXXXXcnXFXXXXXXXXXX_!!0-item_pic.jpg_320x320q90.jpg",
				"rp_price": "8.8",
				"rp_quantity": "50",
				"rp_share_item_url": "http://m.repai.com/item/view/id/1100949446613715//rpunid/141114000001/",
				"rp_title": "熊孩子 山楂糕250g*2山楂饴山楂片果丹皮果脯凉果零食小吃"
			}
		],
		"rp_nick": "45的傻笑",
		"rp_phone": "15896856656",
		"rp_province": "河南",
		"rp_sex": "0",
		"rp_uid": "48424",
		"story_id": "162",
		"story_url": "http://m.repai.com/story/view/id/162/"
	}
],
"is_end": false,
"next_limit": 0,
"next_offset": 0,
"total": null
}
  • is_end 【 是否还有下一页,true为已结束,无下一页;false为未结束,还有下一页】
  • next_offset 【下一页的偏移量】
  • next_limit 【下一页的显示数量】
  • total 【总故事数量】
  • current_count 【本次显示的故事数量】
  • message 【故事文本内容】
  • love_total_up 【某篇故事总的喜欢数】
  • love_up 【当前用户对某篇故事是否喜欢】
  • avatar 【用户头像图片地址】
  • publish_time 【故事发布时间UNIX时间戳】
  • rp_province 【用户省份】
  • rp_city 【用户城市】
  • rp_sex 【用户性别:1为男,2为女,0为未知】
  • rp_phone 【用户手机号】
  • rp_nick 【用户昵称,无昵称时,显示进行*处理的手机号,例如:1593960】
  • rp_uid 【用户ID】
  • photos 【用户上传的照片,pic_url为大图,pic_url_thum为缩略图】
  • rp_iids 【商品图片及内容摘要】
  • love 【对当前故事点“赞”的登陆用户、未登陆用户列表:avatar头像,nick昵称,appoid匿名用户手机设备唯一ID,rp_uid登陆用户ID】
  • rp_share_item_url 【用户对外分享的商品链接】
  • story_url 【整篇故事的Web地址】

2、故事读取接口(单篇故事,PHP内部引用调用接口)

<?php
require_once("/Data/webapps/m.repai.com/m/phpapi.php"); //PHP引用方式,需要引用的框架入口文件
$result = phpapi_mvc("story", "story_single_get_phpapi", array("story_id" => "162"));
if (empty($result["error"])) {
	var_dump($result); //打印出返回内容,此处输出为PHP数组,格式与客户端调用接口输出的JSON数组json_decode后的内容一样
} else {
	var_dump($result["error"]); //打印出错误内容
}
?>

返回首页

story_single_get.1418281996.txt.gz · 最后更改: 2014/12/11 15:13 由 112.25.156.122