labpack/events/meetup.py
def list_group_events(self, group_url, upcoming=True):

        ''' a method to retrieve a list of upcoming events hosted by group

        :param group_url: string with meetup urlname field of group
        :param upcoming: [optional] boolean to filter list to only future events
        :return: dictionary with list of event details inside [json] key

        event_details = self._reconstruct_event({})
        '''

    # https://www.meetup.com/meetup_api/docs/:urlname/events/#list

        title = '%s.list_group_events' % self.__class__.__name__

    # validate inputs
        input_fields = {
            'group_url': group_url
        }
        for key, value in input_fields.items():
            if value:
                object_title = '%s(%s=%s)' % (title, key, str(value))
                self.fields.validate(value, '.%s' % key, object_title)

    # construct request fields
        url = '%s/%s/events' % (self.endpoint, group_url)
        params = {
            'status': 'past',
            'fields': 'comment_count,event_hosts,rsvp_rules,short_link,survey_questions,rsvpable'
        }
        if upcoming:
            params['status'] = 'upcoming'

    # send request
        response_details = self._get_request(url, params=params)

    # construct method output
        group_events = {
            'json': []
        }
        for key, value in response_details.items():
            if key != 'json':
                group_events[key] = value
        for event in response_details['json']:
            group_events['json'].append(self._reconstruct_event(event))

        return group_events
 a method to retrieve a list of upcoming events hosted by group

        :param group_url: string with meetup urlname field of group
        :param upcoming: [optional] boolean to filter list to only future events
        :return: dictionary with list of event details inside [json] key

        event_details = self._reconstruct_event({})
        
a method to retrieve a list of upcoming events hosted by group
a method to retrieve a list of upcoming events hosted by group
def list_group_events(self, group_url, upcoming=True):
        title = '%s.list_group_events' % self.__class__.__name__
        input_fields = {
            'group_url': group_url
        }
        for key, value in input_fields.items():
            if value:
                object_title = '%s(%s=%s)' % (title, key, str(value))
                self.fields.validate(value, '.%s' % key, object_title)
        url = '%s/%s/events' % (self.endpoint, group_url)
        params = {
            'status': 'past',
            'fields': 'comment_count,event_hosts,rsvp_rules,short_link,survey_questions,rsvpable'
        }
        if upcoming:
            params['status'] = 'upcoming'
        response_details = self._get_request(url, params=params)
        group_events = {
            'json': []
        }
        for key, value in response_details.items():
            if key != 'json':
                group_events[key] = value
        for event in response_details['json']:
            group_events['json'].append(self._reconstruct_event(event))
        return group_events
def list_group_events ( self , group_url , upcoming = True ) : title = '%s.list_group_events' % self . __class__ . __name__ input_fields = { 'group_url' : group_url } for key , value in input_fields . items ( ) : if value : object_title = '%s(%s=%s)' % ( title , key , str ( value ) ) self . fields . validate ( value , '.%s' % key , object_title ) url = '%s/%s/events' % ( self . endpoint , group_url ) params = { 'status' : 'past' , 'fields' : 'comment_count,event_hosts,rsvp_rules,short_link,survey_questions,rsvpable' } if upcoming : params [ 'status' ] = 'upcoming' response_details = self . _get_request ( url , params = params ) group_events = { 'json' : [ ] } for key , value in response_details . items ( ) : if key != 'json' : group_events [ key ] = value for event in response_details [ 'json' ] : group_events [ 'json' ] . append ( self . _reconstruct_event ( event ) ) return group_events
a method to retrieve a list of upcoming events hosted by group
a method to retrieve a list of upcoming events hosted by group
''' a method to retrieve a list of upcoming events hosted by group

        :param group_url: string with meetup urlname field of group
        :param upcoming: [optional] boolean to filter list to only future events
        :return: dictionary with list of event details inside [json] key

        event_details = self._reconstruct_event({})
        ''' # https://www.meetup.com/meetup_api/docs/:urlname/events/#list
 # validate inputs
 # construct request fields
 # send request
 # construct method output

dictionary with list of event details inside [json] key
event_details = self._reconstruct_event({})
dictionary with list of event details inside [ json ] key event_details = self . _reconstruct_event ( {} )
self
group_url
string with meetup urlname field of group
string with meetup urlname field of group
upcoming
[optional] boolean to filter list to only future events
[ optional ] boolean to filter list to only future events