'Update the priority spot of a rule
Move an existing rule to the desired spot in the rules
list and then update the priority of the rules.'

@classmethod
def reorder(self, subreddit, short_name, priority):

    rule_to_reorder = self.get_rule(subreddit, short_name)
    if (not rule_to_reorder):
        return False
    self._remove(subreddit._id36, [short_name])
    rules = self.get_rules(subreddit)
    priority = min(priority, len(rules))
    current_priority_index = 0
    blobs = {}
    blobs.update(self.get_rule_blob(short_name=rule_to_reorder['short_name'], description=rule_to_reorder['description'], priority=priority, kind=rule_to_reorder.get('kind'), created_utc=rule_to_reorder['created_utc']))
    for rule in rules:
        if (priority == current_priority_index):
            current_priority_index += 1
        if (rule['priority'] != current_priority_index):
            blobs.update(self.get_rule_blob(short_name=rule['short_name'], description=rule['description'], priority=current_priority_index, kind=rule.get('kind'), created_utc=rule['created_utc']))
        current_priority_index += 1
    self._set_values(subreddit._id36, blobs)
