def create_award_claim_code(self, unique_award_id, award_codename, description, url): """Create a one-time-use claim URL for a user to claim a trophy. `unique_award_id` - A string that uniquely identifies the kind of Trophy the user would be claiming. See: token.py:AwardClaimToken.uid `award_codename` - The codename of the Award the user will claim `description` - The description the Trophy will receive `url` - The URL the Trophy will receive """ award = Award._by_codename(award_codename) token = AwardClaimToken._new(unique_award_id, award, description, url) return token.confirm_url()
def create_award_claim_code(self, unique_award_id, award_codename, description, url): '''Create a one-time-use claim URL for a user to claim a trophy. `unique_award_id` - A string that uniquely identifies the kind of Trophy the user would be claiming. See: token.py:AwardClaimToken.uid `award_codename` - The codename of the Award the user will claim `description` - The description the Trophy will receive `url` - The URL the Trophy will receive ''' award = Award._by_codename(award_codename) token = AwardClaimToken._new(unique_award_id, award, description, url) return token.confirm_url()