labpack/events/meetup.py
def list_member_topics(self, member_id):

        ''' a method to retrieve a list of topics member follows

        :param member_id: integer with meetup member id
        :return: dictionary with list of topic details inside [json] key

        topic_details = self.objects.topic.schema
        '''

    # https://www.meetup.com/meetup_api/docs/members/:member_id/#get

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

    # validate inputs
        input_fields = {
            'member_id': member_id
        }
        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 member id
        if not member_id:
            raise IndexError('%s requires member id argument.' % title)

    # compose request fields
        url = '%s/members/%s' % (self.endpoint, str(member_id))
        params = {
            'fields': 'topics'
        }

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

    # construct method output dictionary
        member_topics = {
            'json': []
        }
        for key, value in response_details.items():
            if not key == 'json':
                member_topics[key] = value

    # parse response
        if response_details['json']:
            if 'topics' in response_details['json'].keys():
                for topic in response_details['json']['topics']:
                    member_topics['json'].append(self.objects.topic.ingest(**topic))

        return member_topics
 a method to retrieve a list of topics member follows

        :param member_id: integer with meetup member id
        :return: dictionary with list of topic details inside [json] key

        topic_details = self.objects.topic.schema
        
a method to retrieve a list of topics member follows
a method to retrieve a list of topics member follows
def list_member_topics(self, member_id):
        title = '%s.list_member_topics' % self.__class__.__name__
        input_fields = {
            'member_id': member_id
        }
        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)
        if not member_id:
            raise IndexError('%s requires member id argument.' % title)
        url = '%s/members/%s' % (self.endpoint, str(member_id))
        params = {
            'fields': 'topics'
        }
        response_details = self._get_request(url, params=params)
        member_topics = {
            'json': []
        }
        for key, value in response_details.items():
            if not key == 'json':
                member_topics[key] = value
        if response_details['json']:
            if 'topics' in response_details['json'].keys():
                for topic in response_details['json']['topics']:
                    member_topics['json'].append(self.objects.topic.ingest(**topic))
        return member_topics
def list_member_topics ( self , member_id ) : title = '%s.list_member_topics' % self . __class__ . __name__ input_fields = { 'member_id' : member_id } 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 ) if not member_id : raise IndexError ( '%s requires member id argument.' % title ) url = '%s/members/%s' % ( self . endpoint , str ( member_id ) ) params = { 'fields' : 'topics' } response_details = self . _get_request ( url , params = params ) member_topics = { 'json' : [ ] } for key , value in response_details . items ( ) : if not key == 'json' : member_topics [ key ] = value if response_details [ 'json' ] : if 'topics' in response_details [ 'json' ] . keys ( ) : for topic in response_details [ 'json' ] [ 'topics' ] : member_topics [ 'json' ] . append ( self . objects . topic . ingest ( ** topic ) ) return member_topics
a method to retrieve a list of topics member follows
a method to retrieve a list of topics member follows
''' a method to retrieve a list of topics member follows

        :param member_id: integer with meetup member id
        :return: dictionary with list of topic details inside [json] key

        topic_details = self.objects.topic.schema
        ''' # https://www.meetup.com/meetup_api/docs/members/:member_id/#get
 # validate inputs
 # construct member id
 # compose request fields
 # send requests
 # construct method output dictionary
 # parse response

dictionary with list of topic details inside [json] key
topic_details = self.objects.topic.schema
dictionary with list of topic details inside [ json ] key topic_details = self . objects . topic . schema
self
member_id
integer with meetup member id
integer with meetup member id