'Returns a collection of user IDs belonging to users who have
pending request to follow the authenticated user.
Args:
cursor:
breaks the ids into pages of no more than 5000.
stringify_ids:
returns the IDs as unicode strings. [Optional]
Returns:
A list of user IDs'

def IncomingFriendship(self, cursor=None, stringify_ids=None):

    url = ('%s/friendships/incoming.json' % self.base_url)
    parameters = {}
    if stringify_ids:
        parameters['stringify_ids'] = 'true'
    result = []
    total_count = 0
    while True:
        if cursor:
            try:
                parameters['count'] = int(cursor)
            except ValueError:
                raise TwitterError({'message': 'cursor    must    be    an    integer'})
                break
        resp = self._RequestUrl(url, 'GET', data=parameters)
        data = self._ParseAndCheckTwitter(resp.content.decode('utf-8'))
        result += [x for x in data['ids']]
        if ('next_cursor' in data):
            if ((data['next_cursor'] == 0) or (data['next_cursor'] == data['previous_cursor'])):
                break
            else:
                cursor = data['next_cursor']
                total_count -= len(data['ids'])
                if (total_count < 1):
                    break
        else:
            break
    return result
