2017 © Pedro Peláez
 

library flagship-rest-client

A php library to access FlagShip Rest Api

image

flagshipcompany/flagship-rest-client

A php library to access FlagShip Rest Api

  • Wednesday, June 7, 2017
  • by patrick-fls
  • Repository
  • 8 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 33 % Grown

The README.md

FlagShip REST Client Build Status

Latest Stable Version, (*1)

Small PHP Client to help use the FlagShip API, (*2)

License: MIT

Instruction

Please read https://docs.smartship.io/ before starting using this library. All available endpoints are found in the API docs., (*3)

Install

composer require flagshipcompany/flagship-rest-client

Usage:

<?php

require_once './vendor/autoload.php';

use Flagship\Api\Client;

$client = new Client('MY_FLAGSHIP_ACCESS_TOKEN');

// example rate request
// @see https://docs.smartship.io/#shipping
//
$response = $client->post('/ship/rates', [
    'from' => [
        // ...
    ],
    'to' => [
        // ...
    ],
    'packages' => [
        // ...
    ],
    // ...
]);

if (200 == $response->getStatusCode()) {
    var_dump($response->getContent());
}

Testing endpoints:

  1. Your production api access token WILL NOT work for any testing api endpoints.
  2. You MUST request a testing access token via FlagShip support developers@flagshipcompany.com
// use testing api
$client = new Client('MY_FLAGSHIP_TEST_ACCESS_TOKEN', 'https://test-api.smartship.io');

The Versions

07/06 2017

dev-master

9999999-dev

A php library to access FlagShip Rest Api

  Sources   Download

MIT

The Requires

  • php >=7.0.8
  • ext-curl *

 

The Development Requires

by yi-FLS

rest client flagshipcompany

08/02 2017

dev-1.0.x-dev

dev-1.0.x-dev

A php library to access FlagShip Rest Api

  Sources   Download

MIT

The Requires

  • php >=7.0.8
  • ext-curl *

 

The Development Requires

by yi-FLS

rest client flagshipcompany

07/02 2017

1.0.0

1.0.0.0

A php library to access FlagShip Rest Api

  Sources   Download

MIT

The Requires

  • php >=7.0.8
  • ext-curl *

 

The Development Requires

by yi-FLS

rest client flagshipcompany