TijsVerkoyen\Twitter\Twitter::blocksIds PHP Method

blocksIds() public method

Returns an array of numeric user ids the authenticating user is blocking.
public blocksIds ( string[optional] $cursor = null, bool[optional] $stringifyIds = null ) : array
$cursor string[optional]
$stringifyIds bool[optional]
return array
    public function blocksIds($cursor = null, $stringifyIds = null)
    {
        // build parameters
        $parameters = null;
        if ($cursor != null) {
            $parameters['cursor'] = (string) $cursor;
        }
        if ($stringifyIds !== null) {
            $parameters['stringify_ids'] = (bool) $stringifyIds ? 'true' : 'false';
        }
        // make the call
        return $this->doCall('blocks/ids.json', $parameters, true);
    }

Usage Example

 /**
  * Tests Twitter->blocksIds
  */
 public function testBlocksIds()
 {
     $response = $this->twitter->blocksIds();
     $this->assertArrayHasKey('ids', $response);
     $this->assertArrayHasKey('next_cursor', $response);
     $this->assertArrayHasKey('previous_cursor', $response);
 }
Twitter