예제 #1
0
def removeQuestionId(questionId):
    Notify("[!] Remove QuestionID to all_question_ids object")
    serial = Get(GetContext(), get_all_ids)
    all_question_ids = Deserialize(serial)
    all_question_ids.remove(questionId)
    new_serial = Serialize(all_question_ids)
    Put(GetContext(), get_all_ids, new_serial)
    Notify("[!] Removed QuestionID from all_question_ids object")
예제 #2
0
def removePostId(postId):
    Notify("[!] Remove PostID to all_posts object")
    serial = Get(GetContext(), get_all_ids)
    all_posts = Deserialize(serial)
    all_posts.remove(postId)
    new_serial = Serialize(all_posts)
    Put(GetContext(), get_all_ids, new_serial)
    Notify("[!] Removed PostID from all_posts object")
예제 #3
0
def removePostId(postId):
    Notify("[!] Remove PostID to all_posts object")
    serial = Get(GetContext(), get_all_ids)
    all_posts = Deserialize(serial)

    counter = 0
    place = 0
    for p_id in all_posts:
        if p_id == postId:
            Log("[!] Found ID")
            place = counter
        counter = counter + 1

    all_posts.remove(place)
    Log("[!] Removed ID")

    new_serial = Serialize(all_posts)
    Put(GetContext(), get_all_ids, new_serial)
    Notify("[!] Removed PostID from all_posts object")