mixcoatl/admin/license.py
def load(self, **kwargs):
        """(Re)load the current object's attributes from an API call"""
        from mixcoatl.utils import uncamel_keys

        reserved_words = ['type']
        p = self.PATH

        if 'params' in kwargs:
            params = kwargs['params']
        else:
            params = camel_keys(self.params)

        s = self.get(p, params=params)
        if self.last_error is None:
            scope = uncamel_keys(s)
            for k in scope.keys():
                if k in reserved_words:
                    the_key = 'e_' + k
                else:
                    the_key = k
                nk = '_%s__%s' % (self.__class__.__name__, the_key)
                # nk = '__%s' %  the_key
                if the_key not in self._Resource__props():
                    self.add_property(k)
                setattr(self, nk, scope[k])
                self.loaded = True
        else:
            return self.last_error
(Re)load the current object's attributes from an API call
(Re)load the current object's attributes from an API call
( Re ) load the current object ' s attributes from an API call
def load(self, **kwargs):
        from mixcoatl.utils import uncamel_keys
        reserved_words = ['type']
        p = self.PATH
        if 'params' in kwargs:
            params = kwargs['params']
        else:
            params = camel_keys(self.params)
        s = self.get(p, params=params)
        if self.last_error is None:
            scope = uncamel_keys(s)
            for k in scope.keys():
                if k in reserved_words:
                    the_key = 'e_' + k
                else:
                    the_key = k
                nk = '_%s__%s' % (self.__class__.__name__, the_key)
                if the_key not in self._Resource__props():
                    self.add_property(k)
                setattr(self, nk, scope[k])
                self.loaded = True
        else:
            return self.last_error
def load ( self , ** kwargs ) : from mixcoatl . utils import uncamel_keys reserved_words = [ 'type' ] p = self . PATH if 'params' in kwargs : params = kwargs [ 'params' ] else : params = camel_keys ( self . params ) s = self . get ( p , params = params ) if self . last_error is None : scope = uncamel_keys ( s ) for k in scope . keys ( ) : if k in reserved_words : the_key = 'e_' + k else : the_key = k nk = '_%s__%s' % ( self . __class__ . __name__ , the_key ) if the_key not in self . _Resource__props ( ) : self . add_property ( k ) setattr ( self , nk , scope [ k ] ) self . loaded = True else : return self . last_error
(Re)load the current object's attributes from an API call
( Re ) load the current object ' s attributes from an API call
"""(Re)load the current object's attributes from an API call""" # nk = '__%s' %  the_key
self