API: Profile - GeoTappy/geo_tappy_rails GitHub Wiki
Get profile
GET /api/v1/profile.json
{
"profile":{
"id":1,
"email":"[email protected]",
"name":"Test user",
"profile_photo_url":"https://fbcdn-profile-a.akamaihd.net/profile.jpg"
"friends":[
{
"id":6,
"email":"[email protected]",
"name":"Giovani Quitzon",
"profile_photo_url":"https://fbcdn-profile-a.akamaihd.net/profile.jpg"
},
{
"id":7,
"email":"[email protected]",
"name":"Rick Johnson",
"profile_photo_url":"https://fbcdn-profile-a.akamaihd.net/profile.jpg"
}
],
"cover_photo_url":"https://fbcdn-sphotos-c-a.akamaihd.net/cover.jpg"
}
}
Create profile
Email & password
POST /api/v1/profile.json
{
"user":{
"email":"[email protected]",
"password":"test1234",
"password_confirmation":"test1234",
"first_name":"Joe",
"last_name":"Doe",
"birthdate":"03.03.2000",
"profile_photo_url":"test1234.jpg",
"cover_photo_url":"test1234.jpg"
}
}
Example response
{
"id":5,
"email":"[email protected]",
"first_name":"Joe",
"last_name":"Doe",
"profile_photo_url":null,
"birthdate":"2000-03-03",
"created_at":"2014-10-18T18:19:27.711Z",
"updated_at":"2014-10-18T18:19:27.711Z",
"cover_photo_url":null
}
look here
Facebook:Update APNS token
PUT /api/v1/profile/token.json
{
"user": {
"token": "64aaa88e0ebbfac0302c210aadf0d2f5d045d0178ecf1f1886168293dc59224b"
}
}
OK response
{ "status": "ok" }
Error response
{ "status": "error", "message": "invalid_token_size" }