Exemple #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())
Exemple #2
0
 def retract_challenge(self, destuser_id):
     """ Retract a challenge previously issued to the destuser """
     ChallengeModel.del_relation(self.id(), destuser_id)
Exemple #3
0
 def decline_challenge(self, srcuser_id):
     """ Decline a challenge previously issued by the srcuser """
     ChallengeModel.del_relation(srcuser_id, self.id())
Exemple #4
0
 def find_challenge(self, srcuser_id):
     """ Returns (found, prefs) """
     return ChallengeModel.find_relation(srcuser_id, self.id())
Exemple #5
0
 def issue_challenge(self, destuser_id, prefs):
     """ Issue a challenge to the destuser """
     ChallengeModel.add_relation(self.id(), destuser_id, prefs)
 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())
Exemple #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)
 def decline_challenge(self, srcuser_id):
     """ Decline a challenge previously issued by the srcuser """
     ChallengeModel.del_relation(srcuser_id, self.id())
 def retract_challenge(self, destuser_id):
     """ Retract a challenge previously issued to the destuser """
     ChallengeModel.del_relation(self.id(), destuser_id)
Exemple #10
0
 def issue_challenge(self, destuser_id, prefs):
     """ Issue a challenge to the destuser """
     ChallengeModel.add_relation(self.id(), destuser_id, prefs)
Exemple #11
0
 def find_challenge(self, srcuser_id):
     """ Returns (found, prefs) """
     return ChallengeModel.find_relation(srcuser_id, self.id())
Exemple #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)