src/Duellsy/Pockpack/Pockpack.php
public function retrieve($options = array(), $isArray = false)
    {
        $params = array(
            'consumer_key'  => $this->consumer_key,
            'access_token'  => $this->access_token
        );

        // combine the creds with any options sent
        $params = array_merge($params, $options);

        $request = $this->getClient()->post('/v3/get');
        $request->getParams()->set('redirect.strict', true);
        $request->setHeader('Content-Type', 'application/json; charset=UTF8');
        $request->setHeader('X-Accept', 'application/json');
        $request->setBody(json_encode($params));
        $response = $request->send();

        return json_decode($response->getBody(), $isArray);
    }
public function retrieve($options = array(), $isArray = false)
    {
        $params = array(
            'consumer_key'  => $this->consumer_key,
            'access_token'  => $this->access_token
        );

        // combine the creds with any options sent
        $params = array_merge($params, $options);

        $request = $this->getClient()->post('/v3/get');
        $request->getParams()->set('redirect.strict', true);
        $request->setHeader('Content-Type', 'application/json; charset=UTF8');
        $request->setHeader('X-Accept', 'application/json');
        $request->setBody(json_encode($params));
        $response = $request->send();

        return json_decode($response->getBody(), $isArray);
    }
public function retrieve ( $ options = array ( ) , $ isArray = false ) { $ params = array ( 'consumer_key' => $ this -> consumer_key , 'access_token' => $ this -> access_token ) ; // combine the creds with any options sent $ params = array_merge ( $ params , $ options ) ; $ request = $ this -> getClient ( ) -> post ( '/v3/get' ) ; $ request -> getParams ( ) -> set ( 'redirect.strict' , true ) ; $ request -> setHeader ( 'Content-Type' , 'application/json; charset=UTF8' ) ; $ request -> setHeader ( 'X-Accept' , 'application/json' ) ; $ request -> setBody ( json_encode ( $ params ) ) ; $ response = $ request -> send ( ) ; return json_decode ( $ response -> getBody ( ) , $ isArray ) ; }
Retrieve the data from the pocket API

@param array   $options options to filter the data
@param boolean $isArray if decode JSON to array

@return array
Retrieve the data from the pocket API