2017 © Pedro Peláez
 

library ace-store

Retrieves information about Ace Hardware stores

image

footsteps-marketing/ace-store

Retrieves information about Ace Hardware stores

  • Monday, November 21, 2016
  • by ahipple
  • Repository
  • 5 Watchers
  • 1 Stars
  • 797 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 2 % Grown

The README.md

ace-store

Get store info from ACE's store locator API. Supports some neat things., (*1)

usage

Install using composer:, (*2)

composer require footsteps-marketing/ace-store

Then use it in your project, (*3)

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

$storeNumber = 1234;
$store = new FootstepsMarketing\Ace\Store($storeNumber);
echo $store->getLocationName();

requirements

  • PHP >=5.6

caching

Caching of Ace store responses can be accomplished in two ways:, (*4)

define('FSM_ACE_CACHE_FOLDER', '/path/to/cache');
$store = new FootstepsMarketing\Ace\Store(1234);

// or

$store = new FootstepsMarketing\Ace\Store(1234, '/path/to/cache');

Cache lifetime defaults to one week -- it can be modified by setting the constant FSM_ACE_CACHE_LIFETIME, (*5)

define('FSM_ACE_CACHE_LIFETIME', 1 * 24 * 60 * 60); // Desired lifetime in seconds
define('FSM_ACE_CACHE_FOLDER', '/path/to/cache');
$store = new FootstepsMarketing\Ace\Store(1234);

The Ace store response will be stored in the Ace cache folder as <storenumber>.json, (*6)

configuration

Configuration can be stored in YAML format at the location set using the constant FSM_ACE_CONFIG_PATH, (*7)

config.yaml

map:
  exclusive: true               # Return only values with valid mappings?
  departments:                  # 'Original Value': 'New Value'
    'Automotive': 'Auto'
    'Clothing': 'Apparel'
    'Gas Stoves': 'Stoves'
  services:
    'Blade Sharpening': 'Knife Sharpening'
    'Chain Saw Sharpening': 'Chainsaw Sharpening'
    'Gift Card': 'Gift Cards'
    'Special Order 65,000+ items': 'Special Order Services'
  brands:
    'Webber Grills': 'Weber Grills'

PHP

define('FSM_ACE_CONFIG_PATH', '/path/to/config.yaml');
$store = new FootstepsMarketing\Ace\Store(1234);

$brands = $store->getServices(); // This will return values based on the mapping above

The Versions

21/11 2016

dev-master

9999999-dev

Retrieves information about Ace Hardware stores

  Sources   Download

GPLv3

The Requires

 

18/11 2016

0.5.2

0.5.2.0

Retrieves information about Ace Hardware stores

  Sources   Download

GPLv3

The Requires

 

14/10 2016

0.5.1

0.5.1.0

Retrieves information about Ace Hardware stores

  Sources   Download

GPLv3

The Requires

 

12/10 2016

0.5.0

0.5.0.0

Retrieves information about Ace Hardware stores

  Sources   Download

GPLv3

The Requires

 

12/10 2016

0.4.0

0.4.0.0

Retrieves information about Ace Hardware stores

  Sources   Download

GPLv3

The Requires

 

04/10 2016

0.3.0

0.3.0.0

Retrieves information about Ace Hardware stores

  Sources   Download

GPLv3

The Requires

 

20/04 2016

0.2.0

0.2.0.0

Retrieves information about Ace Hardware stores

  Sources   Download

GPLv3

The Requires

 

20/04 2016

0.2.1

0.2.1.0

Retrieves information about Ace Hardware stores

  Sources   Download

GPLv3

The Requires