Esempio n. 1
0
 def accept_challenge(self, srcuser_id):
     """ Decline a challenge previously issued by the srcuser """
     # Delete the accepted challenge and return the associated preferences
     return ChallengeModel.del_relation(srcuser_id, self.id())
Esempio n. 2
0
 def retract_challenge(self, destuser_id):
     """ Retract a challenge previously issued to the destuser """
     ChallengeModel.del_relation(self.id(), destuser_id)
Esempio n. 3
0
 def decline_challenge(self, srcuser_id):
     """ Decline a challenge previously issued by the srcuser """
     ChallengeModel.del_relation(srcuser_id, self.id())
Esempio n. 4
0
 def find_challenge(self, srcuser_id):
     """ Returns (found, prefs) """
     return ChallengeModel.find_relation(srcuser_id, self.id())
Esempio n. 5
0
 def issue_challenge(self, destuser_id, prefs):
     """ Issue a challenge to the destuser """
     ChallengeModel.add_relation(self.id(), destuser_id, prefs)
Esempio n. 6
0
 def accept_challenge(self, srcuser_id):
     """ Decline a challenge previously issued by the srcuser """
     # Delete the accepted challenge and return the associated preferences
     return ChallengeModel.del_relation(srcuser_id, self.id())
Esempio n. 7
0
 def has_challenge(self, destuser_id):
     """ Returns True if this user has challenged destuser """
     # !!! TODO: Cache this in the user object to save NDB reads
     return ChallengeModel.has_relation(self.id(), destuser_id)
Esempio n. 8
0
 def decline_challenge(self, srcuser_id):
     """ Decline a challenge previously issued by the srcuser """
     ChallengeModel.del_relation(srcuser_id, self.id())
Esempio n. 9
0
 def retract_challenge(self, destuser_id):
     """ Retract a challenge previously issued to the destuser """
     ChallengeModel.del_relation(self.id(), destuser_id)
Esempio n. 10
0
 def issue_challenge(self, destuser_id, prefs):
     """ Issue a challenge to the destuser """
     ChallengeModel.add_relation(self.id(), destuser_id, prefs)
Esempio n. 11
0
 def find_challenge(self, srcuser_id):
     """ Returns (found, prefs) """
     return ChallengeModel.find_relation(srcuser_id, self.id())
Esempio n. 12
0
 def has_challenge(self, destuser_id):
     """ Returns True if this user has challenged destuser """
     # !!! TODO: Cache this in the user object to save NDB reads
     return ChallengeModel.has_relation(self.id(), destuser_id)