def intraday_activity_time_series(resource: nil, start_date: nil, end_date: nil, detail_level: nil,
                                      start_time: nil, end_time: nil)

      # converting to symbol to allow developer to use either 'calories' or :calories
      resource = resource.to_sym

      unless %i[calories steps distance floors elevation].include?(resource)
        raise FitgemOauth2::InvalidArgumentError,
              'Must specify resource to fetch intraday time series data for.'\
              ' One of (:calories, :steps, :distance, :floors, or :elevation) is required.'
      end

      unless start_date
        raise FitgemOauth2::InvalidArgumentError,
              'Must specify the start_date to fetch intraday time series data'
      end

      end_date ||= '1d'

      unless detail_level && %w(1min 15min).include?(detail_level)
        raise FitgemOauth2::InvalidArgumentError,
              'Must specify the data resolution to fetch intraday time series data for.'\
              ' One of (\"1d\" or \"15min\") is required.'
      end

      resource_path = [
          'user', @user_id,
          'activities', resource,
          'date', format_date(start_date),
          end_date, detail_level
      ].join('/')

      if start_time || end_time
        resource_path =
            [resource_path, 'time', format_time(start_time), format_time(end_time)].join('/')
      end
      get_call("#{resource_path}.json")
    end
def intraday_activity_time_series(resource: nil, start_date: nil, end_date: nil, detail_level: nil,
                                      start_time: nil, end_time: nil)

      # converting to symbol to allow developer to use either 'calories' or :calories
      resource = resource.to_sym

      unless %i[calories steps distance floors elevation].include?(resource)
        raise FitgemOauth2::InvalidArgumentError,
              'Must specify resource to fetch intraday time series data for.'\
              ' One of (:calories, :steps, :distance, :floors, or :elevation) is required.'
      end

      unless start_date
        raise FitgemOauth2::InvalidArgumentError,
              'Must specify the start_date to fetch intraday time series data'
      end

      end_date ||= '1d'

      unless detail_level && %w(1min 15min).include?(detail_level)
        raise FitgemOauth2::InvalidArgumentError,
              'Must specify the data resolution to fetch intraday time series data for.'\
              ' One of (\"1d\" or \"15min\") is required.'
      end

      resource_path = [
          'user', @user_id,
          'activities', resource,
          'date', format_date(start_date),
          end_date, detail_level
      ].join('/')

      if start_time || end_time
        resource_path =
            [resource_path, 'time', format_time(start_time), format_time(end_time)].join('/')
      end
      get_call("#{resource_path}.json")
    end
retrieves intraday activity time series.
 @param resource (required) for which the intrady series is retrieved. one of 'calories', 'steps', 'distance', 'floors', 'elevation'
 @param start_date (required) start date for the series
 @param end_date (optional) end date for the series, if not specified, the series is for 1 day
 @param detail_level (required) level of detail for the series
 @param start_time (optional)start time for the series
 @param end_time the (optional)end time for the series. specify both start_time and end_time, if using either