Skip to content

Commit ab56d27

Browse files
committed
New version 2.0 of the library. Pushing the V3 version to a separate branch and combining the 2 repositories for the PHP Open API client that are livep.
1 parent 6acef7d commit ab56d27

21 files changed

+1398
-822
lines changed

README.md

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,61 @@
1-
phpexamplecode
2-
==============
3-
If you want to contribute to this code sample. You can do a Fork and a Pull request on this repo.
1+
# bol.com OpenAPI PHP client #
42

5-
This application does the following requests:
6-
------------------------------------------
3+
Client library with example code for using the bol.com Open API Version 4. If you need a client/example for Version 3 of the Open API you can use https://github.com/devbolcom/bolcom-openapi-php-client/tree/bolcom-openapi-php-client-v3
4+
5+
If you want to contribute to this library. You can do a Fork and a Pull request on this repo.
6+
7+
## The library contains the following requests that are also included in the example script: ##
78
- Ping request
89
- Product request
9-
- Recommandation request
10-
- Listresults request
11-
- Searchresults request
10+
- Recommendation request
11+
- RelatedProducts request
12+
- Offer request
13+
- Lists request
14+
- Search request
15+
- Sessions request
1216
- Basket requests
17+
- Wishlist requests
18+
- setReferrer request (You need to ask extended permission from Developer Center team for this request)
19+
- Auth requests (You need to ask extended permission from Developer Center team for this request)
1320

14-
What are the files included:
15-
------------------------------
21+
## What are the files included: ##
22+
### Client ###
1623
- Request.php:
1724
- Setup connection with the server
18-
- Combining the String to sign digital
19-
- Hash based on HMAC-SHA256 (with Base64)
20-
- TestClient.php:
21-
- Example code todo a request (place the right URL and call the methods in Request.php)
22-
- App.php
25+
- Send session with header
26+
- Client.php:
27+
- Example code todo a request
28+
- Accessories.php, Basket.php, BasketItem.php, BasketItemProduct.php, Category, CategoryRefinement.php, Offers.php, Product.php, ProductFamilies.php and Product.php
29+
- Example classes for getting the objects
30+
31+
### Example ###
32+
- Example.php
2333
- Main class to run the application
24-
- Category.php, CategoryRefinement.php, Basket.php, BasketItem.php, BasketProduct.php and Product.php
25-
- Example classes for getting the Category, CategoryRefinement, Basket and Product object
26-
- Config.php
27-
- File to set the Key and Secret and other stuff
2834
- index.php
29-
- Call to the class "App" and a global function to load the classes
35+
- Call to the class "Example" with key, format and debug_mode and a global function to load the classes
3036

37+
## Minimum requirements: ##
38+
1. PHP 5.3.2 (or higher)
3139

32-
Minimum requirements:
33-
----------
34-
1. PHP 5.0 (or higher)
3540

41+
## Installation and running the example: ##
3642

37-
Installation and running the application:
38-
------------------------------------
39-
1. Get the code by forking or downloading the zip
43+
1. Get the code by forking or downloading the zip or installing Composer
4044
2. Upload all files (keep the directory structure) to a web-server
41-
3. Edit the file "config.php" to add the right AccessKeyID and SecretAccessKey (request this key and secret at https://developers.bol.com/inloggen/?action=register)
42-
4. Open the browser and call the URL where your index.php file is located
45+
3. Edit the example file "examples/Example.php" to add the right AccessKeyID (request this key at https://developers.bol.com/inloggen/?action=register), response format (xml/json) and debug mode bool (0/1)
46+
4. Open the browser and call the URL where your index.php file is located
47+
48+
## Developer Documentation ##
49+
http://developers.bol.com/documentatie/handleiding/
50+
51+
## Basic Example ##
52+
See the examples/ directory for examples of the key client features.
53+
```PHP
54+
<?php
55+
function __autoload($name) {
56+
require('/src/bolcom/' . $name . '.php');
57+
}
58+
$apiClient = new Client("YOUR_APP_KEY","RESPONSE_FORMAT","DEBUG_MODE");
59+
$response = $apiClient->getProduct('1002004010708531');
60+
var_dump($response);
61+
```

0 commit comments

Comments
 (0)