class Api::V3::UsersController
Has to be authenticated with :user_email and :user_token
Information returns in <user_info>:
{
"status": "success",
"notice": "Record found",
"user": {
"name": "Isuru Akalanka",
"id": 143,
"email": "isuru@venturit.com",
"bio": "### My Profile\r\nThis is my profile details",
"institute": "Venturit",
"profile_url": "http://localhost:3000/users/isuru-akalanka",
"contributions": 2,
"projects": 1,
"collaborations": 1,
"avatar": {
"original": "http://localhost:3000/uploads/user/avatar/143/at_t.png",
"thumb": "http://localhost:3000/uploads/user/avatar/143/thumb_at_t.png",
"medium": "http://localhost:3000/uploads/user/avatar/143/medium_at_t.png"
},
"latest_activity": "2015-09-01T05:53:48.581Z",
"badges": [
{
"name": "",
"url": ""
}
]
}
}
Public Instance Methods
info()
click to toggle source
Returns logged in user's profile
GET /api/v3/users/info.json
Ex:
get :info, {:user_email => foo@bar.com, :user_token => "xxxxxxx", :format => :json}
Output:
On success - {:status => "success", :user => <user_info>}
On failed - {:status => "failed", :notice => "..."}
# File app/controllers/api/v3/users_controller.rb, line 53 def info @user = current_user end