/// Get all products for the given facet or category.
///
/// # OFF API request
/// ```ignore
/// GET https://{locale}.openfoodfacts.org/{facet}/{value}.json
/// ```
///
/// # Arguments
///
/// * what - A facet name or "category". The facet name is always the singular name
///     of the face type name (i.e. brands -> brand, entry-dates -> entry-date, etc).
///     The facet name or the "category" literal may be given either in english or
///     localized, i.e. additives (world), additifs (fr), category (world), categorie (fr).
/// * id - The localized id of the facet or category. The IDs are returned by calls
///     to the corresponding `facet(<facet_type>)` or `categories()` endpoint. For example,
///     the IDs for the `entry-date` facet are returned by the call `facet("entry-dates")`.
/// * output - Optional output parameters. This call supports the locale, pagination
///     and fields parameters.
Get all products for the given facet or category.
Get all products for the given facet or category .
pub fn products_by(&self, what: &str, id: &str, output: Option<Output>) -> OffResult {
        let base_url = self.base_url(output.as_ref().and_then(|o| o.locale.as_ref()))?;
        let url = base_url.join(&format!("{}/{}.json", what, id))?;
        let params = output.map(|o| o.params(&["page", "page_size", "fields"]));
        self.get(url, params.as_ref())
    }
pub fn products_by ( & self , what : & str , id : & str , output : Option < Output > ) -> OffResult { let base_url = self . base_url ( output . as_ref ( ) . and_then ( | o | o . locale . as_ref ( ) ) ) ? ; let url = base_url . join ( & format ! ( " " what id ) ) ? ; let params = output . map ( | o | o . params ( & [ " " , " " , " " ] ) ) ; self . get ( url , params . as_ref ( ) ) }
Get all products for the given facet or category.
Get all products for the given facet or category .
&self
what
&str
id
&str
output
Option<Output>
off api request
```ignore
GET https://{locale}.openfoodfacts.org/{facet}/{value}.json
```
` ` ` ignore GET https : // { locale } . openfoodfacts . org / { facet } / { value } . json ` ` `