Friday, April 28, 2017

Envelopes

{
"1": request id (int),
"2": timestamp (long),
"3": token (string),
"4": device_info (object, not used atm)
"5": salt (long),
"6": signature (object, not used atm)
"7": request content
"8": request uid (long - an uid random generated)
}

"6": Signature
{
}

{
"1": request_id (int),
"2": timestamp (long),
"3": status (1 ok / errorcode)
"4": response content
}

Requests

{
"1": string (email),
"2": string (password - base64),
}

{
"1": string (email),
"2": string (password / base64),
"3": string (nickname),
"4": string (uuid - device id)
"5": string (avatar - base64)
}

{
"1": string (name),
"2": int (uid - creator id),
"3": long (timestamp),
"4": string (lang),
"5": string (gid / unique / base64(name)),
"6": string (optional - no store - nickname. @UserName for twitter screen)
}

{
"1": online (int - 1=online,2=local),
"2": data (string - base64 of 1=url,2=the whole image),
"3": character_gid (string),
"4": gid (string / unique / base64 of 1=url,2=timestamp+filename)
}

{
"0": int (author id)
"1": long (timestamp)
"2": jsonarray (data)
}

data array objects
{
"0": int (type 0: status 1: image 2: video 3: event. Always 0 atm)
"1": object (character 10920)
"2": object (avatar 10930)
"3": string (facebook status)
"4": string (I.E 17 hours ago)
"5": string (I.E elton john and other 27012 like this post)
"6": array (comments)
}

comments array objects
{
"0": object (character 10920)
"1": object (avatar 10930)
"2": string (comment)
"3": string (I.E 17 hours ago)
"4": int (likes for this comment)
}

{
"0": int (author id)
"1": long (timestamp)
"2": jsonObject (data)
}

data object
{
"0": int (type 0: status 1: image 2: video 3: event. Always 0 atm)
"1": object (character 10920)
"2": object (avatar 10930)
"3": string (twitter status)
"4": string (retweets 1)
"5": string (likes 1)
"6": string (date field)
"7": string (replies)
"8": string (retweets 2)
"9": string (likes 2)
}

{
"1": int (offset),
"2": int (max items / 1 to 10)
}

{
"1": int (newsId)
}

{
"1": int (sort / 0: recently added, 1: most used)
"2": int (offset)
"3": int (count between 1 and 20)
}

{
"1": string (character gid)
}

{
"1": string (name)
"2": string (image)
}

Responses

{
"1": int (status 0: error / 1: success)
"2": int / string (status 0: error code / status 1: token)
"3": string (email)
"4": string (nickname)
"5": string (avatar url)
}

{
"1": int (status / 0: fail, 1: success)
"2": int / string (status 0: error code, status 1: token)
}

{
"1": character_gid (string),
"2": new (int - Based on sent GID. 0 already exists, 1 created. if this is 0, field 1 is the existing character gid)
}

{
"1": avatar_gid (string),
"2": new (int - Based on sent GID. 0 already exists, 1 created. if this is 0, field 1 is the existing avatar gid)
}

{
"1": status (int - 0 error / 1 success),
"2": url/error (string - 0 the error message / 1 the url of the image)
}

{
"1": status (int - 0 error / 1 success),
"2": url/error (string - 0 the error message / 1 the url of the image)
}

{
"1": string (policy content)
}

{
"1": int (status. 0: error, 1: success)
"2": string (status 0: error message, status 1: url)
}