src/LearnositySdk/Request/DataApi.php
public function request($endpoint, $securityPacket, $secret, /* FIXME: array */ $requestPacket = [], $action = null)
    {
        if (!is_array($requestPacket)) {
            Init::warnDeprecated(
                __CLASS__ . '::' . __FUNCTION__ . ':'
                . ' $requestPacket should be a PHP array.'
            );
        }

        $init = new Init('data', $securityPacket, $secret, $requestPacket, $action);
        $params = $init->generate();
        return $this->remote->post($endpoint, $params, $this->remoteOptions);
    }
public function request($endpoint, $securityPacket, $secret, /* FIXME: array */ $requestPacket = [], $action = null)
    {
        if (!is_array($requestPacket)) {
            Init::warnDeprecated(
                __CLASS__ . '::' . __FUNCTION__ . ':'
                . ' $requestPacket should be a PHP array.'
            );
        }

        $init = new Init('data', $securityPacket, $secret, $requestPacket, $action);
        $params = $init->generate();
        return $this->remote->post($endpoint, $params, $this->remoteOptions);
    }
public function request ( $ endpoint , $ securityPacket , $ secret , /* FIXME: array */ $ requestPacket = [ ] , $ action = null ) { if ( ! is_array ( $ requestPacket ) ) { Init :: warnDeprecated ( __CLASS__ . '::' . __FUNCTION__ . ':' . ' $requestPacket should be a PHP array.' ) ; } $ init = new Init ( 'data' , $ securityPacket , $ secret , $ requestPacket , $ action ) ; $ params = $ init -> generate ( ) ; return $ this -> remote -> post ( $ endpoint , $ params , $ this -> remoteOptions ) ; }
Makes a single request to the data api

@param  string  $endpoint       URL to send the request
@param  array   $securityPacket Security details
@param  string  $secret         Private key
@param  array   $requestPacket  Request packet
@param  string  $action         Action for the request
@return Remote                  Instance of the Remote class,
the response can be obtained with the getBody() method
Makes a single request to the data api