ASI/people/:user_id/@self
GET ^top
Gets the information of the user specified by user_id. Note that the timestamp for status_messages latest update is always in UTC time.
The 'avatar' slot in the returned JSON contains the link to the avatar image and also the status of the avatar, which is 'set' or 'not_set' depending on if the user has uploaded an image or not.
Access
Client login
Returns
- 200 - OK
Response example
{
"entry": {
"name": {
"unstructured": "Essi Esimerkki",
"family_name": "Esimerkki",
"given_name": "Essi"
},
"address": {
"unstructured": "Yrjö-Koskisenkatu 42, 00170 Helsinki",
"postal_code": "00170",
"street_address": "Yrjö-Koskisenkatu 42",
"locality": "Helsinki"
},
"birthdate": "1940-06-01",
"updated_at": "2011-09-28T11:22:00Z",
"is_association": null,
"username": "kusti19",
"id": "avv75o6Cqr4lFdeJfcaj6R",
"avatar": {
"link": {
"href": "/people/avv75o6Cqr4lFdeJfcaj6R/@avatar",
"rel": "self"
},
"status": "not_set"
},
"gender": "MALE",
"msn_nick": "maison",
"phone_number": "+358 40 834 7176",
"website": "http://example.com",
"irc_nick": "pelle",
"description": "About me",
"status": {
"changed": "2011-09-28T11:22:00Z",
"message": "Valid person rocks."
}
}
}
PUT ^top
Update (or add) information to user's profile. The person-parameter needs to contain only the attributes that need to be changed.
If an error occurs, both status code and an array of error messages are returned.
A description of the person, or "about me".
Parameters
- person
- address
- postal_code
Person's postal code, e.g. 02150
- street_address
Person's street address
- locality
Person's locality, e.g. Espoo
- name
- family_name
Person's family name.
- given_name
Person's given name.
- birthdate
Person's birthdate as date. Format yyyy-mm-dd
- is_association
Person's association status, 'true' or 'false'.
- gender
Person's gender, either MALE or FEMALE.
- phone_number
Person's phone number, stored as a string.
- website
A link to this person's website.
- description
A description of the person, or "about me".
- password
A new password.
- status_message
Person's current status message.
Person's email address
Access
Self
Returns
- 200 - OK
- 400 - There's a problem with one of the parameters.
DELETE ^top
Deletes this user.
Access
Self
Returns
- 200 - OK