src/Duellsy/Pockpack/Pockpack.php
public function send(PockpackQueue $queue = null)
    {
        if( is_null($queue) ) {
            throw new NoPockpackQueueException();
        }

        $params = array(
            'actions'       => json_encode($queue->getActions()),
            'consumer_key'  => $this->consumer_key,
            'access_token'  => $this->access_token
        );

        $request = $this->getClient()->get('/v3/send');
        $request->getQuery()->merge($params);

        $response = $request->send();

        // remove any items from the queue
        $queue->clear();

        return json_decode($response->getBody());
    }
public function send(PockpackQueue $queue = null)
    {
        if( is_null($queue) ) {
            throw new NoPockpackQueueException();
        }

        $params = array(
            'actions'       => json_encode($queue->getActions()),
            'consumer_key'  => $this->consumer_key,
            'access_token'  => $this->access_token
        );

        $request = $this->getClient()->get('/v3/send');
        $request->getQuery()->merge($params);

        $response = $request->send();

        // remove any items from the queue
        $queue->clear();

        return json_decode($response->getBody());
    }
public function send ( PockpackQueue $ queue = null ) { if ( is_null ( $ queue ) ) { throw new NoPockpackQueueException ( ) ; } $ params = array ( 'actions' => json_encode ( $ queue -> getActions ( ) ) , 'consumer_key' => $ this -> consumer_key , 'access_token' => $ this -> access_token ) ; $ request = $ this -> getClient ( ) -> get ( '/v3/send' ) ; $ request -> getQuery ( ) -> merge ( $ params ) ; $ response = $ request -> send ( ) ; // remove any items from the queue $ queue -> clear ( ) ; return json_decode ( $ response -> getBody ( ) ) ; }
Responsible for sending the request to the pocket API

@param  string $consumer_key
@param  string $access_token
@param  array $actions
Responsible for sending the request to the pocket API