#!/usr/bin/env python
# -*- coding: utf-8 -*-

class PodiumUser(object):
    """
    Object that represents a particular User.

    **Attributes:**
        **user_id** (int): User id

        **uri** (string): URI for the User.

        **username** (string): The User's username.

        **description** (string): The User's description.

        **avatar_url** (string): User's avatar image url.

        **links** (list): 3rd party links for the user.

        **friendships_uri** (string): URI to friends list.

        **followers_uri** (string): URI to followers list.

        **friendship_uri** (string): If this User has been friended
        by the user this attr will have a value, otherwise None. Defaults to
        None.
    """
    def __init__(self, user_id, uri, username, description, avatar_url, profile_image_url,
                 links, friendships_uri, followers_uri, friendship_uri):
        self.user_id = user_id
        self.uri = uri
        self.username = username
        self.description = description
        self.avatar_url = avatar_url
        self.profile_image_url = profile_image_url
        self.links = links
        self.friendships_uri = friendships_uri
        self.followers_uri = followers_uri
        self.friendship_uri = friendship_uri


def get_user_from_json(json):
    """
    Returns a PodiumUser object from the json dict received from podium api.

    Args:
        json (dict): Dict of data from REST api

    Return:
        PodiumUser: The PodiumUser object for the data.
    """
    return PodiumUser(json['id'], 
                      json['URI'],
                      json['username'], 
                      json['description'],
                      json['avatar_url'],
                      json['profile_image_url'],
                      json['links'],
                      json['friendships_uri'],
                      json['followers_uri'],
                      json.get("friendship_uri", None)
                      )

@@ -927,16 +927,28 @@
 ship_uri
+, events_uri
 ):%0D%0A    
@@ -1329,16 +1329,54 @@
 ip_uri%0D%0A
+        self.events_uri = events_uri%0D%0A
 %0D%0A%0D%0Adef 
@@ -1665,17 +1665,16 @@
 n%5B'id'%5D,
- 
 %0D%0A      
@@ -1742,17 +1742,16 @@
 rname'%5D,
- 
 %0D%0A      
@@ -2067,16 +2067,59 @@
 %22, None)
+,%0D%0A                      json%5B'events_uri'%5D
 %0D%0A      

add events uri to api