def _post_meetup_data_to_kws (self,obj,kws): # convert longitude and latitude for key in ('lon','lat'): loc = fro_meetup_geo(kws.pop(key)) if loc is not None: kws[key] = loc return kws
def _post_meetup_data_to_kws (self,meetup_data,kws): # convert longitude and latitude for key in ('lon','lat'): loc = fro_meetup_geo(kws.pop(key,None)) if loc is not None: kws[key] = loc # if there are members then convert that number to an int key = str('n_members') if key in kws: kws[key] = int(kws[key] or 0) # if timezone then check and convert to timezone string key = 'timezone' if key in kws: kws[key] = str(pytz.timezone(meetup_data[key])) return kws