Skip to content

Commit 1aeb2ac

Browse files
authored
Merge pull request #2 from progcode/develop
README
2 parents 03ee43b + ab6bd56 commit 1aeb2ac

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Icecat
2+
======
3+
4+
Icecat is a PHP library, that assists you in the following 2 procedures:
5+
* Fetching data from the Icecat database using basic product information.
6+
* Parsing this data from the Icecat response, and using them in real life applications.
7+
8+
### About Icecat
9+
[Icecat](http://icecat.biz, "Icecat") is an open catalog, providing free access to thousands of product datasheets.
10+
In extend, when taking a subscription, the amount of accessible datasheets are increased.
11+
12+
There is a list of [Icecat sponsor brands](http://icecat.co.uk/en/menu/partners/index.html, "Icecat sponsor brands").
13+
14+
15+
Installation
16+
============
17+
18+
The library can be installed using composer:
19+
20+
```
21+
"progcode/icecat-api": "dev-master"
22+
```
23+
24+
Usage
25+
=====
26+
27+
The class library is, in it's current state easy to be used.
28+
29+
### Result
30+
31+
The [Icecat class](https://github.com/progcode/icecat-api/blob/master/src/Icecat/Api.php) is responsible for parsing the data. It includes a few basic methods, but you can easily create your
32+
own implementation by implementing the IcecatInterface interface.
33+
34+
```php
35+
// Use the class.
36+
use Src\Icecat\Api;
37+
38+
$icecat = new Api(getenv('ICEACAT_USER'), getenv('ICEACAT_PASS'));
39+
$xml = $icecat->getArticleByMPN('Hewlett Packard Enterprise', '838079-B21', 'HU');
40+
$productDataArray = $icecat->xml2array($xml);
41+
42+
$productData = $icecat->getProductData($productDataArray);
43+
44+
```
45+
46+
Demo is soon available.

0 commit comments

Comments
 (0)