Skip to content

Protocol Group

zoizer edited this page Mar 9, 2018 · 24 revisions
##################################################
##########  GET ALL GROUP(S)      (DEV) ##########
##################################################
GET localhost:8080/api/group/
input: -
output: json [{
		//"ownerid":"123",	// id of owner - currently there can be 0 to n owners
		"id":"123",		// id of group
		"name":"abc",		// name of group
		"status":"0",		// Membership status, 0: owner, 1: active member, 2: invited
		"time":timestamp	// timestamp
	}, ...] 
	status: 200 OK
##################################################

##################################################
##########  GET GROUP(S) (RELEASE) V3.1 ##########
##################################################
POST localhost:8080/api/group/get/
input:	json '{
		"userid":"123",		// userid must be valid user and member		- 401 Not Implemented
		"ownerid":"123",	// ownerid of group must match completely	- 401 Not Implemented
		"id":"123",		// id of group					- 401 Not Implemented
		"name":"xgroup",	// name of group contains			- 401 Not Implemented
		"before":timestamp},	// get groups before				- 401 Not Implemented
		"after":timestamp},	// get groups after				- 401 Not Implemented
		"count":"10"		// Max amount to get				- 401 Not Implemented
	}'
output:	json [{
		//"ownerid":"123",	// id of owner - currently there can be 0 to n owners
		"id":"123",		// id of group
		"name":"abc",		// name of group
		"status":"0",		// Membership status, 0: owner, 1: active member, 2: invited
		"time":timestamp	// timestamp
	}, ...]
	status: 200 OK
##################################################

##################################################
##########  PUT GROUP    (RELEASE) V3.1 ##########
##################################################
POST localhost:8080/api/group/put/
input:	json '{
		"userid":"123",		// userid must be valid user and admin		- 401 Not Implemented
		"id":"123",		// id of group					- 401 Not Implemented
		"name":"xgroup",	// new name of group				- 401 Not Implemented
	}'
output:	json '{
		//"ownerid":"123",	// id of owner - currently there can be 0 to n owners
		"id":"123",		// id of group
		"name":"xgroup",	// name of group
		"time":timestamp	// timestamp
	}'
	status: 200 OK
##################################################

##################################################
##########  POST GROUP   (RELEASE) V3.0 ##########
##################################################
POST localhost:8080/api/group/post/
input:	json '{
		"userid":"123",		// userid must be valid user			- 401 Not Implemented
		"name":"xgroup",	// name of group				- 401 Not Implemented
	}'
output:	json '{
		//"ownerid":"123",	// id of owner - currently there can be 0 to n owners
		"id":"123",		// id of group
		"name":"xgroup",	// name of group
		"time":timestamp	// timestamp
	}'
	status: 200 OK
##################################################

##################################################
##########  JOIN GROUP   (RELEASE) V3.2 ##########
##################################################
POST localhost:8080/api/group/join/
input:	json '{
		"userid":"123",		// id of user					- 401 Not Implemented
		"id":"123",		// id of group					- 401 Not Implemented
	}'
output:	json '{
		"userid":"123",		// id of user
		"id":"123",		// id of group
		"nick":"apa",		// name of user
	}'
	status: 200 OK
##################################################

##################################################
########## LEAVE GROUP   (RELEASE) V3.1 ##########
##################################################
POST localhost:8080/api/group/leave/
input:	json '{
		"userid":"123",		// id of user who requests the membership termination	- 401 Not Implemented
		"leaveid":"123",	// id of user					- 401 Not Implemented
		"id":"123",		// id of group					- 401 Not Implemented
	}'
output:	json '{
		"userid":"123",		// id of user whose membership has been terminated
		"id":"123",		// id of group
		"nick":"apa",		// nick name of user whose membership has been terminated
	}'
	status: 200 OK
##################################################

##################################################
########## INVITE GROUP  (RELEASE) V3.2 ##########
##################################################
POST localhost:8080/api/group/invite/
input:	json '{
		"userid":"123",		// userid must be valid user and admin		- 401 Not Implemented
		"inviteid":"123",	// id of invited user				- 401 Not Implemented
		"id":"123",		// id of group					- 401 Not Implemented
	}'
output:	json '{
		"inviteid":"123",	// id of invited user
		"id":"123",		// id of group
		"nick":"apa",		// nick of invited user
	}'
	status: 200 OK
##################################################

Clone this wiki locally