def __create_profile(self, pf): profile = Profile() profile.id = pf['id'] profile.fullname = pf['name'] profile.username = pf['screen_name'] profile.avatar = pf['profile_image_url'] profile.location = pf['location'] profile.url = pf['url'] profile.bio = pf['description'] profile.following = pf['following'] profile.followers_count = pf['followers_count'] profile.friends_count = pf['friends_count'] profile.statuses_count = pf['statuses_count'] profile.profile_link_color = '#0F0F85' return profile
def __create_profile(self, pf): profile = Profile() profile.id = pf['id'] profile.fullname = pf['name'] profile.username = pf['screen_name'] profile.avatar = pf['profile_image_url'] profile.location = pf['location'] profile.url = pf['url'] profile.bio = pf['description'] profile.following = pf['following'] profile.followers_count = pf['followers_count'] profile.friends_count = pf['friends_count'] profile.statuses_count = pf['statuses_count'] profile.profile_link_color = pf['profile_link_color'] or '#0F0F85' return profile
def __create_profile(self, pf): profile = Profile() profile.id = pf['id'] profile.fullname = pf['name'] profile.username = pf['screen_name'] profile.avatar = pf['profile_image_url'] profile.location = pf['location'] profile.url = pf['url'] profile.bio = pf['description'] profile.following = pf['following'] profile.followers_count = pf['followers_count'] profile.friends_count = pf['friends_count'] profile.statuses_count = pf['statuses_count'] if pf.has_key('status'): profile.last_update = pf['status']['text'] profile.last_update_id = pf['status']['id'] profile.profile_link_color = ('#%s' % pf['profile_link_color']) or '#0F0F85' return profile