Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
docs: add sample product
Browse files Browse the repository at this point in the history
  • Loading branch information
bradietilley committed Oct 12, 2022
1 parent 0e11732 commit 54770cc
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ $details = $tesco->find('301511619');
echo $details->unitPrice->format(); // £1.82/100g
```

## Sample

View a sample product [here][sample-product].

## Change log

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
Expand Down Expand Up @@ -83,3 +87,5 @@ Read more about Treeware at [treeware.earth][link-treeware].
[link-author]: https://github.com/owenvoke
[link-author2]: https://github.com/bradietilley
[link-contributors]: ../../contributors

[sample-product]: ./docs/SAMPLE_PRODUCT.md
61 changes: 61 additions & 0 deletions docs/SAMPLE_PRODUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Sample Product

```
ProductTrap\DTOs\Product {
+identifier: "301511619"
+status: ProductTrap\Enums\Status {
+name: "Available"
+value: "available"
}
+sku: "301511619"
+gtin: "00000050171248"
+name: "John West No Drain Tuna Steak In Oil Fridge Pot 110G"
+description: "Tuna Steak with a little Sunflower Oil.; 100% Traceable; Track Your Can john-west.co.uk"
+url: "https://tesco.com/groceries/en-GB/products/301511619"
+ingredients: "Tuna (93%); Sunflower Oil; Salt"
+price: ProductTrap\DTOs\Price {
+amount: 2.0
+wasAmount: null
+saleName: null
+currency: ProductTrap\Enums\Currency {
+name: "GBP"
+value: "GBP"
}
}
+unitAmount: ProductTrap\DTOs\UnitAmount {
+unit: ProductTrap\Enums\Unit {
+name: "GRAM"
+value: "g"
}
+amount: 100.0
}
+unitPrice: ProductTrap\DTOs\UnitPrice {
+unitAmount: ProductTrap\DTOs\UnitAmount {
+unit: ProductTrap\Enums\Unit {
+name: "KILOGRAM"
+value: "kg"
}
+amount: 1.0
}
+price: ProductTrap\DTOs\Price {
+amount: 20.0
+wasAmount: null
+saleName: null
+currency: null
}
}
+brand: ProductTrap\DTOs\Brand {
+identifier: "JOHN WEST"
+name: "JOHN WEST"
+url: null
}
+images: array:1 [
0 => "https://digitalcontent.api.tesco.com/v2/media/ghs/80791ac3-a2ab-4db9-88da-01631a6eaef9/d7fcce24-d9fc-4747-923c-9bddb8b3b94a_1749225173.jpeg?h=225&w=225"
]
+categories: []
+raw: array:1 [
"html" => "/* HTML OF PAGE HERE */"
]
}
```

0 comments on commit 54770cc

Please sign in to comment.