from panoptes_client.panoptes import PanoptesObject, LinkResolver


class User(PanoptesObject):
    _api_slug = 'users'
    _link_slug = 'users'
    _edit_attributes = ()

LinkResolver.register(User)
LinkResolver.register(User, 'owner')

from panoptes_client.panoptes import PanoptesObject, LinkResolver


class User(PanoptesObject):
    _api_slug = 'users'
    _link_slug = 'users'
    _edit_attributes = ()

    def avatar(self):
        return User.http_get('{}/avatar'.format(self.id))[0]

LinkResolver.register(User)
LinkResolver.register(User, 'owner')

Add method to get User's avatar
Add method to get User's avatar

  from panoptes_client.panoptes import PanoptesObject, LinkResolver
  
  
  class User(PanoptesObject):
      _api_slug = 'users'
      _link_slug = 'users'
      _edit_attributes = ()
  
+     def avatar(self):
+         return User.http_get('{}/avatar'.format(self.id))[0]
+ 
  LinkResolver.register(User)
  LinkResolver.register(User, 'owner')
  
Add method to get User's avatar
## Code Before:
from panoptes_client.panoptes import PanoptesObject, LinkResolver


class User(PanoptesObject):
    _api_slug = 'users'
    _link_slug = 'users'
    _edit_attributes = ()

LinkResolver.register(User)
LinkResolver.register(User, 'owner')

## Instruction:
Add method to get User's avatar
## Code After:
from panoptes_client.panoptes import PanoptesObject, LinkResolver


class User(PanoptesObject):
    _api_slug = 'users'
    _link_slug = 'users'
    _edit_attributes = ()

    def avatar(self):
        return User.http_get('{}/avatar'.format(self.id))[0]

LinkResolver.register(User)
LinkResolver.register(User, 'owner')
