DataSift_Account_Identity_Token::getAll PHP Method

getAll() public method

Get all the tokens for an identity
public getAll ( string $identity, integer $page = 1, integer $perPage = 25 ) : mixed
$identity string
$page integer
$perPage integer
return mixed
    public function getAll($identity, $page = 1, $perPage = 25)
    {
        $params = array('page' => $page, 'per_page' => $perPage);
        return $this->_user->get('account/identity/' . $identity . '/token', $params);
    }

Usage Example

Example #1
0
 /**
  * @dataProvider getAllTokensProvider
  * @covers Datasift_Account_Identity_Token::getAll
  */
 public function testGetAllTokens($identityId, $page, $perPage, $apiResult, $expectedResult)
 {
     $identityToken = new DataSift_Account_Identity_Token($this->_user);
     DataSift_MockApiClient::setResponse($apiResult);
     if (isset($expectedResult['error'])) {
         $this->setExpectedException('DataSift_Exception_APIError');
     }
     $result = $identityToken->getAll($identityId, $page, $perPage);
     $this->assertEquals($expectedResult, $result);
 }
All Usage Examples Of DataSift_Account_Identity_Token::getAll
DataSift_Account_Identity_Token