2017 © Pedro Peláez
 

library walmart-api-php-client

Walmart Open API PHP client

image

zacherystuart/walmart-api-php-client

Walmart Open API PHP client

  • Saturday, August 12, 2017
  • by stwz.app
  • Repository
  • 1 Watchers
  • 0 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Walmart Open API PHP client

GitHub license Travis build status Coveralls test coverage SensioLabsInsight grade Packagist Packagist, (*1)

Introduction

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

This library is powered by Guzzle 6 thus requires PHP >= 5.5.0 to work., (*3)

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

Contributing

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

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

Installation

Composer

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

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

Manual installation

Create a composer.json file and add an entry in the "require" section:, (*8)

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

Run the below command afterwards:, (*9)

php composer.phar install

Composer installation

Alternatively to the above method you can just run the following:, (*10)

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., (*11)

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:, (*12)

$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)., (*13)

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

The Versions

12/08 2017

dev-master

9999999-dev

Walmart Open API PHP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zachery Stuart

api client walmart

12/08 2017

1.0.4

1.0.4.0

Walmart Open API PHP client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zachery Stuart

api client walmart

26/04 2017

dev-patch-1

dev-patch-1

Walmart Open API PHP client

  Sources   Download

MIT

The Requires

 

The Development Requires

api client walmart

24/04 2017

1.0.3

1.0.3.0

Walmart Open API PHP client

  Sources   Download

MIT

The Requires

 

The Development Requires

api client walmart

24/04 2017

dev-develop

dev-develop

Walmart Open API PHP client

  Sources   Download

MIT

The Requires

 

The Development Requires

api client walmart

21/04 2016

1.0.2

1.0.2.0

Walmart Open API PHP client

  Sources   Download

MIT

The Requires

 

The Development Requires

api client walmart

11/04 2016

1.0.1

1.0.1.0

Walmart Open API PHP client

  Sources   Download

MIT

The Requires

 

The Development Requires

api client walmart

11/04 2016

1.0.0

1.0.0.0

Walmart Open API PHP client

  Sources   Download

MIT

The Requires

 

The Development Requires

api client walmart