public function getSpamStats($ipblock, $spamstate, $fromdate, $todate)
    {
		if (!$ipblock)
			throw new BadMethodCallException('Parameter $ipblock is missing.');
		if (!$ipv4)
			throw new BadMethodCallException('Parameter $ipv4 is missing.');
		if (!$fromdate)
			throw new BadMethodCallException('Parameter $fromdate is missing.');
		if (!$todate)
			throw new BadMethodCallException('Parameter $todate is missing.');
        try {
            $r = $this->get('ip/' . urlencode($ipblock) . '/spam/' . $ipv4 .'/stats?from='.urlencode($fromdate).'&to='.urlencode($todate))->send();
        } catch (\Exception $e) {
            throw new IpException($e->getMessage(), $e->getCode(), $e);
        }
        return $r->getBody(true);
    }