% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/odata_products.R
\name{dse_odata_products_request}
\alias{dse_odata_products_request}
\alias{dse_odata_products}
\title{Create a OData Request for a Data Space Ecosystem Product}
\usage{
dse_odata_products_request(..., expand)

dse_odata_products(..., expand = NULL)
}
\arguments{
\item{...}{Ignored in case of \code{dse_odata_products_request()}. Dots are passed
to embedded \code{\link[dplyr:filter]{dplyr::filter()}} in case of \code{dse_odata_products()}}

\item{expand}{Additional information to be appended to the result.
Should be any of \code{"Attributes"}, \code{"Assets"}, or \code{"Locations"}. Note that,
these columns are not affected by \code{\link[dplyr:select]{dplyr::select()}} calls (before calling
\code{\link[dplyr:collect]{dplyr::collect()}}).}
}
\value{
Returns an \code{odata_request} class object in case of
\code{dse_odata_products_request()}, which is an extension of \code{\link[httr2:request]{httr2::request()}}.
In case of \code{dse_odata_products()} a \code{data.frame} listing requested products is
returned.
}
\description{
OData is an application programming interface (API) used to disseminate Copernicus
Data Space Ecosystem products. This function creates a request for this service,
which can be used to obtain a \code{data.frame} with product information. This request
supports several tidyverse methods for filtering and arranging the data.
}
\details{
You can apply some tidyverse functions (see \link{tidy_verbs}) to \code{odata_request}
object returned by \code{\link[=dse_odata_products_request]{dse_odata_products_request()}}. These apply lazy evaluation.
Meaning that they are just added to the object and are only evaluated after
calling either \code{\link[dplyr:compute]{dplyr::compute()}} or \code{\link[dplyr:collect]{dplyr::collect()}} (see examples).
}
\examples{
if (interactive()) {
  bbox <-
    sf::st_bbox(
      c(xmin = 5.261, ymin = 52.680, xmax = 5.319, ymax = 52.715),
      crs = 4326) |>
      sf::st_as_sfc()

  dse_odata_products_request() |>
    dplyr::filter(
      `ContentDate/Start` > "2025-01-01") |>
    sf::st_intersects(bbox) |>
    dplyr::arrange(dplyr::desc(Id)) |>
    dplyr::slice_head(n = 100) |>
    dplyr::collect()
}
}
\references{
\url{https://documentation.dataspace.copernicus.eu/APIs/OData.html}
}
\seealso{
Other odata:
\code{\link[=dse_odata_attributes]{dse_odata_attributes()}},
\code{\link[=dse_odata_bursts_request]{dse_odata_bursts_request()}},
\code{\link[=dse_odata_download]{dse_odata_download()}},
\code{\link[=dse_odata_download_path]{dse_odata_download_path()}},
\code{\link[=dse_odata_product_nodes]{dse_odata_product_nodes()}},
\code{\link[=dse_odata_quicklook]{dse_odata_quicklook()}}
}
\concept{odata}
