定制 gadoma/walmart-api-php-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

gadoma/walmart-api-php-client

Composer 安装命令:

composer require gadoma/walmart-api-php-client

包简介

Walmart Open API PHP client

README 文档

README

GitHub license Travis build status Coveralls test coverage SensioLabsInsight grade Packagist Packagist

Introduction

Welcome to the Walmart Open API PHP Client, a Composer package for interacting with the Walmart Open API.

This library is powered by Guzzle 6 thus requires PHP >= 5.5.0 to work.

Extensive PHPUnit tests are provided, the builds are handled by Travis-CI and test code coverage is calculated by Coveralls.io.

Contributing

If you notice any bugs or have an idea for improvements, feel free to submit a ticket to the project Issue Tracker.

Pull requests are welcome, just remember to submit them to the develop branch. Any PRs to the master branch will be rejected.

Installation

Composer

If you don't have Composer already available on your local system, install it first:

curl -sS https://getcomposer.org/installer | php

Manual installation

Create a composer.json file and add an entry in the "require" section:

{
    "require": {
        "gadoma/walmart-api-php-client": "^1.0"
    }
}

Run the below command afterwards:

php composer.phar install

Composer installation

Alternatively to the above method you can just run the following:

php composer.phar require gadoma/walmart-api-php-client:^1.0

Usage

Walmart API key

In order to use the Walmart Open API you need to obtain an API key. You can get it by registering a Walmart developer account.

Basic usage

// composer autoload
require 'vendor/autoload.php';

//API credentials
$apiKey = 'yourWalmartApiKey';

//Basic components used by the Services
$httpClient        = new \GuzzleHttp\Client();
$errorHandler      = new \WalmartApiClient\Exception\Handler\ApiExceptionHandler();
$transportService  = new \WalmartApiClient\Http\TransportService($httpClient, $errorHandler, $apiUrl);
$entityFactory     = new \WalmartApiClient\Factory\EntityFactory();
$collectionFactory = new \WalmartApiClient\Factory\CollectionFactory();

//Actual Services you will use for interacting with the API
$productService  = new \WalmartApiClient\Service\ProductService($transportService, $entityFactory, $collectionFactory);
$offerService    = new \WalmartApiClient\Service\OfferService($transportService, $entityFactory, $collectionFactory);
$reviewService   = new \WalmartApiClient\Service\ReviewService($transportService, $entityFactory, $collectionFactory);
$taxonomyService = new \WalmartApiClient\Service\TaxonomyService($transportService, $entityFactory, $collectionFactory);

LinkShare Publisher Id

It is possible to provide your LinkShare Publisher Id for URL tracking/attribution purposes. It is optional and you can read more about this subject on Walmart Affiliates website. To use your LinkShare Publisher Id with this library, just pass it to TransportService constructor in the process of creating the basic components, like shown below:

$apiKey = 'yourWalmartApiKey';
$linkSharePublisherId = 'yourId';

$httpClient        = new \GuzzleHttp\Client();
$errorHandler      = new \WalmartApiClient\Exception\Handler\ApiExceptionHandler();
$transportService  = new \WalmartApiClient\Http\TransportService($httpClient, $errorHandler, $apiUrl, $linkSharePublisherId);

Features

Each of the available Services is a wrapper for one or more Walmart Open API services. The available methods' declarations and descriptions can be found in the Service interfaces. Each of the methods returns either a single specific Entity (e.g. Product) or a Collection of Entities (e.g. Categories Collection).

Product service

Integrates with

Available methods

  • getById
  • getByUpc
  • getByIds
  • getBySearch
  • getAllBySearch
  • getPostbrowsedById
  • getRecommendedById
  • getTrending

Offer service

Integrates with

Available methods

  • getVod
  • getPreorder
  • getBestsellers
  • getRollback
  • getClearance
  • getSpecialbuy

Review service

Integrates with

Available methods

  • getReviews

Store service

Integrates with

Available methods

  • getStoresByCoordinates
  • getStoresByCity
  • getStoresByZip

Taxonomy service

Integrates with

Available methods

  • getCategories

gadoma/walmart-api-php-client 适用场景与选型建议

gadoma/walmart-api-php-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 28k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2016 年 04 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「api」 「client」 「walmart」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 gadoma/walmart-api-php-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 gadoma/walmart-api-php-client 我们能提供哪些服务?
定制开发 / 二次开发

基于 gadoma/walmart-api-php-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 28k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 4
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-11