lib/SiftClient.php
public function getDecisions($opts = array()) {
        $this->mergeArguments($opts, array(
            'account_id' => $this->account_id,
            'timeout' => $this->timeout,
            'abuse_types' => null,
            'entity_type' => null,
            'next_ref' => null,
            'limit' => null,
            'from' => null
        ));

        $params = array();

        if ($opts['next_ref']) {
            $url = $opts['next_ref'];
        } else {
            $url = ($this->api_endpoint .
                '/v3/accounts/' . rawurlencode($opts['account_id']) .
                '/decisions');

            if ($opts['abuse_types']) $params['abuse_types'] = implode(',', $opts['abuse_types']);
            if ($opts['entity_type']) $params['entity_type'] = $opts['entity_type'];
            if ($opts['limit']) $params['limit'] = $opts['limit'];
            if ($opts['from']) $params['from'] = $opts['from'];
        }

        try {
            $request = new SiftRequest($url, SiftRequest::GET, $opts['timeout'],
                self::API3_VERSION,
                array('auth' => $this->api_key . ':'));

            return $request->send();
        } catch (Exception $e) {
            $this->logError($e->getMessage());
            return null;
        }
    }
public function getDecisions($opts = array()) {
        $this->mergeArguments($opts, array(
            'account_id' => $this->account_id,
            'timeout' => $this->timeout,
            'abuse_types' => null,
            'entity_type' => null,
            'next_ref' => null,
            'limit' => null,
            'from' => null
        ));

        $params = array();

        if ($opts['next_ref']) {
            $url = $opts['next_ref'];
        } else {
            $url = ($this->api_endpoint .
                '/v3/accounts/' . rawurlencode($opts['account_id']) .
                '/decisions');

            if ($opts['abuse_types']) $params['abuse_types'] = implode(',', $opts['abuse_types']);
            if ($opts['entity_type']) $params['entity_type'] = $opts['entity_type'];
            if ($opts['limit']) $params['limit'] = $opts['limit'];
            if ($opts['from']) $params['from'] = $opts['from'];
        }

        try {
            $request = new SiftRequest($url, SiftRequest::GET, $opts['timeout'],
                self::API3_VERSION,
                array('auth' => $this->api_key . ':'));

            return $request->send();
        } catch (Exception $e) {
            $this->logError($e->getMessage());
            return null;
        }
    }
public function getDecisions ( $ opts = array ( ) ) { $ this -> mergeArguments ( $ opts , array ( 'account_id' => $ this -> account_id , 'timeout' => $ this -> timeout , 'abuse_types' => null , 'entity_type' => null , 'next_ref' => null , 'limit' => null , 'from' => null ) ) ; $ params = array ( ) ; if ( $ opts [ 'next_ref' ] ) { $ url = $ opts [ 'next_ref' ] ; } else { $ url = ( $ this -> api_endpoint . '/v3/accounts/' . rawurlencode ( $ opts [ 'account_id' ] ) . '/decisions' ) ; if ( $ opts [ 'abuse_types' ] ) $ params [ 'abuse_types' ] = implode ( ',' , $ opts [ 'abuse_types' ] ) ; if ( $ opts [ 'entity_type' ] ) $ params [ 'entity_type' ] = $ opts [ 'entity_type' ] ; if ( $ opts [ 'limit' ] ) $ params [ 'limit' ] = $ opts [ 'limit' ] ; if ( $ opts [ 'from' ] ) $ params [ 'from' ] = $ opts [ 'from' ] ; } try { $ request = new SiftRequest ( $ url , SiftRequest :: GET , $ opts [ 'timeout' ] , self :: API3_VERSION , array ( 'auth' => $ this -> api_key . ':' ) ) ; return $ request -> send ( ) ; } catch ( Exception $ e ) { $ this -> logError ( $ e -> getMessage ( ) ) ; return null ; } }
Gets a list of configured decisions.

@param array $opts  Array of optional parameters for this request:
- string 'account_id': by default, this client's account ID is used.
- int 'timeout': By default, this client's timeout is used.
- array 'abuse_types': filters decisions which can be appiled to
listed abuse types
- string 'entity_type': filters on decisions which can be applied to
a specified entity_type
- string 'next_ref': url that will fetch the next page of decisions
- int 'limit': sets the max number of decisions returned
- int 'from': will return the next decision from the index given up
to the limit.
Gets a list of configured decisions .