def tweetMedia(message, mediaIds, api):
    """creates a tweet with previously uploaded media using the mediaId

    Args:
        message (String): tweet text
        mediaIds (List): list of media ids for the tweet
        api (API Tweetpy Object): twitter api object with authentication

    Returns:
        String: created tweetId
    """

    print('tweeting media...')
    responseStatusObj = api.update_status(status=message, media_ids=mediaIds)
    print('media tweeted.')

    tweetId = responseStatusObj.id_str

    return tweetId