def upload(self): http = decorator.http() self.create() fileResponse = self.fileToExport.execute(http=http) return { 'isSaved' : True, 'fileResponse' : fileResponse }
def getUserInfo(self, setImageSize): http = decorator.http() self.user_response = plus_service.people().get(userId='me').execute(http=http) if setImageSize and self.user_response: imageUrl = self.user_response.get('image', {}).get('url', '') if imageUrl: urlSplit = imageUrl.split('?') imageUrl = '?'.join([urlSplit[0], 'sz=%d' % setImageSize]) self.user_response['image']['url'] = imageUrl return { 'isSaved' : True, 'userInfo' : self.user_response }