2017 © Pedro Peláez
 

library startupthreads-api-php

Client library for the StartupThreads API.

image

startupthreads/startupthreads-api-php

Client library for the StartupThreads API.

  • Thursday, May 14, 2015
  • by MDarnell
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,409 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 5 % Grown

The README.md

Startup Threds API

Very simple and easy StartupThreads API wrapper, for PHP., (*1)

Complex wrappers are for noobs. This lets you access the StartupThreads API using the docs as directly as possible., (*2)

Requires PHP 5.3., (*3)

Installation

You can install the startupthreads-api-php using Composer. Just add the following to your composer.json:, (*4)

{
    "require": {
        "startupthreads/startupthreads-api-php": "dev-master"
    }
}

You will then need to: * run composer install to get these dependencies added to your vendor directory * add the Composer autoloader to your application with this line: require("vendor/autoload.php"), (*5)

Examples

List items (/items.json method)

$st = new StartupThreads('api-token-here');
print_r($st->get('items.json'));

Create an Inventory Shipment (/inventory_shipments method)

$st = new StartupThreads('api-token-here');
$result = $st->create('/inventory_shipments', array(
    'inventory_shipment' => array(
        payment_method'     =>  "account_balance",
        'test_mode'         =>  1
        'line_items' => array(
            array (
                "item_id"   =>  "dfsea4rs",
                "size"      =>  "MS",
                "quantity"  =>  3
            )
        ),
        'address' => array (
            "name"          =>  "Frank Denbow",
            "street1"       =>  "902 Broadway",
            "city"          =>  "New York",
            "state"         =>  "New York",
            "zip"           =>  "10010",
            "country"       =>  "US"
        )
    );
));
print_r($result);

The Versions

14/05 2015

dev-master

9999999-dev https://github.com/MDarnell/startupthreads-api-php

Client library for the StartupThreads API.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Matthew Darnell