zuragan/lazada-api-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zuragan/lazada-api-php

Composer 安装命令:

composer require zuragan/lazada-api-php

包简介

Lazada Seller API wrapper

README 文档

README

Unofficial PHP Wrapper for Lazada API

Overview

  • Wraps Lazada API in PHP according to example shown here
  • For complete API reference, including how to obtain API key, please go to the official documentation

Installation

~$ composer require zuragan/lazada-api-php

Example Usage

  • GET
//Create API instance
$api = new LazadaAPI($baseUrl);

//Create action using factory, get or post action is supported
$factory = new ActionFactory($userEmail, $userAPIKey);
$action = $factory->getAction('ActionName', [ 'Parameter' => 'ParamValue' ]);

//Execute API Command
$response = $api->get($action);

//debug: dump response
var_dump($response);
  • POST
//Create API instance
$api = new LazadaAPI($baseUrl);

//Create action using factory, get or post action is supported
$factory = new ActionFactory($userEmail, $userAPIKey);
$payload = [
    "Attributes" => [
        "name" => "Example",
        "description" => "Short description",
    ],
];
$action = $factory->postAction('ActionName', [ 'Parameter' => 'ParamValue' ], $payload);

//Execute API Command
$response = $api->post($action);

//debug: dump response
var_dump($response);

Known Limitation(s)

  • Due to PHP array limitation used in post payload when converting to XML format, multiple child element with same name cannot be generated (because PHP array keys must be unique)

Disclaimer

  • This is not an official SDK from Lazada
  • This library may be changed without notice to keep it updated with Lazada's API
  • This library is provided as is, without any warranty and can be broken anytime Lazada create breaking changes in their API.

Contributing

  • Error reporting/issues
    • Use Github's issue tracker
  • Code contribution
    • Fork this repository
    • Create pull request

License

  • MIT

统计信息

  • 总下载量: 479
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固