邀请用户游戏.md 1.2 KB

请求URL

  • GET game/invite

参数

参数名 必选 类型 说明
invite_user_id int 被邀请的用户id
game_id int 游戏 id
invite json 邀请信息,游戏中发起,一路带着的参数

返回

{
	"result": 1,
	"code": 0,
	"msg": "成功",
	"data": {
		"id": 423,
		"from_id": 1,
		"to_id": 2,
		"type": "game-invite",
		"data": {
			"id": 17,
			"from_id": 1,
			"to_id": 2,
			"game_id": 1,
			"invite_info": {
				"a": 1
			},
			"status": "wait",
			"created_at": "2021-04-23 15:14:03"
		},
		"to_user": {
			"id": 2,
			"name": "蛧霸胆",
			"avatar": "http://static.ouj.com/subject/c8070d8df7e8880e2bd87e8673f8ba3f_size240x240_40341.jpg",
			"online": false
		},
		"from_user": {
			"id": 1,
			"name": "用户1",
			"avatar": "http://static.ouj.com/subject/c8070d8df7e8880e2bd87e8673f8ba3f_size240x240_40341.jpg",
			"online": false
		},
		"relate": "friends",
		"self_send": true,
		"read": 0,
		"created_at": "2021-04-23 15:14:03"
	}
}

备注

推送给极光的额外附带信息结构

{
	"id": 15,
	"from_id": 1,
	"to_id": 2,
	"game_id": 1,
	"invite_info": {...},
	"status": "wait",
	"created_at": "2021-04-20 11:38:50"
}