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