Giter Site home page Giter Site logo

ekomiapibundle's Introduction

YproximiteEkomiApiBundle

Integration of the eKomi API client library into Symfony3.

Installation

Require yproximite/ekomi-api-bundle to your composer.json file:

$ composer require yproximite/ekomi-api-bundle

Register the bundle in app/AppKernel.php:

// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Yproximite\Bundle\EkomiApiBundle\YproximiteEkomiApiBundle(),
    );
}

Enable the bundle's configuration in app/config/config.yml:

# app/config/config.yml
yproximite_ekomi_api:

    # Identifier of the service that represents "Http\Client\HttpClient"
    http_client: httplug.client.guzzle6

    # Credentials
    client_id: 999999
    secret_key: xxxxxxxxxxxxxx

    # Base url for the API, optional, by default is "https://csv.ekomi.com/api/3.0"
    base_url: https://csv.ekomi.com/api/3.0

    # cache
    cache: cache.app
    cache_key: xxxxx

Usage

use Yproximite\Ekomi\Api\Message\Order\OrderListMessage;

$api = $this->get('yproximite.ekomi_api.service_aggregator');

$message = new OrderListMessage();
$message->setOffset(5);
$message->setLimit(10);
$message->setOrderBy(OrderListMessage::ORDER_BY_CREATED);
$message->setOrderDirection(OrderListMessage::ORDER_DIRECTION_DESC);
$message->setWithFeedbackOnly(true);
$message->setCreatedFrom(new \DateTime('2016-10-06 00:00:10'));
$message->setCreatedTill(new \DateTime('2016-11-06 00:14:29'));
$message->setShopId(11);
$message->setCustomDataFilter(['vendor_id' => 123]);

// Yproximite\Ekomi\Api\Model\Order\Order[]
$orders = $api->order()->getOrders($message);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.