public function getById($classname, $id)
    {
        if (!preg_match('/^[0-9]+$/D', $id)) {
            throw new InvalidIdException('Invalid id: ' . $id);
        }
        $response = $this->request($this->buildUrl(new $classname(array('id' => $id))), 'GET');
        return $this->mapper->mapFromStorage($response);
    }