public static function parse($opts)
    {
        if ($opts instanceof self) {
            return $opts;
        }
        if (is_null($opts)) {
            return new Options(null, array());
        }
        if (is_array($opts)) {
            $key = null;
            if (array_key_exists('api_key', $opts)) {
                $key = $opts['api_key'];
                unset($opts['api_key']);
            }
            return new Options($key, $opts);
        } else {
            throw new Error\InvalidOption('Options have to be array.');
        }
    }