Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pkg6/wxwork-finance.php
WeWorkFinanceSDK
https://github.com/pkg6/wxwork-finance.php
Last synced: 7 days ago
JSON representation
WeWorkFinanceSDK
- Host: GitHub
- URL: https://github.com/pkg6/wxwork-finance.php
- Owner: pkg6
- License: mit
- Created: 2024-01-03T14:46:43.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-09-11T13:51:48.000Z (2 months ago)
- Last Synced: 2024-10-11T16:11:14.268Z (about 1 month ago)
- Language: PHP
- Homepage: https://developer.work.weixin.qq.com/document/path/91774
- Size: 7.12 MB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 微信会话内容存档
## 要求
* 需要PHP扩展 ext-wxwork_finance_sdk 或者 ext-ffi,二选一
* ext-ffi PHP编译安装时 `—with-ffi`
* 容器 `docker pull zhiqiangwang/php:7.4-cli-wxwork-finance` && `docker pull zhiqiangwang/php:7.4-fpm-wxwork-finance`
* ext-wxwork_finance_sdk 安装详见: https://github.com/pangdahua/php7-wxwork-finance-sdk## 安装
~~~
composer require pkg6/wework-finance
~~~## 使用
```
## 企业配置
$corpConfig = [
'corpid' => "foo",
'secret' => "foo",
'private_keys' => [
"v1" => "foo",
],
];
## 包配置
$srcConfig = [
'default' => 'ext',
'providers' => [
'ext' => \Pkg6\WeWorkFinance\Provider\PHPExtProvider::class,
'ffi' => \Pkg6\WeWorkFinance\Provider\FFIProvider::class,
],
];## 1、实例化
$sdk = new \Pkg6\WeWorkFinance\SDK($corpConfig, $srcConfig);## 获取聊天记录
$chatData = $sdk->getDecryptChatData($seq, $limit);## 解析media
$medium = $sdk->getMediaData($sdkFileId, $ext)## 获取解密之后的聊天记录
$medium = $sdk->getDecryptChatData(int $seq, int $limit, int $retry = 0)
```# 感谢与相关链接
- https://github.com/pangdahua/php7-wxwork-finance-sdk
- https://developer.work.weixin.qq.com/document/path/91774