How to use the sma.archiver.User function in sma

To help you get started, we’ve selected a few sma examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sdockray / sma / sma / archiver.py View on Github external
def ingest_obj(self):
		self.name = self.obj['name']
		self.initiator = User(self.obj['owner'])
		self.users[self.initiator.id] = self.initiator
		self.description = self.obj['description'] if 'description' in self.obj else ""
		self.email = self.obj['email'] if 'email' in self.obj else ""
		self.extract_links(self.description)
		print "Ingested group: ", self.name
github sdockray / sma / sma / archiver.py View on Github external
def ingest_obj(self):
		self.id = self.obj['id']
		self.initiator = User(self.obj['from'])
		self.users[self.initiator.id] = self.initiator
		self.message = self.obj['message'] if 'message' in self.obj else ""
		self.link = self.obj['link'] if 'link' in self.obj else ""
		self.ingest_comments()
		self.extract_links(self.message)
		self.extract_links(self.link, description_override=self.message)
		#print "Ingested post initiated by ",self.initiator.name
github sdockray / sma / sma / archiver.py View on Github external
def add_user(self, user_json):
		u = User(user_json)
		self.users[u.id] = u
github sdockray / sma / sma / archiver.py View on Github external
def __init__(self, json):
		self.obj = json
		self.user = User(json['from'])
		self.message = json['message']