DataSift_Account_Identity::getAll PHP Method

getAll() public method

Gets all the identities
public getAll ( string $label = null, integer $page = 1, integer $perPage = 25 ) : mixed
$label string
$page integer
$perPage integer
return mixed
    public function getAll($label = null, $page = 1, $perPage = 25)
    {
        $params = array('page' => $page, 'per_page' => $perPage);
        if ($label !== null) {
            $params['label'] = $label;
        }
        return $this->_user->get('account/identity', $params);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @dataProvider getAllProvider
  * @covers Datasift_Account_Identity::getAll
  */
 public function testGetAll($label, $apiResult, $expectedResult)
 {
     $page = 1;
     $perPage = 10;
     $identity = new DataSift_Account_Identity($this->_user);
     DataSift_MockApiClient::setResponse($apiResult);
     if (isset($expectedResult['error'])) {
         $this->setExpectedException('DataSift_Exception_APIError');
     }
     $result = $identity->getAll($label, $page, $perPage);
     $this->assertEquals($expectedResult, $result);
 }
All Usage Examples Of DataSift_Account_Identity::getAll