Skip to content

Commit

Permalink
fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Jan 29, 2019
1 parent 9e8b773 commit 0ac9c8f
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ https://www.ean-search.org/ean-database-api.html

## Initialization
```php
// your access token from ean-search.org
$accessToken = 'abcdef';
// your access token from ean-search.org
$accessToken = 'abcdef';

$eanSearch = new EANSearch($accessToken);
$eanSearch = new EANSearch($accessToken);
```

## Usage
```php
$ean = '5099750442227';
$name = $eanSearch->barcodeLookup($ean);
echo "$ean is $name\n";

$ok = $eanSearch->verifyChecksum($ean);
echo "$ean is " . ($ok ? 'valid' : 'invalid') . "\n";

$eanList = $eanSearch->productSearch('iPod');
foreach ($eanList as $product) {
echo "$product->ean is $product->name\n";
}

$eanList = $eanSearch->barcodePrefixSearch(4007249146);
foreach ($eanList as $product) {
echo "$product->ean is $product->name\n";
}
$ean = '5099750442227';
name = $eanSearch->barcodeLookup($ean);
echo "$ean is $name\n";

$ok = $eanSearch->verifyChecksum($ean);
echo "$ean is " . ($ok ? 'valid' : 'invalid') . "\n";

$eanList = $eanSearch->productSearch('iPod');
foreach ($eanList as $product) {
echo "$product->ean is $product->name\n";
}

$eanList = $eanSearch->barcodePrefixSearch(4007249146);
foreach ($eanList as $product) {
echo "$product->ean is $product->name\n";
}
```

0 comments on commit 0ac9c8f

Please sign in to comment.