def friends(): friends = Connection.friendshipRequest("friends", {}).get("friends") Common.printNotificationText(f"Friends: {len(friends)}") for friend in friends: Common.printNotificationText(friend)
def outgoing(): outgoing = Connection.friendshipRequest("outgoing", {}).get("outgoing") Common.printNotificationText( f"Ougoing Friendship Requests: {len(outgoing)}") for username in outgoing: Common.printNotificationText(username)
def incoming(): incoming = Connection.friendshipRequest("incoming", {}).get("incoming") Common.printNotificationText( f"Incoming Friendship Requests: {len(incoming)}") for username in incoming: Common.printNotificationText(username)
def remove(): username = input("Username -> ") response = Connection.friendshipRequest("remove", {"username": username}) successful = response.get("successful") message = response.get("message") if successful: Common.printPositiveText(message) else: Common.printNegativeText(message)