2017 © Pedro Peláez
 

library pca-predict-api

Client for interacting with the PCA Predict APIs

image

themarketinglab/pca-predict-api

Client for interacting with the PCA Predict APIs

  • Friday, December 16, 2016
  • by themarketinglab
  • Repository
  • 5 Watchers
  • 0 Stars
  • 139 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 9 % Grown

The README.md

PCA Predict (formerly PostCode Anywhere) PHP API

Services

It currently implements: - CapturePlus Interactive Find (v2.10) - CapturePlus Interactive Retrieve (v2.10), (*1)

Installation

The package is available on packagist.org, (*2)

composer require themarketinglab/pca-predict-api, (*3)

Usage

CapturePlus Interactive

<?php

use TheMarketingLab\PCA\CapturePlus\InteractiveFind\Client as FindClient;
use TheMarketingLab\PCA\CapturePlus\InteractiveRetrieve\Client as RetrieveClient;

$serviceKey = 'ABC';
$findClient = new FindClient(new \SoapClient('https://services.postcodeanywhere.co.uk/CapturePlus/Interactive/Find/v2.10/wsdlnew.ws'), $apiKey);

// All parameters are optional apart from search
$params = [
    'search' => 'London' // SearchTerm Required
    'filter' => 'PostalCodes' // SearchFor
    'country' => 'GBR' // Country
    'lang' => 'EN', // LanguagePreference
    'maxSuggestions' => 7 // MaxSuggestions,
    'maxResults' => 100 // MaxResults
];
// This returns an array containing TheMarketingLab\PCA\CapturePlus\InteractiveFind\Result objects
$results = $findClient->find($params);

// Get full address

$retrieveClient = new RetrieveClient(new \SoapClient("https://services.postcodeanywhere.co.uk/CapturePlus/Interactive/Retrieve/v2.10/wsdlnew.ws"), $apiKey);

// This returns an TheMarketingLab\PCA\CapturePlus\InteractiveRetrieve\Address object
$address = $retrieveClient->retrieve($results[0]);

The Versions

16/12 2016

dev-master

9999999-dev

Client for interacting with the PCA Predict APIs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Will Otterburn

16/12 2016

dev-develop

dev-develop

Client for interacting with the PCA Predict APIs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Will Otterburn

16/12 2016

v1.0.1

1.0.1.0

Client for interacting with the PCA Predict APIs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Will Otterburn