def location_media(location_id, request_parameters: {limit: 1000}, limit: 10)
      location = extract_location_media(location_id, request_parameters: request_parameters)
      # check if we should get more data
      paging_info = location.paging_info
      # poll more data
      while location.total_media_count < limit && paging_info[:has_next_page] do
        request_opts = {}.merge(request_parameters)
        if paging_info && paging_info[:end_cursor]
          request_opts[:max_id] = paging_info[:end_cursor]
        end
        next_page_location = extract_location_media(location_id, request_parameters: request_opts)
        location.add_media(next_page_location.media)
        paging_info = next_page_location.paging_info
        location
      end
      location
    end
def location_media(location_id, request_parameters: {limit: 1000}, limit: 10)
      location = extract_location_media(location_id, request_parameters: request_parameters)
      # check if we should get more data
      paging_info = location.paging_info
      # poll more data
      while location.total_media_count < limit && paging_info[:has_next_page] do
        request_opts = {}.merge(request_parameters)
        if paging_info && paging_info[:end_cursor]
          request_opts[:max_id] = paging_info[:end_cursor]
        end
        next_page_location = extract_location_media(location_id, request_parameters: request_opts)
        location.add_media(next_page_location.media)
        paging_info = next_page_location.paging_info
        location
      end
      location
    end
returns a location with media attached for the given location id

 limit: the amount of media that should be fetched.
 request_parameters: optional parameters that will be passed to the request