-
Notifications
You must be signed in to change notification settings - Fork 0
Update current user
Rafael Chacon edited this page Feb 22, 2012
·
1 revision
Update the info for current authenticated user
###URL:
PUT http://public-api.piictu.com/v2/current_user
###HTTP method(s): PUT
###Requires authentication (Authentication and Authorization):
Yes
###Parameters:
-
user[fullname](optional:string): new fullname -
user[email](optional:string): new email
###Usage example:
Example using cURL:
curl -i http://api.piictu.com/v1/users/current \
-F user[fullname]=edgar \
-X PUT \
-H "Authorization: OAuth 2540af0de12cb2367691516b8477b0b7bd66dbd8ab6840b147340c6898c4eebd"###Response:
On success
- HTTP response code is
200(OK) - HTTP response body is a JSON string like this:
{
"user":{
"created_at":"2011-03-14T09:19:35-07:00",
"current_sign_in_at":"2011-04-05T11:49:55-07:00",
"current_sign_in_ip":"190.200.19.244",
"last_sign_in_at":"2011-03-28T12:06:02-07:00",
"last_sign_in_ip":"190.200.19.244",
"sign_in_count":2,
"updated_at":"2011-04-05T11:49:55-07:00",
"username":"edgar",
"fullname":null,
"email":"edgar@test.com",
"id":"4d7e40178362427891000001",
"avatar_url":"http://gravatar.com/avatar/85ab83078200dcd84ea993bdcda957b3.png?r=PG&s=90",
"services":["twitter","facebook"]
}
}