(self)
return j
Exports the user, his projects, and his hooks for use in a
        private-ly hosted Notifico instance.
Exports the user, his projects, and his hooks for use in a
        private-ly hosted Notifico instance.
Exports the user his projects and his hooks for use in a private - ly hosted Notifico instance .
def export(self):
        """
        Exports the user, his projects, and his hooks for use in a
        private-ly hosted Notifico instance.
        """
        j = {
            'user': {
                'username': self.username,
                'email': self.email,
                'joined': self.joined.isoformat(),
                'company': self.company,
                'website': self.website,
                'location': self.location
            },
            'projects': [{
                'name': p.name,
                'created': p.created.isoformat(),
                'public': p.public,
                'website': p.website,
                'message_count': p.message_count,
                'channels': [{
                    'created': c.created.isoformat(),
                    'channel': c.channel,
                    'host': c.host,
                    'port': c.port,
                    'ssl': c.ssl,
                    'public': c.public
                } for c in p.channels],
                'hooks': [{
                    'created': h.created.isoformat(),
                    'key': h.key,
                    'service_id': h.service_id,
                    'message_count': h.message_count,
                    'config': h.config
                } for h in p.hooks]
            } for p in self.projects]
        }

        return j
def export ( self ) : j = { 'user' : { 'username' : self . username , 'email' : self . email , 'joined' : self . joined . isoformat ( ) , 'company' : self . company , 'website' : self . website , 'location' : self . location } , 'projects' : [ { 'name' : p . name , 'created' : p . created . isoformat ( ) , 'public' : p . public , 'website' : p . website , 'message_count' : p . message_count , 'channels' : [ { 'created' : c . created . isoformat ( ) , 'channel' : c . channel , 'host' : c . host , 'port' : c . port , 'ssl' : c . ssl , 'public' : c . public } for c in p . channels ] , 'hooks' : [ { 'created' : h . created . isoformat ( ) , 'key' : h . key , 'service_id' : h . service_id , 'message_count' : h . message_count , 'config' : h . config } for h in p . hooks ] } for p in self . projects ] } return j