API Resource: Profile
The 'Profile' resource returns information about the current user's profile as well as allows you to update it.
<strong>GET v1/profile.json</strong>
Returns an object containing user profile information.
Return Data
{<br> "first_name": <firstName>,<br> "last_name": <lastName>,<br> "email": <emailAddress>,<code> "api_key": <apiKey><code>}
<code><strong>Example Usage</strong>
<code><code>curl -u <api_key>:x -X GET https://www.getflix.com.au/api/v1/profile.json
<code><code>{<br> "first_name": "John",<br> "last_name": "Doe",<br> "email": "john.doe@example.com",<br> "api_key": "00000000-0000-0000-0000-000000000000"<code>}
<code> <p style="text-align: justify;"><code><strong>POST v1/profile.json</strong>
Updates the profile information for the current user. The following JSON object must be present in the POST body.
{<br> "first_name": <firstName>,<br> "last_name": <lastName>,<br> "email": <emailAddress><br>}
firstName: is the user's first name.
lastName: is the user's last name.
emailAddress: is a well formed email address for the user.
Calls to this resource will return a JSON object with a property called 'error' if there were any errors encountered while applying the changes.
Example Usage
curl -u <api_key>:x -X POST -d '{"fist_name":"John","last_name":"Doe","email":"john.doe@example.com"}' https://www.getflix.com.au/api/v1/profile.json