2017 © Pedro Peláez
 

library dutycalculator-php-sdk

DutyCalculator API PHP SDK

image

dutycalculator/dutycalculator-php-sdk

DutyCalculator API PHP SDK

  • Saturday, May 3, 2014
  • by DutyCalculator
  • Repository
  • 3 Watchers
  • 3 Stars
  • 1,163 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

DutyCalculator PHP SDK (v.1.0.0)

This repository contains the open source PHP SDK that allows you to access DutyCalculator from your PHP app. The SDK requires a DutyCalculator API account (go to http://www.dutycalculator.com/compare-plans/). Full documentation about DutyCalculator API you can find here., (*1)

Usage

The examples are a good place to start. The minimal you'll need to have is:, (*2)

require 'dutycalculator-php-sdk/src/dutycalculator.php';

$client = new DutyCalculator_Client('YOUR_API_KEY');

/*
 * Example of getting available import to countries
 */
$countriesTo = $client->getImportToCountries();
print_r($countriesTo->getAsArray());

All API calls have function representation in the client class. But you can make an API call using next code:, (*3)

try
{
    $countriesFrom = $client->sendRequest('supported-countries/from', array('display_alpha2_code' => true));
}
catch (DutyCalculator_Exception $e)
{
    error_log($e);
    $countriesFrom = null;
}

With Composer:, (*4)

  • Add the "dutycalculator/dutycalculator-php-sdk": "@stable" into the require section of your composer.json.
  • Run composer install.
  • The example will look like
$client = new DutyCalculator_Client('YOUR_API_KEY');

/*
 * Example of getting available import to countries
 */
$countriesTo = $client->getImportToCountries();

Report Issues/Bugs

Bugs, (*5)

The Versions

03/05 2014

dev-master

9999999-dev https://github.com/dutycalculator/dutycalculator-php-sdk

DutyCalculator API PHP SDK

  Sources   Download

Apache2

The Requires

  • php >=5.2.0
  • ext-curl *
  • ext-json *

 

api php sdk dutycalculator

15/04 2014

dev-GET_URI

dev-GET_URI https://github.com/dutycalculator/dutycalculator-php-sdk

DutyCalculator API PHP SDK

  Sources   Download

Apache2

The Requires

  • php >=5.2.0
  • ext-curl *
  • ext-json *

 

api php sdk dutycalculator

30/01 2014

1.0.0

1.0.0.0 https://github.com/dutycalculator/dutycalculator-php-sdk

DutyCalculator API PHP SDK

  Sources   Download

Apache2

The Requires

  • php >=5.2.0
  • ext-curl *
  • ext-json *

 

api php sdk dutycalculator