-
Notifications
You must be signed in to change notification settings - Fork 0
News
parameters: from, to, most, class_id https://www.cocobabys.com/kindergarten/93740362/news?from=1388535400000&to=1388634400009&most=2
if class_id is specified, response will contain both public and class specified news,
otherwise, response contains public news by default.
if both class_id and restrict=true are specified, response will contain class specified news only.
class_id can be given in formation: class_id=123,345,567
which means get all public news and 3 specified classes
i.e. https://www.cocobabys.com/kindergarten/93740362/news?class_id=123,345,567
json response:
[{"news_id":10,"school_id":93740362,"title":"香蕉","content":"问问v","timestamp":1394646317885,"published":true,"notice_type":2,"class_id":777999, "image":""},
{"news_id":6,"school_id":93740362,"title":"通知14","content":"测试信息","timestamp":1387353640,"published":true,"notice_type":2,"class_id":0, "image":"http://suoqin-test.u.qiniudn.com/Fmz0zi5Y7qZw1spdUidluOQ2PvXm"}]json response:
{"news_id":2,"school_id":93740362,"title":"通知2","content":"学校停电","timestamp":1387353636,"published":true,"notice_type":2, "class_id":0, "image":""}class_id = 0 means a public news(its scope is the whole school)
request payload:
{
"news_id": 1,
"school_id": 93740362,
"title" : "updated title",
"content" : "updated content",
"published": "王老师",
"class_id": 0,
"image":"http://suoqin-test.u.qiniudn.com/Fmz0zi5Y7qZw1spdUidluOQ2PvXm"
}image is optional.
request payload:
{"error_code": 0}not applicable from mobile app
not applicable from mobile app
not applicable from mobile app
not applicable from mobile app
mark given news is read by particular parent.
request payload: (information of parent itself)
{
"school_id": 123456,
"name": "老王",
"phone": "13402995318",
"portrait": "http://baidu.com/image.png",
"gender": 0,
"birthday": "1980-1-1",
"parent_id": "1_123456_321",
"timestamp" : 1231231231231,
"member_status": 1,
"status": 1
}ref to: https://github.com/kulebao/web/wiki/Parent-information#3-get-----------kindergartenkgparentphone
json response:
{"error_code":0}Support tag parameter, ?tag=1 or ?tag=true will make this interface return response with tags:
{"news_id":11,"school_id":93740362,"title":"通知14","content":"测试信息","timestamp":1426691242108,"published":true,"notice_type":2,"class_id":0,"image":"","publisher_id":"3_93740362_3344","feedback_required":false,"tags":["作业","活动"]} Almost the same as 10, but for one news record each time.
To check the status of particular parent read one news or not.