-
Notifications
You must be signed in to change notification settings - Fork 0
Child information
Insane edited this page Sep 9, 2015
·
1 revision
parameter: classId_(about to change it to class_id)_:return children in particular class
json repsonse:
[{"child_id":"1_93740362_374","nick":"大苹果","portrait":"http://www.qqw21.com/article/uploadpic/2013-1/201311101516591.jpg","birthday":1180886400000,"timestamp":1387360036,"class_id":777888,"class_name":"苹果班","name":"张光"},
{"child_id":"1_93740362_456","nick":"小苹果","portrait":"","birthday":1220889600000,"timestamp":1387649057933,"class_id":777999,"class_name":"香蕉班","name":"李小华"}]gender: male is 1, female is 0
json response:
{
"child_id":"1_93740362_374",
"name":"张光",
"nick":"大苹果",
"birthday":
"2007-06-04",
"gender":1,
"portrait":"http://www.qqw21.com/article/uploadpic/2013-1/201311101516591.jpg",
"class_id":777888,
"class_name":"苹果班"
}create new child scala object:
case class ChildInfo(
child_id: Option[String], name: String, nick: String,
birthday: String, gender: Int, portrait: Option[String],
class_id: Int, class_name: Option[String],
timestamp: Option[Long], school_id: Option[Long]
)request payload:
{
"class_id":777666,
"name":"陈富贵",
"nick":"富贵",
"gender":1,
"birthday":"2007-09-08",
"portrait":"http://www.qqw21.com/article/uploadpic/2013-1/201311101516591.jpg",
"child_id":"1_93740362_374"
}create a new child if child_id is not existing, otherwise update
child_id is optional.
json response:
{
"child_id":"1_1393852435645",
"name":"名字",
"nick":"String",
"birthday":"2007-06-04",
"gender":1,
"portrait":"http://www.qqw21.com/article/uploadpic/2013-1/201311101516591.jpg",
"class_id":777666,
"class_name":"梨儿班"
}update child
request payload:
{
"name": "名字",
"nick": "小名",
"birthday":"2007-06-04",
"gender": 1,
"portrait": "http://www.qqw21.com/article/uploadpic/2013-1/201311101516591.jpg",
"class_id": 777666,
"child_id":"1_93740362_374"
}create a new child if child_id is not existing, otherwise update.
child_id is optional.
json response:
{"name":"名字",
"nick":"小名",
"birthday":"2007-06-04",
"gender":1,
"portrait":"http://www.qqw21.com/article/uploadpic/2013-1/201311101516591.jpg",
"class_id":777666,
"class_name":"梨儿班",
"child_id":"1_93740362_374"
}