https://github.com/webgriffe/amp-magento
Magento REST Api wrapper to use with Amp PHP framework.
https://github.com/webgriffe/amp-magento
Last synced: about 1 year ago
JSON representation
Magento REST Api wrapper to use with Amp PHP framework.
- Host: GitHub
- URL: https://github.com/webgriffe/amp-magento
- Owner: webgriffe
- Created: 2019-06-06T08:57:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-01-10T17:11:36.000Z (over 1 year ago)
- Last Synced: 2025-01-10T17:42:01.537Z (over 1 year ago)
- Language: PHP
- Size: 170 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-amphp - webgriffe/amp-magento - Magento REST Api wrapper (Magento / Tunnel)
README
# AMP Magento Library
[](https://travis-ci.org/webgriffe/amp-magento)
Magento REST Api wrapper to use with [Amp](https://amphp.org/) PHP framework.
## Installation
Require this package using [Composer](https://getcomposer.org/):
composer require webgriffe/amp-magento
## Usage
ApiClient is the main class of this library: it contains methods that wrap Magento REST API.
```php
'http://magento.base.url',
'username' => 'magento-username',
'password' => 'magento-password'
]
);
$order = \Amp\Promise\wait($client->getOrder(1));
var_dump($order);
```
## In Memory Magento
The folder InMemoryMagento contains a fake Magento server and client to be used for automated testing.
Unit tests in tests/ApiClientTest.php show how to use InMemoryMagento.
Contributing
------------
To contribute simply fork this repository, do your changes and then propose a pull requests.
You should run coding standards check and tests as well:
```bash
vendor/bin/phpcs --standard=PSR2 src
vendor/bin/phpunit
```
License
-------
This library is under the MIT license. See the complete license in the LICENSE file.
Credits
-------
Developed by [Webgriffe®](http://www.webgriffe.com/)