Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
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
def add_user(self, user_json):
u = User(user_json)
self.users[u.id] = u
def __init__(self, json):
self.obj = json
self.user = User(json['from'])
self.message = json['message']