(item_getter)
return user_items
Keeps making calls to twitter to gather all the items the API can
    index and build an array of them
    :param item_getter: the function call being made to twitter to get tweets or favorites from the user's account
    :return user_items: an array of the items gathered
Keeps making calls to twitter to gather all the items the API can
    index and build an array of them
    :param item_getter: the function call being made to twitter to get tweets or favorites from the user's account
    :return user_items: an array of the items gathered
Keeps making calls to twitter to gather all the items the API can index and build an array of them : param item_getter : the function call being made to twitter to get tweets or favorites from the user s account : return user_items : an array of the items gathered
def gather_items(item_getter):
    """
    Keeps making calls to twitter to gather all the items the API can
    index and build an array of them
    :param item_getter: the function call being made to twitter to get tweets or favorites from the user's account
    :return user_items: an array of the items gathered
    """
    user_items = []
    new_items = item_getter(count=200)
    user_items.extend(new_items)
    oldest = user_items[-1].id - 1

    while len(new_items) > 0:
        new_items = item_getter(count=200, max_id=oldest)
        user_items.extend(new_items)
        oldest = user_items[-1].id - 1

    return user_items
def gather_items ( item_getter ) : user_items = [ ] new_items = item_getter ( count = 200 ) user_items . extend ( new_items ) oldest = user_items [ - 1 ] . id - 1 while len ( new_items ) > 0 : new_items = item_getter ( count = 200 , max_id = oldest ) user_items . extend ( new_items ) oldest = user_items [ - 1 ] . id - 1 return user_items