import requests


def get_reviews(review_id, page_no):
    """ 
    Get the reviews from the Apple APIfor a given App using the requests package 
    
    Args:
        review_id (int) - the id of the Apple App ID you want the reviews from
        page_no (int) - data is paginated, so this dermines which page number 
        to return
    Returns:
        the response from the api (if status == 200), otherwise None
    
    """
    
    print(f"Getting reviews from Apple API for page {page_no}")
    url = f'https://itunes.apple.com/gb/rss/customerreviews/page={page_no}/id={review_id}/sortBy=mostRecent/json'
    response = requests.get(url)
    if response.status_code == 200:
        return response
    elif response is None:
        return None
    else:
        print(f"Error retrieving reviews {response.status_code}")
        return None