Documentation

API /user/{userId}/photo/{width}/{height}/{cropped}

ThoughtFarmer REST API Method: /user/{userId}/photo/{width}/{height}/{cropped}

Gets the byte array of a photo for a user's id.
 
URL:
http://yourserver.com/api/user/{userId}/photo/{width}/{height}/{cropped}
http://yourserver.com/api/2.0/user/{userId}/photo/{width}/{height}/{cropped}

Response Formats:
byte array

HTTP Method(s):
GET
 
Requires Authentication:
true, user making call must pass a valid token parameter

Parameters:

Parameter Type  Required  Description 
 userId int Y The user id of the user's photo to retrieve
 width int  The desired width of the image. Defaults to 50 if the parameter is invalid or < 1
 height int  The desired height of the image. Defaults to 50 if the parameter is invalid or < 1
 cropped bool  To crop the image or not. If no, the image is scaled.

Note: If cropped is false, the proportions of the image are constrained to the longest image side. 
 token string  Y A valid token authentication parameter
Response Status Codes:
200 - Success
400 - For any parameter validation errors
401 - Token parameter is invalid
404 - User not found

Example request
GET http://yourserver.com/api/user/{userId}/photo/{width}/{height}/{cropped}?token={token}
...byte array of photo...