def _extend(self, json, stackauth): self.id = json.user_id self.user_type = UserType.from_string(json.user_type) if not hasattr(json, 'on_site'): # assume it's Area 51 if we can't get a site out of it self.on_site = Area51() self.has_endpoint = False else: self.on_site = SiteDefinition(json.on_site, stackauth)
def _extend(self, json, stackauth): self.id = json.user_id self.user_type = UserType.from_string(json.user_type) if not hasattr(json, 'site_url'): # assume it's Area 51 if we can't get a site out of it self.on_site = Area51() self.has_endpoint = False else: self.on_site = UserAssociationSiteListing(self.json, stackauth)
def _extend(self, json, stackauth): self.id = json.user_id self.user_type = UserType.from_string(json.user_type) self.on_site = SiteDefinition(json.on_site, stackauth)