def places_photo(client, photo_reference, max_width=None, max_height=None):
 if (not (max_width or max_height)):
  raise ValueError('a max_width or max_height arg is required')
 params = {'photoreference': photo_reference}
 if max_width:
  params['maxwidth'] = max_width
 if max_height:
  params['maxheight'] = max_height
 response = client._get('/maps/api/place/photo', params, extract_body=(lambda response: response), requests_kwargs={'stream': True})
 return response.iter_content()

def places_photo ( client , photo_reference , max_width = None , max_height = None ) : if ( not ( max_width or max_height ) ) : raise ValueError ( 'a max_width or max_height arg is required' ) params = { 'photoreference' : photo_reference } if max_width : params [ 'maxwidth' ] = max_width if max_height : params [ 'maxheight' ] = max_height response = client . _get ( '/maps/api/place/photo' , params , extract_body = ( lambda response : response ) , requests_kwargs = { 'stream' : True } ) return response . iter_content ( )
downloads a photo from the places api .