miralsoft/weclapp-customer-export
Composer 安装命令:
composer require miralsoft/weclapp-customer-export
包简介
Exporter for customers from weclapp.
README 文档
README
Export customers from weclapp with the weclapp PHP api.
How to use
You can download the Package over composer with following line in composer File:
"require": {
"php": ">=7.4.0",
"miralsoft/weclapp-api": "v1.*",
"miralsoft/doctrine-extensions": "dev-master",
"miralsoft/weclapp-customer-export": "v1.*"
}
Configuration
The configuration have to been set in your PHP-Project. You must define 2 constants like this:
use miralsoft\weclapp\api\Config;
Config::$URI = 'https://xxx.weclapp.com/webapp/api/v1/';
Config::$TOKEN = 'xxx';
Replace the xxx with your own data.
Call the export
With following code you can call the export:
$export = new Export();
$csvData = $export->exportDatevOnline();
Here you get the array for the csv file.
$export = new Export(true);
$csvData = $export->exportDatevOnline();
Here it will be created a csv file in your actual path with the filename 'datevExport.csv'.
$export = new Export(true, 'export', 'filename.csv');
$csvData = $export->exportDatevOnline();
Here a file will be created in the folder export with the name 'filename.csv'.
Full example
To get a list of customers, here is a example:
require_once '../../vendor/autoload.php';
use miralsoft\weclapp\api\Config;
use miralsoft\weclapp\customerexport\Export;
Config::$URI = 'https://xxx.weclapp.com/webapp/api/v1/';
Config::$TOKEN = 'xxx';
$export = new Export(true, '', 'datevExport.csv');
$ok = $export->exportDatevOnline();
echo $ok ? 'File successfull created' : 'Error while export';
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2022-01-13