% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_transformation.R
\name{yt_to_dataframe}
\alias{yt_to_dataframe}
\title{Convert API response to data frame}
\usage{
yt_to_dataframe(api_response, clean_names = TRUE, parse_dates = TRUE)
}
\arguments{
\item{api_response}{List returned from get_report() or other API functions}

\item{clean_names}{Logical. Clean column names by removing special characters (default: TRUE)}

\item{parse_dates}{Logical. Parse date columns to Date objects (default: TRUE)}
}
\value{
data.frame with transformed data, or NULL if no data available
}
\description{
Transforms YouTube Analytics API response into a clean data.frame with proper column names and types.
}
\examples{
\dontrun{
# Get data and convert to data.frame
report <- get_channel_overview("last_30_days")
df <- yt_to_dataframe(report)

# Keep original column names
df <- yt_to_dataframe(report, clean_names = FALSE)
}
}
