ambition/aliopenapi

dev-master 2022-12-05 08:09 UTC

This package is not auto-updated.

Last update: 2024-05-19 16:35:36 UTC


README

composer 安装命令

composer require ambition/aliopenapi
<?php

use Alibaba\OpenApi\AliOpenApi;

require_once 'vendor/autoload.php';
$param = [
    'groupId'=>241,
    'pageNo'=>1,
    'pageSize'=>20,
    'feedId'=>'',
    'title'=>'',
];
$obj = new AliOpenApi($param);
$obj->setAppkey('123456');
$obj->setAppsecret('ddee2112');
$obj->setAccessToken('721334528-581f-4508-98uy-a646a1hy65fa');
try {
    $res = $obj->goods->listCybUserGroupFeed()->get();
    echo json_encode($res);
} catch (Exception $e) {
    echo json_encode(['code'=>400,'msg'=>$e->getMessage()]);
}


引入很简单composer 安装后调用就可以