pub fn search_by_barcode(&self, barcodes: &str, output: Option<Output>) -> OffResult {
        // Borrow output and extract Option<&Locale>
        let api_url = self.api_url(output.as_ref().and_then(|o| o.locale.as_ref()))?;
        let url = api_url.join("search")?;
        let mut params = Params::new();
        params.push(("code", String::from(barcodes)));
        if let Some(output_params) = output.map(|o| o.params(&["fields"])) {
            params.extend(output_params);
        }
        self.get(url, Some(&params))
    }
// TODO: V2 only ?
/// Search products by barcode.
///
/// # OFF API request
///
/// ```ignore
/// GET https://{locale}.openfoodfacts.org/api/v0/search
/// ```
///
/// See also `product_by_barcode()` above.
///
/// # Arguments
///
/// * `barcodes` - A string with comma-separated barcodes.
/// * output - Optional output parameters. This call only supports the locale
///     and fields parameters. TODO: Also pagination ?
///
V2 only .
Search products by barcode.
V2 only . Search products by barcode .
pub fn search_by_barcode(&self, barcodes: &str, output: Option<Output>) -> OffResult {
        // Borrow output and extract Option<&Locale>
        let api_url = self.api_url(output.as_ref().and_then(|o| o.locale.as_ref()))?;
        let url = api_url.join("search")?;
        let mut params = Params::new();
        params.push(("code", String::from(barcodes)));
        if let Some(output_params) = output.map(|o| o.params(&["fields"])) {
            params.extend(output_params);
        }
        self.get(url, Some(&params))
    }
pub fn search_by_barcode ( & self , barcodes : & str , output : Option < Output > ) -> OffResult { // Borrow output and extract Option<&Locale> let api_url = self . api_url ( output . as_ref ( ) . and_then ( | o | o . locale . as_ref ( ) ) ) ? ; let url = api_url . join ( " " ) ? ; let mut params = Params :: new ( ) ; params . push ( ( " " , String :: from ( barcodes ) ) ) ; if let Some ( output_params ) = output . map ( | o | o . params ( & [ " " ] ) ) { params . extend ( output_params ) ; } self . get ( url , Some ( & params ) ) }
TODO: V2 only ?
TODO : V2 only ?
&self
barcodes
&str
output
Option<Output>
&self
barcodes
&str
output
Option<Output>
off api request
```ignore
GET https://{locale}.openfoodfacts.org/api/v0/search
```

See also `product_by_barcode()` above.
` ` ` ignore GET https : // { locale } . openfoodfacts . org / api / v0 / search ` ` ` See also ` product_by_barcode () ` above .