def GetView(self, viewname):
        """Get Info on View Name
        """

        # Build Request
        soap_request = soap('GetView')
        soap_request.add_parameter('listName', self.listName)

        if viewname == None:
            views = self.GetViewCollection()
            for view in views:
                if 'DefaultView' in view:
                    if views[view]['DefaultView'] == 'TRUE':
                        viewname = view
                        break

        if self.listName not in ['UserInfo', 'User Information List']:
            soap_request.add_parameter('viewName', self.views[viewname]['Name'][1:-1])
        else:
            soap_request.add_parameter('viewName', viewname)
        self.last_request = str(soap_request)

        # Send Request
        response = self._session.post(url=self._url('Views'),
                                      headers=self._headers('GetView'),
                                      data=str(soap_request),
                                      verify=self._verify_ssl,
                                      timeout=self.timeout)

        # Parse Response
        if response.status_code == 200:
            envelope = etree.fromstring(response.text.encode('utf-8'), parser=etree.XMLParser(huge_tree=self.huge_tree))
            view = envelope[0][0][0][0]
            info = {key: value for (key, value) in view.items()}
            fields = [x.items()[0][1] for x in view[1]]
            return {'info': info, 'fields': fields}

        else:
            raise Exception("ERROR:", response.status_code, response.text)
def GetView ( self , viewname ) : soap_request = soap ( 'GetView' ) soap_request . add_parameter ( 'listName' , self . listName ) if viewname == None : views = self . GetViewCollection ( ) for view in views : if 'DefaultView' in view : if views [ view ] [ 'DefaultView' ] == 'TRUE' : viewname = view break if self . listName not in [ 'UserInfo' , 'User Information List' ] : soap_request . add_parameter ( 'viewName' , self . views [ viewname ] [ 'Name' ] [ 1 : - 1 ] ) else : soap_request . add_parameter ( 'viewName' , viewname ) self . last_request = str ( soap_request ) response = self . _session . post ( url = self . _url ( 'Views' ) , headers = self . _headers ( 'GetView' ) , data = str ( soap_request ) , verify = self . _verify_ssl , timeout = self . timeout ) if response . status_code == 200 : envelope = etree . fromstring ( response . text . encode ( 'utf-8' ) , parser = etree . XMLParser ( huge_tree = self . huge_tree ) ) view = envelope [ 0 ] [ 0 ] [ 0 ] [ 0 ] info = { key : value for ( key , value ) in view . items ( ) } fields = [ x . items ( ) [ 0 ] [ 1 ] for x in view [ 1 ] ] return { 'info' : info , 'fields' : fields } else : raise Exception ( "ERROR:" , response . status_code , response . text )
Get Info on View Name