From f6789460fb9a1f58c6ea80d5c1c3b6deaa3e8c85 Mon Sep 17 00:00:00 2001 From: Casper Bakker Date: Fri, 13 Nov 2015 09:36:28 +0100 Subject: [PATCH] Moved to PSR-4 and example in readme --- .gitignore | 2 +- README.md | 17 ++++++++++++++++- composer.json | 4 ++-- examples/addProduct.php | 2 +- examples/getOrders.php | 2 +- examples/getProducts.php | 2 +- src/{Picqer/Api => }/Client.php | 2 +- 7 files changed, 23 insertions(+), 8 deletions(-) rename src/{Picqer/Api => }/Client.php (99%) diff --git a/.gitignore b/.gitignore index f2f654f..880a162 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ .idea composer.lock composer.phar -vendor/* \ No newline at end of file +vendor \ No newline at end of file diff --git a/README.md b/README.md index 42e541d..8b77d9d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,22 @@ This project can easily be installed through Composer. composer require picqer/api-client ``` -## Examples +## Example: Get orders +```php +getOrders(); +var_dump($orders); +``` + +## More examples Review the examples in the examples/ folder. ## Support diff --git a/composer.json b/composer.json index 765b4e6..2813ae7 100644 --- a/composer.json +++ b/composer.json @@ -21,8 +21,8 @@ "ext-curl": "*" }, "autoload": { - "psr-0": { - "Picqer": "src" + "psr-4": { + "Picqer\\Api\\": "src" } } } \ No newline at end of file diff --git a/examples/addProduct.php b/examples/addProduct.php index 59aab82..3696f04 100644 --- a/examples/addProduct.php +++ b/examples/addProduct.php @@ -1,6 +1,6 @@ + * @author Casper Bakker * @license http://creativecommons.org/licenses/MIT/ MIT */