Пример #1
0
 def get_from_api(self, api):
     objuser = api.verify_credentials()
     uname = self.model.unquote_name(objuser.id)
     u = self.get(loginname=uname)
     u.objuser = objuser
     u.screen_name = objuser.name
     u.profile_image = objuser.profile_image_url
     u.save()
     return u
Пример #2
0
 def get_from_api(self, api):
     objuser = api.verify_credentials()
     uname = self.model.unquote_name(objuser.id)
     u = self.get(loginname=uname)
     u.objuser = objuser
     u.screen_name = objuser.name
     u.profile_image = objuser.profile_image_url
     u.save()
     return u
Пример #3
0
 def get_or_create_from_api(self, api):
     objuser = api.verify_credentials()
     uname = self.model.unquote_name(objuser.id)
     u, c = self.get_or_create(loginname=uname)
     u.objuser = objuser
     u.screen_name = objuser.name
     u.profile_image = objuser.profile_image_url
     try:
         u.created_at = objuser.created_at
     except Exception, e:
         print e
Пример #4
0
 def get_or_create_from_api(self, api):
     objuser = api.verify_credentials()
     uname = self.model.unquote_name(objuser.id)
     u, c = self.get_or_create(loginname=uname)
     u.objuser = objuser
     u.screen_name = objuser.name
     u.profile_image = objuser.profile_image_url
     try:
         u.created_at = objuser.created_at
     except Exception, e:
         print e