labpack/events/meetup.py
def join_group(self, group_url, membership_answers=None):

        ''' a method to add member to a meetup group

        :param group_url: string with meetup urlname for group
        :param membership_answers: list with question id and answer for group join questions
        :return: dictionary with member profile details inside [json] key

        profile_details = self._reconstruct_member({})
        '''

    # https://www.meetup.com/meetup_api/docs/:urlname/members/#create

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

    # validate permissions
        if not 'group_join' in self.service_scope:
            raise ValueError('%s requires group_join as part of oauth2 service_scope permissions.' % title)

    # validate inputs
        input_fields = {
            'group_url': group_url,
            'membership_answers': membership_answers
        }
        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/members' % (self.endpoint, group_url)
        params = {}
        if membership_answers:
            for answer in membership_answers:
                key = 'answer_%s' % str(answer['question_id'])
                params[key] = answer['answer_text']

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

    # construct method output
        if response_details['json']:
            response_details['json'] = self._reconstruct_member(response_details['json'])

        return response_details
 a method to add member to a meetup group

        :param group_url: string with meetup urlname for group
        :param membership_answers: list with question id and answer for group join questions
        :return: dictionary with member profile details inside [json] key

        profile_details = self._reconstruct_member({})
        
a method to add member to a meetup group
a method to add member to a meetup group
def join_group(self, group_url, membership_answers=None):
        title = '%s.join_group' % self.__class__.__name__
        if not 'group_join' in self.service_scope:
            raise ValueError('%s requires group_join as part of oauth2 service_scope permissions.' % title)
        input_fields = {
            'group_url': group_url,
            'membership_answers': membership_answers
        }
        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/members' % (self.endpoint, group_url)
        params = {}
        if membership_answers:
            for answer in membership_answers:
                key = 'answer_%s' % str(answer['question_id'])
                params[key] = answer['answer_text']
        response_details = self._post_request(url, params=params)
        if response_details['json']:
            response_details['json'] = self._reconstruct_member(response_details['json'])
        return response_details
def join_group ( self , group_url , membership_answers = None ) : title = '%s.join_group' % self . __class__ . __name__ if not 'group_join' in self . service_scope : raise ValueError ( '%s requires group_join as part of oauth2 service_scope permissions.' % title ) input_fields = { 'group_url' : group_url , 'membership_answers' : membership_answers } 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/members' % ( self . endpoint , group_url ) params = { } if membership_answers : for answer in membership_answers : key = 'answer_%s' % str ( answer [ 'question_id' ] ) params [ key ] = answer [ 'answer_text' ] response_details = self . _post_request ( url , params = params ) if response_details [ 'json' ] : response_details [ 'json' ] = self . _reconstruct_member ( response_details [ 'json' ] ) return response_details
a method to add member to a meetup group
a method to add member to a meetup group
''' a method to add member to a meetup group

        :param group_url: string with meetup urlname for group
        :param membership_answers: list with question id and answer for group join questions
        :return: dictionary with member profile details inside [json] key

        profile_details = self._reconstruct_member({})
        ''' # https://www.meetup.com/meetup_api/docs/:urlname/members/#create
 # validate permissions
 # validate inputs
 # construct request fields
 # send request
 # construct method output

dictionary with member profile details inside [json] key
profile_details = self._reconstruct_member({})
dictionary with member profile details inside [ json ] key profile_details = self . _reconstruct_member ( {} )
self
group_url
string with meetup urlname for group
string with meetup urlname for group
membership_answers
list with question id and answer for group join questions
list with question id and answer for group join questions