modules/acm/src/Connector/APIWrapper.php
public function getProductPosition($category_id) {
    $endpoint = $this->apiVersion . "/agent/category/$category_id/position";

    $doReq = function ($client, $opt) use ($endpoint) {
      return ($client->get($endpoint, $opt));
    };

    $result = [];

    try {
      $result = $this->tryAgentRequest($doReq, 'productPosition', 'position');
    }
    catch (ConnectorException $e) {
      throw new \Exception($e->getMessage(), $e->getCode());
    }

    return $result;
  }
public function getProductPosition($category_id) {
    $endpoint = $this->apiVersion . "/agent/category/$category_id/position";

    $doReq = function ($client, $opt) use ($endpoint) {
      return ($client->get($endpoint, $opt));
    };

    $result = [];

    try {
      $result = $this->tryAgentRequest($doReq, 'productPosition', 'position');
    }
    catch (ConnectorException $e) {
      throw new \Exception($e->getMessage(), $e->getCode());
    }

    return $result;
  }
public function getProductPosition ( $ category_id ) { $ endpoint = $ this -> apiVersion . "/agent/category/$category_id/position" ; $ doReq = function ( $ client , $ opt ) use ( $ endpoint ) { return ( $ client -> get ( $ endpoint , $ opt ) ) ; } ; $ result = [ ] ; try { $ result = $ this -> tryAgentRequest ( $ doReq , 'productPosition' , 'position' ) ; } catch ( ConnectorException $ e ) { throw new \ Exception ( $ e -> getMessage ( ) , $ e -> getCode ( ) ) ; } return $ result ; }
Get position of the products in a category.

@param int $category_id
The category id.

@return array
All products with the positions in the given category.

@throws \Exception
Get position of the products in a category .