PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Dmitry Mamontov  >  Gollos Rest API Client  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Gollos Rest API Client
Manage e-commerce operations using the Gollos API
Author: By
Last change: Update of README.md
Date: 1 month ago
Size: 2,180 bytes
 

Contents

Class file image Download

Latest Stable Version License Total Downloads

Gollos Rest API Client

This class can eanage e-commerce operations using the Gollos API.

It can send HTTP requests to the Gollos API Web server to perform several types of operations with customers, vendors, products, orders, etc..

Currently it can retrieve, add, update and delete products, groups, customers, vendors, products and orders.

Requirements

  • PHP version >5.0
  • curl

Available methods

  • `getProducts`, `addProducts`, `updateProducts`, `removeProducts`
  • `getGroups`, `addGroups`, `updateGroups`, `removeGroups`
  • `getVendors`, `addVendors`, `updateVendors`, `removeVendors`
  • `getCustomers`, `addCustomers`, `updateCustomers`, `removeCustomers`
  • `getOrders`, `removeOrders`

Installation

1) Install composer

2) Follow in the project folder:

composer require dmamontov/gollos-restapi ~1.0.0

In config composer.json your project will be added to the library dmamontov/gollos-restapi, who settled in the folder vendor/. In the absence of a config file or folder with vendors they will be created.

If before your project is not used composer, connect the startup file vendors. To do this, enter the code in the project:

require 'path/to/vendor/autoload.php';

Examples of use

Getting information about the order

$gollos = new GollosRestApi($key, $secretKey);
$order = $gollos->getOrders(array('id' => 25648));

Creating a client

$gollos = new GollosRestApi($key, $secretKey);
$customer = array(
    'first_name' => 'Test',
    'last_name'  => 'Test',
    'username' => 'dtest',
    'password' => uniqid(),
    'ip' => '85.198.127.82'
);
$result = $gollos->addCustomers($customer);
For more information send a message to info at phpclasses dot org.