def add_tweet_neo4j(list_id): for id in list_id: neo4j.add_tweet({'id': id}) neo4j.save_all() if not neo4j.check_tweet_exists(id): return False return True
def add_bot_neo4j(list_id): for id in list_id: neo4j.add_bot({'id': id, 'name': 'bot_test', 'username': '******'}) neo4j.save_all() if not neo4j.check_bot_exists(id): return False return True
def add_relationship(id_1, id_2): neo4j.add_follow_relationship({ "id_1": id_1, "id_2": id_2, "type_1": "Bot", "type_2": "Bot" }) neo4j.save_all() return neo4j.check_follow_exists({ "id_1": id_1, "id_2": id_2, "type_1": "Bot", "type_2": "Bot" })
def add_bot_neo4j(): neo4j.add_bot({'id': "1", 'name': 'bot_test', 'username': '******'}) neo4j.save_all() return neo4j.check_bot_exists("1")
def add_relationship(id_1, id_2): neo4j.add_wrote_relationship({"user_id": id_1, "tweet_id": id_2, "user_type": "Bot"}) neo4j.save_all() return neo4j.check_writer_relationship({"user_id": id_1, "tweet_id": id_2, "user_type": "Bot"})