reiterus/informer-magento
Composer 安装命令:
composer require reiterus/informer-magento
包简介
Get Magento 2 store information from REST API endpoints
README 文档
README
Get information about your Magento 2 store using GET requests to REST API endpoints.
The module is developed for Magento version 2.4.3
Usage
Endpoints
- basic info:
/rest/V1/reiterus/informer - detail info:
/rest/V1/reiterus/informer/detail
Responses
Basic information for an anonymous user
{
"version": "2.4.3",
"locale": "en_US",
"timezone": "America\/Chicago",
"currency": "USD"
}
The list of detailed information is formed at your discretion, it may look like this.
[
{
"lifetime_sales": "29.00",
"average_order": "14.50",
"orders_number": "2",
"customers_number": "1",
"admins_number": "3",
"extended_data": "from main application"
}
]
Set detail info
To generate a set of extended data for detailed information,
you can use the plugin from the "example" directory.
Don't forget to include the following information in your di.xml file.
<type name="Reiterus\Informer\Model\Informer"> <plugin name="reiterus_fill_detail_info" type="Vendor\Module\Plugin\InformerBefore" /> </type>
Endpoint testing
To check the functionality of endpoints via PhpStorm, you can use files from the request directory:
- base.http: get minimal base information
- detail.http: get detailed information you need
- token.http: get admin token
See more in the "request" folder.
Installation
You can install the package in two ways
From packagist.org
composer require reiterus/informer-magento
From GitHub repository
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/reiterus/informer-magento.git"
}
]
}
License
This library is released under the MIT license.
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-05